Codacy style changes for test files
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
const once = fn => {
|
||||
let called = false;
|
||||
return function(...args) {
|
||||
if (called) return;
|
||||
called = true;
|
||||
return fn.apply(this, args);
|
||||
};
|
||||
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