ran npm run tdd
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
module.exports = once = fn => {
|
||||
const once = fn => {
|
||||
let called = false;
|
||||
return function(...args) {
|
||||
if (called) return;
|
||||
called = true;
|
||||
return fn.apply(this, args);
|
||||
};
|
||||
};
|
||||
};
|
||||
module.exports = once
|
||||
Reference in New Issue
Block a user