once.js 262 B

123456789
  1. var partial = require('./partial.js');
  2. var before = require('./before.js');
  3. // Returns a function that will be executed at most one time, no matter how
  4. // often you call it. Useful for lazy initialization.
  5. var once = partial(before, 2);
  6. module.exports = once;