blob: 8211bb7e110660bec85daea5712b2d4785d45fe6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/usr/bin/env node
var once = function (fn) {
var called = false;
return function (...args) {
if (called) {
return undefined;
} else {
called = true;
return fn(...args);
}
};
};
|