mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Add _.iteratee alias of _.callback.
This commit is contained in:
@@ -8610,6 +8610,7 @@
|
|||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
* @alias iteratee
|
||||||
* @category Utility
|
* @category Utility
|
||||||
* @param {*} [func=identity] The value to convert to a callback.
|
* @param {*} [func=identity] The value to convert to a callback.
|
||||||
* @param {*} [thisArg] The `this` binding of the created callback.
|
* @param {*} [thisArg] The `this` binding of the created callback.
|
||||||
@@ -9280,6 +9281,7 @@
|
|||||||
lodash.each = forEach;
|
lodash.each = forEach;
|
||||||
lodash.eachRight = forEachRight;
|
lodash.eachRight = forEachRight;
|
||||||
lodash.extend = assign;
|
lodash.extend = assign;
|
||||||
|
lodash.iteratee = callback;
|
||||||
lodash.methods = functions;
|
lodash.methods = functions;
|
||||||
lodash.object = zipObject;
|
lodash.object = zipObject;
|
||||||
lodash.select = filter;
|
lodash.select = filter;
|
||||||
|
|||||||
@@ -2209,6 +2209,10 @@
|
|||||||
skipTest();
|
skipTest();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should be aliased', 1, function() {
|
||||||
|
strictEqual(_.iteratee, _.callback);
|
||||||
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
@@ -11893,7 +11897,7 @@
|
|||||||
|
|
||||||
var acceptFalsey = _.difference(allMethods, rejectFalsey);
|
var acceptFalsey = _.difference(allMethods, rejectFalsey);
|
||||||
|
|
||||||
test('should accept falsey arguments', 193, function() {
|
test('should accept falsey arguments', 194, function() {
|
||||||
var emptyArrays = _.map(falsey, _.constant([])),
|
var emptyArrays = _.map(falsey, _.constant([])),
|
||||||
isExposed = '_' in root,
|
isExposed = '_' in root,
|
||||||
oldDash = root._;
|
oldDash = root._;
|
||||||
|
|||||||
Reference in New Issue
Block a user