Use getIteratee in createModArgs.

This commit is contained in:
John-David Dalton
2015-09-23 23:53:50 -07:00
parent ee2078f3ea
commit a569b723c5
2 changed files with 4 additions and 8 deletions

View File

@@ -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,

View File

@@ -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)),