Musique/node_modules/async.util.once/index.js

9 lines
173 B
JavaScript

'use strict';
module.exports = function once(fn) {
return function() {
if (fn === null) return;
fn.apply(this, arguments);
fn = null;
};
};