pull/1/head
ansuz 2019-04-11 10:54:00 +02:00
parent 11eb566158
commit f9eb1fde67
1 changed files with 8 additions and 0 deletions

8
lib/once.js Normal file
View 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));
};
};