_bindCb.js 341 B

1234567891011121314
  1. define(function () {
  2. // Internal function that returns a bound version of the passed-in callback, to
  3. // be repeatedly applied in other Underscore functions.
  4. function bindCb(func, context) {
  5. if (context === void 0) return func;
  6. return function() {
  7. return func.apply(context, arguments);
  8. };
  9. }
  10. return bindCb;
  11. });