_pusher.js 213 B

123456789
  1. // Internal helper to generate a callback that will append
  2. // its first argument to the closed-over `array`.
  3. function pusher(array) {
  4. return function(arg) {
  5. array.push(arg);
  6. };
  7. }
  8. module.exports = pusher;