_bindCb.js 306 B

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