From bb059c0f643435d8e465ffdefc52a638d8441a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipi=C5=84ski?= Date: Tue, 18 Apr 2017 09:33:58 +0200 Subject: [PATCH] Fixin new `map` imports. --- .internal/baseDifference.js | 4 ++-- .internal/baseIntersection.js | 4 ++-- .internal/basePullAll.js | 4 ++-- cond.js | 4 ++-- intersection.js | 4 ++-- intersectionBy.js | 4 ++-- intersectionWith.js | 4 ++-- over.js | 4 ++-- pickBy.js | 4 ++-- pullAt.js | 4 ++-- toPath.js | 4 ++-- toString.js | 4 ++-- unzip.js | 4 ++-- unzipWith.js | 4 ++-- 14 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.internal/baseDifference.js b/.internal/baseDifference.js index b29a5c26e..1bf76d7f6 100644 --- a/.internal/baseDifference.js +++ b/.internal/baseDifference.js @@ -1,7 +1,7 @@ import SetCache from './SetCache.js' import arrayIncludes from './arrayIncludes.js' import arrayIncludesWith from './arrayIncludesWith.js' -import arrayMap from './arrayMap.js' +import map from '../map.js' import cacheHas from './cacheHas.js' /** Used as the size to enable large array optimizations. */ @@ -28,7 +28,7 @@ function baseDifference(array, values, iteratee, comparator) { return result } if (iteratee) { - values = arrayMap(values, (value) => iteratee(value)) + values = map(values, (value) => iteratee(value)) } if (comparator) { includes = arrayIncludesWith diff --git a/.internal/baseIntersection.js b/.internal/baseIntersection.js index 5f0717709..8651bc41b 100644 --- a/.internal/baseIntersection.js +++ b/.internal/baseIntersection.js @@ -1,7 +1,7 @@ import SetCache from './SetCache.js' import arrayIncludes from './arrayIncludes.js' import arrayIncludesWith from './arrayIncludesWith.js' -import arrayMap from './arrayMap.js' +import map from '../map.js' import cacheHas from './cacheHas.js' /** @@ -28,7 +28,7 @@ function baseIntersection(arrays, iteratee, comparator) { while (othIndex--) { array = arrays[othIndex] if (othIndex && iteratee) { - array = arrayMap(array, (value) => iteratee(value)) + array = map(array, (value) => iteratee(value)) } maxLength = Math.min(array.length, maxLength) caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) diff --git a/.internal/basePullAll.js b/.internal/basePullAll.js index 7ddfa5440..70aad4aa8 100644 --- a/.internal/basePullAll.js +++ b/.internal/basePullAll.js @@ -1,4 +1,4 @@ -import arrayMap from './arrayMap.js' +import map from '../map.js' import baseIndexOf from './baseIndexOf.js' import baseIndexOfWith from './baseIndexOfWith.js' import copyArray from './copyArray.js' @@ -27,7 +27,7 @@ function basePullAll(array, values, iteratee, comparator) { values = copyArray(values) } if (iteratee) { - seen = arrayMap(array, (value) => iteratee(value)) + seen = map(array, (value) => iteratee(value)) } while (++index < length) { let fromIndex = 0 diff --git a/cond.js b/cond.js index 8a41fa718..2b09fb5e5 100644 --- a/cond.js +++ b/cond.js @@ -1,4 +1,4 @@ -import arrayMap from './.internal/arrayMap.js' +import map from './map.js' /** * Creates a function that iterates over `pairs` and invokes the corresponding @@ -30,7 +30,7 @@ import arrayMap from './.internal/arrayMap.js' function cond(pairs) { const length = pairs == null ? 0 : pairs.length - pairs = !length ? [] : arrayMap(pairs, (pair) => { + pairs = !length ? [] : map(pairs, (pair) => { if (typeof pair[1] != 'function') { throw new TypeError('Expected a function') } diff --git a/intersection.js b/intersection.js index 30b85b04b..0b16d3b4a 100644 --- a/intersection.js +++ b/intersection.js @@ -1,4 +1,4 @@ -import arrayMap from './.internal/arrayMap.js' +import map from './map.js' import baseIntersection from './.internal/baseIntersection.js' import castArrayLikeObject from './.internal/castArrayLikeObject.js' @@ -18,7 +18,7 @@ import castArrayLikeObject from './.internal/castArrayLikeObject.js' * // => [2] */ function intersection(...arrays) { - const mapped = arrayMap(arrays, castArrayLikeObject) + const mapped = map(arrays, castArrayLikeObject) return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped) : [] diff --git a/intersectionBy.js b/intersectionBy.js index 37901adee..3f1f85246 100644 --- a/intersectionBy.js +++ b/intersectionBy.js @@ -1,4 +1,4 @@ -import arrayMap from './.internal/arrayMap.js' +import map from './map.js' import baseIntersection from './.internal/baseIntersection.js' import castArrayLikeObject from './.internal/castArrayLikeObject.js' import last from './last.js' @@ -22,7 +22,7 @@ import last from './last.js' */ function intersectionBy(...arrays) { let iteratee = last(arrays) - const mapped = arrayMap(arrays, castArrayLikeObject) + const mapped = map(arrays, castArrayLikeObject) if (iteratee === last(mapped)) { iteratee = undefined diff --git a/intersectionWith.js b/intersectionWith.js index 5490bbba8..7033b18a5 100644 --- a/intersectionWith.js +++ b/intersectionWith.js @@ -1,4 +1,4 @@ -import arrayMap from './.internal/arrayMap.js' +import map from './map.js' import baseIntersection from './.internal/baseIntersection.js' import castArrayLikeObject from './.internal/castArrayLikeObject.js' import last from './last.js' @@ -24,7 +24,7 @@ import last from './last.js' */ function intersectionWith(...arrays) { let comparator = last(arrays) - const mapped = arrayMap(arrays, castArrayLikeObject) + const mapped = map(arrays, castArrayLikeObject) comparator = typeof comparator == 'function' ? comparator : undefined if (comparator) { diff --git a/over.js b/over.js index 644692d90..d4e41daa0 100644 --- a/over.js +++ b/over.js @@ -1,4 +1,4 @@ -import arrayMap from './.internal/arrayMap.js' +import map from './map.js' /** * Creates a function that invokes `iteratees` with the arguments it receives @@ -18,7 +18,7 @@ import arrayMap from './.internal/arrayMap.js' */ function over(iteratees) { return function(...args) { - return arrayMap(iteratees, (iteratee) => iteratee.apply(this, args)) + return map(iteratees, (iteratee) => iteratee.apply(this, args)) } } diff --git a/pickBy.js b/pickBy.js index c6d4409bb..2b8b4dbdf 100644 --- a/pickBy.js +++ b/pickBy.js @@ -1,4 +1,4 @@ -import arrayMap from './.internal/arrayMap.js' +import map from './map.js' import basePickBy from './.internal/basePickBy.js' import getAllKeysIn from './.internal/getAllKeysIn.js' @@ -22,7 +22,7 @@ function pickBy(object, predicate) { if (object == null) { return {} } - const props = arrayMap(getAllKeysIn(object), (prop) => [prop]) + const props = map(getAllKeysIn(object), (prop) => [prop]) return basePickBy(object, props, (value, path) => predicate(value, path[0])) } diff --git a/pullAt.js b/pullAt.js index 4900c5292..86a22707e 100644 --- a/pullAt.js +++ b/pullAt.js @@ -1,4 +1,4 @@ -import arrayMap from './.internal/arrayMap.js' +import map from './map.js' import baseAt from './.internal/baseAt.js' import basePullAt from './.internal/basePullAt.js' import compareAscending from './.internal/compareAscending.js' @@ -31,7 +31,7 @@ function pullAt(array, ...indexes) { const length = array == null ? 0 : array.length const result = baseAt(array, indexes) - basePullAt(array, arrayMap(indexes, (index) => isIndex(index, length) ? +index : index).sort(compareAscending)) + basePullAt(array, map(indexes, (index) => isIndex(index, length) ? +index : index).sort(compareAscending)) return result } diff --git a/toPath.js b/toPath.js index b69f15772..193793781 100644 --- a/toPath.js +++ b/toPath.js @@ -1,4 +1,4 @@ -import arrayMap from './.internal/arrayMap.js' +import map from './map.js' import copyArray from './.internal/copyArray.js' import isSymbol from './isSymbol.js' import stringToPath from './.internal/stringToPath.js' @@ -21,7 +21,7 @@ import toKey from './.internal/toKey.js' */ function toPath(value) { if (Array.isArray(value)) { - return arrayMap(value, toKey) + return map(value, toKey) } return isSymbol(value) ? [value] : copyArray(stringToPath(value)) } diff --git a/toString.js b/toString.js index 57f9fff94..999b27663 100644 --- a/toString.js +++ b/toString.js @@ -1,4 +1,4 @@ -import arrayMap from './.internal/arrayMap.js' +import map from './map.js' import isSymbol from './isSymbol.js' /** Used as references for various `Number` constants. */ @@ -37,7 +37,7 @@ function toString(value) { } if (Array.isArray(value)) { // Recursively convert values (susceptible to call stack limits). - return `${arrayMap(value, (other) => other == null ? other : toString(other))}` + return `${map(value, (other) => other == null ? other : toString(other))}` } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : '' diff --git a/unzip.js b/unzip.js index 34d5058ca..a0b9a2f80 100644 --- a/unzip.js +++ b/unzip.js @@ -1,5 +1,5 @@ import arrayFilter from './.internal/arrayFilter.js' -import arrayMap from './.internal/arrayMap.js' +import map from './map.js' import baseProperty from './.internal/baseProperty.js' import isArrayLikeObject from './isArrayLikeObject.js' @@ -35,7 +35,7 @@ function unzip(array) { let index = -1 const result = new Array(length) while (++index < length) { - result[index] = arrayMap(array, baseProperty(index)) + result[index] = map(array, baseProperty(index)) } return result } diff --git a/unzipWith.js b/unzipWith.js index 36137aa89..7c2aeef28 100644 --- a/unzipWith.js +++ b/unzipWith.js @@ -1,4 +1,4 @@ -import arrayMap from './.internal/arrayMap.js' +import map from './map.js' import unzip from './unzip.js' /** @@ -25,7 +25,7 @@ function unzipWith(array, iteratee) { return [] } const result = unzip(array) - return arrayMap(result, (group) => iteratee.apply(undefined, group)) + return map(result, (group) => iteratee.apply(undefined, group)) } export default unzipWith