oops
This commit is contained in:
parent
11eb566158
commit
f9eb1fde67
8
lib/once.js
Normal file
8
lib/once.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
module.exports = function (f) {
|
||||||
|
var called;
|
||||||
|
return function () {
|
||||||
|
if (called) { return; }
|
||||||
|
called = true;
|
||||||
|
f.apply(this, Array.prototype.slice.call(arguments));
|
||||||
|
};
|
||||||
|
};
|
||||||
Loading…
x
Reference in New Issue
Block a user