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

10 lines
173 B
JavaScript
Raw Normal View History

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