_pusher.js 246 B

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