cryptpad/lib/once.js

9 lines
200 B
JavaScript
Raw Normal View History

2019-04-11 08:54:00 +00:00
module.exports = function (f) {
var called;
return function () {
if (called) { return; }
called = true;
f.apply(this, Array.prototype.slice.call(arguments));
};
};