mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
Use getIteratee in createModArgs.
This commit is contained in:
@@ -3625,10 +3625,8 @@
|
||||
*/
|
||||
function createModArgs(resolver) {
|
||||
return restParam(function(func, transforms) {
|
||||
transforms = baseFlatten(transforms);
|
||||
if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
transforms = arrayMap(baseFlatten(transforms), getIteratee());
|
||||
|
||||
var funcsLength = transforms.length;
|
||||
return restParam(function(args) {
|
||||
var index = -1,
|
||||
|
||||
@@ -20880,8 +20880,6 @@
|
||||
'delay',
|
||||
'flip',
|
||||
'memoize',
|
||||
'modArgs',
|
||||
'modArgsSet',
|
||||
'negate',
|
||||
'once',
|
||||
'partial',
|
||||
@@ -20952,7 +20950,7 @@
|
||||
var acceptFalsey = _.difference(allMethods, rejectFalsey);
|
||||
|
||||
QUnit.test('should accept falsey arguments', function(assert) {
|
||||
assert.expect(238);
|
||||
assert.expect(240);
|
||||
|
||||
var emptyArrays = _.map(falsey, _.constant([]));
|
||||
|
||||
@@ -21016,7 +21014,7 @@
|
||||
});
|
||||
|
||||
QUnit.test('should throw an error for falsey arguments', function(assert) {
|
||||
assert.expect(25);
|
||||
assert.expect(23);
|
||||
|
||||
_.each(rejectFalsey, function(methodName) {
|
||||
var expected = _.map(falsey, _.constant(true)),
|
||||
|
||||
Reference in New Issue
Block a user