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