diff --git a/lodash.js b/lodash.js index b24a7ddf7..cd3d75f76 100644 --- a/lodash.js +++ b/lodash.js @@ -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, diff --git a/test/test.js b/test/test.js index 6a7b3a291..7e581ac13 100644 --- a/test/test.js +++ b/test/test.js @@ -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)),