Skip to content

Commit eaba5b5

Browse files
committed
Replace bindCb by bindCb4 where appropriate
1 parent 341ad30 commit eaba5b5

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

modules/_createReduce.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import bindCb from './_bindCb.js';
1+
import bindCb4 from './_bindCb4.js';
22

33
// Create a reducing function iterating in the same way as `loop` (e.g.
44
// `_.find`).
@@ -23,6 +23,6 @@ export default function createReduce(loop) {
2323

2424
return function(obj, iteratee, memo, context) {
2525
var initial = arguments.length >= 3;
26-
return reducer(obj, bindCb(iteratee, context), memo, initial);
26+
return reducer(obj, bindCb4(iteratee, context), memo, initial);
2727
};
2828
}

modules/each.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import bindCb from './_bindCb.js';
1+
import bindCb4 from './_bindCb4.js';
22
import find from './find.js';
33

44
// The cornerstone for collection functions, an `each`
55
// implementation, aka `forEach`.
66
// Handles raw objects in addition to array-likes. Treats all
77
// sparse array-likes as if they were dense.
88
export default function each(obj, iteratee, context) {
9-
iteratee = bindCb(iteratee, context);
9+
iteratee = bindCb4(iteratee, context);
1010
find(obj, function(value, key, obj) {
1111
iteratee(value, key, obj);
1212
// We omit the return value so that iteration continues until the end.

modules/pick.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import restArguments from './restArguments.js';
22
import isFunction from './isFunction.js';
3-
import bindCb from './_bindCb.js';
3+
import bindCb4 from './_bindCb4.js';
44
import allKeys from './allKeys.js';
55
import keyInObj from './_keyInObj.js';
66
import flatten from './_flatten.js';
@@ -11,7 +11,7 @@ export default restArguments(function(obj, keys) {
1111
var result = {}, iteratee = keys[0];
1212
if (obj == null) return result;
1313
if (isFunction(iteratee)) {
14-
iteratee = bindCb(iteratee, keys[1]);
14+
iteratee = bindCb4(iteratee, keys[1]);
1515
keys = allKeys(obj);
1616
} else {
1717
iteratee = keyInObj;

modules/times.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import bindCb from './_bindCb.js';
1+
import bindCb4 from './_bindCb4.js';
22

33
// Run a function **n** times.
44
export default function times(n, iteratee, context) {
55
var accum = Array(Math.max(0, n));
6-
iteratee = bindCb(iteratee, context);
6+
iteratee = bindCb4(iteratee, context);
77
for (var i = 0; i < n; i++) accum[i] = iteratee(i);
88
return accum;
99
}

underscore-esm.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

underscore-esm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

underscore.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

underscore.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)