mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Bump to v4.14.0.
This commit is contained in:
@@ -2,10 +2,9 @@ import apply from './_apply.js';
|
||||
import arrayMap from './_arrayMap.js';
|
||||
import baseFlatten from './_baseFlatten.js';
|
||||
import baseIteratee from './_baseIteratee.js';
|
||||
import baseRest from './_baseRest.js';
|
||||
import baseUnary from './_baseUnary.js';
|
||||
import isArray from './isArray.js';
|
||||
import isFlattenableIteratee from './_isFlattenableIteratee.js';
|
||||
import rest from './rest.js';
|
||||
|
||||
/**
|
||||
* Creates a function like `_.over`.
|
||||
@@ -15,12 +14,12 @@ import rest from './rest.js';
|
||||
* @returns {Function} Returns the new over function.
|
||||
*/
|
||||
function createOver(arrayFunc) {
|
||||
return rest(function(iteratees) {
|
||||
return baseRest(function(iteratees) {
|
||||
iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
|
||||
? arrayMap(iteratees[0], baseUnary(baseIteratee))
|
||||
: arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(baseIteratee));
|
||||
: arrayMap(baseFlatten(iteratees, 1), baseUnary(baseIteratee));
|
||||
|
||||
return rest(function(args) {
|
||||
return baseRest(function(args) {
|
||||
var thisArg = this;
|
||||
return arrayFunc(iteratees, function(iteratee) {
|
||||
return apply(iteratee, thisArg, args);
|
||||
|
||||
Reference in New Issue
Block a user