es-toolkit 1.50.0 → 1.51.0-dev.2065
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +82 -0
- package/NOTICE +39 -0
- package/README.md +2 -2
- package/bigint.d.ts +1 -0
- package/bigint.js +1 -0
- package/dist/_internal/NonPlainObject.d.mts +8 -0
- package/dist/_internal/NonPlainObject.d.ts +8 -0
- package/dist/_internal/bigIntRangeLength.js +19 -0
- package/dist/_internal/bigIntRangeLength.mjs +19 -0
- package/dist/_internal/isMergeableValue.js +17 -0
- package/dist/_internal/isMergeableValue.mjs +17 -0
- package/dist/_internal/isUnsafeProperty.js +7 -4
- package/dist/_internal/isUnsafeProperty.mjs +7 -4
- package/dist/_internal/isUnsafeToWriteProperty.js +22 -0
- package/dist/_internal/isUnsafeToWriteProperty.mjs +22 -0
- package/dist/array/at.d.mts +1 -1
- package/dist/array/at.d.ts +1 -1
- package/dist/array/filterAsync.js +1 -1
- package/dist/array/filterAsync.mjs +1 -1
- package/dist/array/flatMapAsync.js +1 -1
- package/dist/array/flatMapAsync.mjs +1 -1
- package/dist/array/forEachAsync.js +1 -1
- package/dist/array/forEachAsync.mjs +1 -1
- package/dist/array/index.js +1 -1
- package/dist/array/index.mjs +1 -1
- package/dist/array/limitAsync.d.mts +4 -28
- package/dist/array/limitAsync.d.ts +4 -28
- package/dist/array/limitAsync.js +2 -39
- package/dist/array/limitAsync.mjs +3 -39
- package/dist/array/mapAsync.js +1 -1
- package/dist/array/mapAsync.mjs +1 -1
- package/dist/array/orderBy.d.mts +1 -1
- package/dist/array/orderBy.d.ts +1 -1
- package/dist/array/pullAt.d.mts +1 -1
- package/dist/array/pullAt.d.ts +1 -1
- package/dist/array/pullAt.js +1 -1
- package/dist/array/pullAt.mjs +1 -1
- package/dist/array/sortBy.d.mts +1 -1
- package/dist/array/sortBy.d.ts +1 -1
- package/dist/array/unzip.d.mts +3 -0
- package/dist/array/unzip.d.ts +3 -0
- package/dist/array/unzip.js +3 -0
- package/dist/array/unzip.mjs +3 -0
- package/dist/bigint/clamp.d.mts +37 -0
- package/dist/bigint/clamp.d.ts +37 -0
- package/dist/bigint/clamp.js +16 -0
- package/dist/bigint/clamp.mjs +16 -0
- package/dist/bigint/inRange.d.mts +37 -0
- package/dist/bigint/inRange.d.ts +37 -0
- package/dist/bigint/inRange.js +20 -0
- package/dist/bigint/inRange.mjs +20 -0
- package/dist/bigint/index.d.mts +14 -0
- package/dist/bigint/index.d.ts +14 -0
- package/dist/bigint/index.js +27 -0
- package/dist/bigint/index.mjs +14 -0
- package/dist/bigint/max.d.mts +21 -0
- package/dist/bigint/max.d.ts +21 -0
- package/dist/bigint/max.js +26 -0
- package/dist/bigint/max.mjs +26 -0
- package/dist/bigint/maxBy.d.mts +21 -0
- package/dist/bigint/maxBy.d.ts +21 -0
- package/dist/bigint/maxBy.js +34 -0
- package/dist/bigint/maxBy.mjs +34 -0
- package/dist/bigint/median.d.mts +22 -0
- package/dist/bigint/median.d.ts +22 -0
- package/dist/bigint/median.js +28 -0
- package/dist/bigint/median.mjs +28 -0
- package/dist/bigint/medianBy.d.mts +21 -0
- package/dist/bigint/medianBy.d.ts +21 -0
- package/dist/bigint/medianBy.js +24 -0
- package/dist/bigint/medianBy.mjs +24 -0
- package/dist/bigint/min.d.mts +18 -0
- package/dist/bigint/min.d.ts +18 -0
- package/dist/bigint/min.js +23 -0
- package/dist/bigint/min.mjs +23 -0
- package/dist/bigint/minBy.d.mts +21 -0
- package/dist/bigint/minBy.d.ts +21 -0
- package/dist/bigint/minBy.js +34 -0
- package/dist/bigint/minBy.mjs +34 -0
- package/dist/bigint/percentile.d.mts +23 -0
- package/dist/bigint/percentile.d.ts +23 -0
- package/dist/bigint/percentile.js +31 -0
- package/dist/bigint/percentile.mjs +31 -0
- package/dist/bigint/range.d.mts +45 -0
- package/dist/bigint/range.d.ts +45 -0
- package/dist/bigint/range.js +24 -0
- package/dist/bigint/range.mjs +24 -0
- package/dist/bigint/rangeRight.d.mts +43 -0
- package/dist/bigint/rangeRight.d.ts +43 -0
- package/dist/bigint/rangeRight.js +25 -0
- package/dist/bigint/rangeRight.mjs +25 -0
- package/dist/bigint/sum.d.mts +18 -0
- package/dist/bigint/sum.d.ts +18 -0
- package/dist/bigint/sum.js +22 -0
- package/dist/bigint/sum.mjs +22 -0
- package/dist/bigint/sumBy.d.mts +20 -0
- package/dist/bigint/sumBy.d.ts +20 -0
- package/dist/bigint/sumBy.js +24 -0
- package/dist/bigint/sumBy.mjs +24 -0
- package/dist/browser.global.js +6 -3
- package/dist/compat/_internal/normalizeZero.js +13 -0
- package/dist/compat/_internal/normalizeZero.mjs +13 -0
- package/dist/compat/_internal/toKey.js +1 -1
- package/dist/compat/_internal/toKey.mjs +1 -1
- package/dist/compat/_internal/unicodeSize.js +45 -0
- package/dist/compat/_internal/unicodeSize.mjs +45 -0
- package/dist/compat/array/chunk.js +1 -0
- package/dist/compat/array/chunk.mjs +1 -0
- package/dist/compat/array/difference.js +2 -1
- package/dist/compat/array/difference.mjs +2 -1
- package/dist/compat/array/differenceBy.js +3 -2
- package/dist/compat/array/differenceBy.mjs +3 -2
- package/dist/compat/array/drop.d.mts +1 -1
- package/dist/compat/array/drop.d.ts +1 -1
- package/dist/compat/array/dropRight.d.mts +2 -3
- package/dist/compat/array/dropRight.d.ts +2 -3
- package/dist/compat/array/dropRight.js +4 -4
- package/dist/compat/array/dropRight.mjs +4 -4
- package/dist/compat/array/every.js +9 -9
- package/dist/compat/array/every.mjs +9 -9
- package/dist/compat/array/fill.js +8 -2
- package/dist/compat/array/fill.mjs +8 -2
- package/dist/compat/array/find.js +14 -13
- package/dist/compat/array/find.mjs +14 -13
- package/dist/compat/array/findIndex.js +3 -19
- package/dist/compat/array/findIndex.mjs +3 -19
- package/dist/compat/array/findLast.js +3 -3
- package/dist/compat/array/findLast.mjs +3 -3
- package/dist/compat/array/flatMap.js +3 -8
- package/dist/compat/array/flatMap.mjs +3 -7
- package/dist/compat/array/flatMapDepth.js +1 -1
- package/dist/compat/array/flatMapDepth.mjs +1 -1
- package/dist/compat/array/forEach.js +1 -1
- package/dist/compat/array/forEach.mjs +1 -1
- package/dist/compat/array/includes.js +13 -13
- package/dist/compat/array/includes.mjs +13 -13
- package/dist/compat/array/indexOf.js +2 -1
- package/dist/compat/array/indexOf.mjs +2 -1
- package/dist/compat/array/intersection.js +3 -2
- package/dist/compat/array/intersection.mjs +3 -2
- package/dist/compat/array/intersectionBy.js +7 -11
- package/dist/compat/array/intersectionBy.mjs +7 -11
- package/dist/compat/array/intersectionWith.js +6 -18
- package/dist/compat/array/intersectionWith.mjs +6 -18
- package/dist/compat/array/last.js +1 -1
- package/dist/compat/array/last.mjs +1 -1
- package/dist/compat/array/lastIndexOf.js +3 -1
- package/dist/compat/array/lastIndexOf.mjs +3 -1
- package/dist/compat/array/map.js +3 -3
- package/dist/compat/array/map.mjs +3 -3
- package/dist/compat/array/orderBy.js +8 -6
- package/dist/compat/array/orderBy.mjs +8 -6
- package/dist/compat/array/partition.js +6 -6
- package/dist/compat/array/partition.mjs +6 -6
- package/dist/compat/array/pull.js +1 -1
- package/dist/compat/array/pull.mjs +1 -1
- package/dist/compat/array/pullAll.js +2 -0
- package/dist/compat/array/pullAll.mjs +2 -0
- package/dist/compat/array/remove.js +8 -4
- package/dist/compat/array/remove.mjs +8 -4
- package/dist/compat/array/reverse.js +1 -1
- package/dist/compat/array/reverse.mjs +1 -1
- package/dist/compat/array/sampleSize.js +2 -1
- package/dist/compat/array/sampleSize.mjs +2 -1
- package/dist/compat/array/size.js +2 -1
- package/dist/compat/array/size.mjs +2 -1
- package/dist/compat/array/some.js +2 -1
- package/dist/compat/array/some.mjs +2 -1
- package/dist/compat/array/takeRightWhile.js +2 -2
- package/dist/compat/array/takeRightWhile.mjs +2 -2
- package/dist/compat/array/takeWhile.js +2 -2
- package/dist/compat/array/takeWhile.mjs +2 -2
- package/dist/compat/array/unionBy.js +2 -1
- package/dist/compat/array/unionBy.mjs +2 -1
- package/dist/compat/array/uniqBy.js +4 -3
- package/dist/compat/array/uniqBy.mjs +4 -3
- package/dist/compat/array/unzip.d.mts +3 -0
- package/dist/compat/array/unzip.d.ts +3 -0
- package/dist/compat/array/unzip.js +3 -0
- package/dist/compat/array/unzip.mjs +3 -0
- package/dist/compat/array/unzipWith.js +1 -1
- package/dist/compat/array/unzipWith.mjs +1 -1
- package/dist/compat/array/zipObject.js +2 -0
- package/dist/compat/array/zipObject.mjs +2 -0
- package/dist/compat/compat.d.mts +3 -3
- package/dist/compat/compat.d.ts +3 -3
- package/dist/compat/compat.js +8 -4
- package/dist/compat/compat.mjs +8 -4
- package/dist/compat/function/curry.d.mts +1 -1
- package/dist/compat/function/curry.d.ts +1 -1
- package/dist/compat/function/flowRight.d.mts +1 -1
- package/dist/compat/function/flowRight.d.ts +1 -1
- package/dist/compat/function/partial.d.mts +1 -1
- package/dist/compat/function/partial.d.ts +1 -1
- package/dist/compat/function/rest.d.mts +1 -1
- package/dist/compat/function/rest.d.ts +1 -1
- package/dist/compat/function/rest.js +1 -1
- package/dist/compat/function/rest.mjs +1 -1
- package/dist/compat/index.d.mts +3 -3
- package/dist/compat/index.d.ts +3 -3
- package/dist/compat/index.js +6 -4
- package/dist/compat/index.mjs +5 -5
- package/dist/compat/math/maxBy.js +1 -1
- package/dist/compat/math/maxBy.mjs +1 -1
- package/dist/compat/math/meanBy.d.mts +4 -0
- package/dist/compat/math/meanBy.d.ts +4 -0
- package/dist/compat/math/meanBy.js +8 -3
- package/dist/compat/math/meanBy.mjs +8 -3
- package/dist/compat/math/minBy.js +1 -1
- package/dist/compat/math/minBy.mjs +1 -1
- package/dist/compat/object/cloneDeep.d.mts +5 -5
- package/dist/compat/object/cloneDeep.d.ts +5 -5
- package/dist/compat/object/cloneDeep.js +5 -5
- package/dist/compat/object/cloneDeep.mjs +5 -5
- package/dist/compat/object/cloneDeepWith.js +3 -1
- package/dist/compat/object/cloneDeepWith.mjs +3 -1
- package/dist/compat/object/cloneWith.d.mts +1 -1
- package/dist/compat/object/cloneWith.d.ts +1 -1
- package/dist/compat/object/cloneWith.js +1 -1
- package/dist/compat/object/cloneWith.mjs +1 -1
- package/dist/compat/object/entries.d.mts +1 -0
- package/dist/compat/object/entries.d.ts +1 -0
- package/dist/compat/object/entries.js +1 -0
- package/dist/compat/object/entries.mjs +1 -0
- package/dist/compat/object/entriesIn.d.mts +1 -0
- package/dist/compat/object/entriesIn.d.ts +1 -0
- package/dist/compat/object/entriesIn.js +1 -0
- package/dist/compat/object/entriesIn.mjs +1 -0
- package/dist/compat/object/omit.js +5 -5
- package/dist/compat/object/omit.mjs +5 -5
- package/dist/compat/object/transform.js +1 -1
- package/dist/compat/object/transform.mjs +1 -1
- package/dist/compat/object/updateWith.js +2 -2
- package/dist/compat/object/updateWith.mjs +2 -2
- package/dist/compat/predicate/isMatchWith.js +14 -5
- package/dist/compat/predicate/isMatchWith.mjs +14 -5
- package/dist/compat/string/template.js +2 -1
- package/dist/compat/string/template.mjs +2 -1
- package/dist/compat/string/words.js +17 -13
- package/dist/compat/string/words.mjs +17 -13
- package/dist/compat/util/iteratee.js +1 -3
- package/dist/compat/util/iteratee.mjs +1 -3
- package/dist/compat/util/toArray.d.mts +5 -5
- package/dist/compat/util/toArray.d.ts +5 -5
- package/dist/compat/util/toArray.js +9 -5
- package/dist/compat/util/toArray.mjs +9 -5
- package/dist/compat/util/toPath.js +11 -3
- package/dist/compat/util/toPath.mjs +11 -3
- package/dist/compat/util/toString.js +4 -1
- package/dist/compat/util/toString.mjs +4 -1
- package/dist/fp/array/at.d.mts +1 -1
- package/dist/fp/array/at.d.ts +1 -1
- package/dist/fp/array/orderBy.d.mts +1 -1
- package/dist/fp/array/orderBy.d.ts +1 -1
- package/dist/fp/array/sortBy.d.mts +1 -1
- package/dist/fp/array/sortBy.d.ts +1 -1
- package/dist/fp/array/unzip.d.mts +3 -0
- package/dist/fp/array/unzip.d.ts +3 -0
- package/dist/fp/array/unzip.js +3 -0
- package/dist/fp/array/unzip.mjs +3 -0
- package/dist/function/memoize.d.mts +3 -2
- package/dist/function/memoize.d.ts +3 -2
- package/dist/function/memoize.js +3 -2
- package/dist/function/memoize.mjs +3 -2
- package/dist/function/partial.d.mts +2 -2
- package/dist/function/partial.d.ts +2 -2
- package/dist/function/partialRight.d.mts +5 -5
- package/dist/function/partialRight.d.ts +5 -5
- package/dist/function/rest.d.mts +1 -1
- package/dist/function/rest.d.ts +1 -1
- package/dist/function/rest.js +1 -1
- package/dist/function/rest.mjs +1 -1
- package/dist/function/retry.d.mts +7 -4
- package/dist/function/retry.d.ts +7 -4
- package/dist/function/retry.js +4 -2
- package/dist/function/retry.mjs +1 -1
- package/dist/index.d.mts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +18 -4
- package/dist/index.mjs +12 -5
- package/dist/object/cloneDeepWith.d.mts +3 -1
- package/dist/object/cloneDeepWith.d.ts +3 -1
- package/dist/object/cloneDeepWith.js +3 -1
- package/dist/object/cloneDeepWith.mjs +3 -1
- package/dist/object/deepFreeze.d.mts +20 -0
- package/dist/object/deepFreeze.d.ts +20 -0
- package/dist/object/deepFreeze.js +29 -0
- package/dist/object/deepFreeze.mjs +29 -0
- package/dist/object/flattenObject.d.mts +16 -1
- package/dist/object/flattenObject.d.ts +16 -1
- package/dist/object/flattenObject.js +15 -6
- package/dist/object/flattenObject.mjs +15 -6
- package/dist/object/index.d.mts +7 -1
- package/dist/object/index.d.ts +7 -1
- package/dist/object/index.js +12 -0
- package/dist/object/index.mjs +7 -1
- package/dist/object/mapKeysAsync.d.mts +25 -0
- package/dist/object/mapKeysAsync.d.ts +25 -0
- package/dist/object/mapKeysAsync.js +32 -0
- package/dist/object/mapKeysAsync.mjs +32 -0
- package/dist/object/mapValuesAsync.d.mts +26 -0
- package/dist/object/mapValuesAsync.d.ts +26 -0
- package/dist/object/mapValuesAsync.js +32 -0
- package/dist/object/mapValuesAsync.mjs +32 -0
- package/dist/object/merge.js +2 -4
- package/dist/object/merge.mjs +1 -3
- package/dist/object/mergeWith.js +4 -4
- package/dist/object/mergeWith.mjs +4 -4
- package/dist/object/toCamelCaseKeys.d.mts +2 -6
- package/dist/object/toCamelCaseKeys.d.ts +2 -6
- package/dist/object/toConstantCaseKeys.d.mts +52 -0
- package/dist/object/toConstantCaseKeys.d.ts +52 -0
- package/dist/object/toConstantCaseKeys.js +66 -0
- package/dist/object/toConstantCaseKeys.mjs +66 -0
- package/dist/object/toKebabCaseKeys.d.mts +52 -0
- package/dist/object/toKebabCaseKeys.d.ts +52 -0
- package/dist/object/toKebabCaseKeys.js +66 -0
- package/dist/object/toKebabCaseKeys.mjs +66 -0
- package/dist/object/toMerged.js +4 -4
- package/dist/object/toMerged.mjs +4 -4
- package/dist/object/toPascalCaseKeys.d.mts +52 -0
- package/dist/object/toPascalCaseKeys.d.ts +52 -0
- package/dist/object/toPascalCaseKeys.js +66 -0
- package/dist/object/toPascalCaseKeys.mjs +66 -0
- package/dist/object/toSnakeCaseKeys.d.mts +2 -3
- package/dist/object/toSnakeCaseKeys.d.ts +2 -3
- package/dist/promise/index.d.mts +2 -1
- package/dist/promise/index.d.ts +2 -1
- package/dist/promise/index.js +2 -0
- package/dist/promise/index.mjs +2 -1
- package/dist/promise/limitAsync.d.mts +35 -0
- package/dist/promise/limitAsync.d.ts +35 -0
- package/dist/promise/limitAsync.js +46 -0
- package/dist/promise/limitAsync.mjs +46 -0
- package/dist/string/dedent.d.mts +37 -0
- package/dist/string/dedent.d.ts +37 -0
- package/dist/string/dedent.js +38 -0
- package/dist/string/dedent.mjs +38 -0
- package/dist/string/index.d.mts +2 -1
- package/dist/string/index.d.ts +2 -1
- package/dist/string/index.js +5 -3
- package/dist/string/index.mjs +5 -4
- package/dist/types/ToCamelCaseKeys.d.mts +24 -0
- package/dist/types/ToCamelCaseKeys.d.ts +24 -0
- package/dist/types/ToConstantCaseKeys.d.mts +21 -0
- package/dist/types/ToConstantCaseKeys.d.ts +21 -0
- package/dist/types/ToKebabCaseKeys.d.mts +23 -0
- package/dist/types/ToKebabCaseKeys.d.ts +23 -0
- package/dist/types/ToPascalCaseKeys.d.mts +24 -0
- package/dist/types/ToPascalCaseKeys.d.ts +24 -0
- package/dist/types/ToSnakeCaseKeys.d.mts +21 -0
- package/dist/types/ToSnakeCaseKeys.d.ts +21 -0
- package/dist/types/index.d.mts +6 -1
- package/dist/types/index.d.ts +6 -1
- package/package.json +27 -2
package/dist/compat/index.d.mts
CHANGED
|
@@ -150,6 +150,8 @@ import { cloneWith } from "./object/cloneWith.mjs";
|
|
|
150
150
|
import { create } from "./object/create.mjs";
|
|
151
151
|
import { defaults } from "./object/defaults.mjs";
|
|
152
152
|
import { defaultsDeep } from "./object/defaultsDeep.mjs";
|
|
153
|
+
import { toPairs } from "./object/toPairs.mjs";
|
|
154
|
+
import { toPairsIn } from "./object/toPairsIn.mjs";
|
|
153
155
|
import { findKey } from "./object/findKey.mjs";
|
|
154
156
|
import { findLastKey } from "./object/findLastKey.mjs";
|
|
155
157
|
import { forIn } from "./object/forIn.mjs";
|
|
@@ -180,8 +182,6 @@ import { result } from "./object/result.mjs";
|
|
|
180
182
|
import { set } from "./object/set.mjs";
|
|
181
183
|
import { setWith } from "./object/setWith.mjs";
|
|
182
184
|
import { toDefaulted } from "./object/toDefaulted.mjs";
|
|
183
|
-
import { toPairs } from "./object/toPairs.mjs";
|
|
184
|
-
import { toPairsIn } from "./object/toPairsIn.mjs";
|
|
185
185
|
import { transform } from "./object/transform.mjs";
|
|
186
186
|
import { unset } from "./object/unset.mjs";
|
|
187
187
|
import { update } from "./object/update.mjs";
|
|
@@ -291,4 +291,4 @@ import { toPlainObject } from "./util/toPlainObject.mjs";
|
|
|
291
291
|
import { toSafeInteger } from "./util/toSafeInteger.mjs";
|
|
292
292
|
import { toString } from "./util/toString.mjs";
|
|
293
293
|
import { uniqueId } from "./util/uniqueId.mjs";
|
|
294
|
-
export { DebouncedFunc, add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, toolkit as default, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith, eq, escape, escapeRegExp, every, assignIn as extend, assignInWith as extendWith, fill, filter, find, findIndex, findKey, findLast, findLastIndex, findLastKey, head as first, flatMap, flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, floor, flow, flowRight, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, fromPairs, functions, functionsIn, get, groupBy, gt, gte, has, hasIn, head, identity, inRange, includes, indexOf, initial, intersection, intersectionBy, intersectionWith, invert, invertBy, invoke, invokeMap, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, join, kebabCase, keyBy, keys, keysIn, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, map, mapKeys, mapValues, matches, matchesProperty, max, maxBy, mean, meanBy, memoize, merge, mergeWith, method, methodOf, min, minBy, multiply, negate, noop, now, nth, nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, pad, padEnd, padStart, parseInt, partial, partialRight, partition, pick, pickBy, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt, random, range, rangeRight, rearg, reduce, reduceRight, reject, remove, repeat, replace, rest, result, reverse, round, sample, sampleSize, set, setWith, shuffle, size, slice, snakeCase, some, sortBy, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, split, spread, startCase, startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, template, templateSettings, throttle, times, toArray, toDefaulted, toFinite, toInteger, toLength, toLower, toNumber, toPairs, toPairsIn, toPath, toPlainObject, toSafeInteger, toString, toUpper, transform, trim, trimEnd, trimStart, truncate, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, uniqueId, unset, unzip, unzipWith, update, updateWith, upperCase, upperFirst, values, valuesIn, without, words, wrap, xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, zipWith };
|
|
294
|
+
export { DebouncedFunc, add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, toolkit as default, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith, toPairs as entries, toPairsIn as entriesIn, eq, escape, escapeRegExp, every, assignIn as extend, assignInWith as extendWith, fill, filter, find, findIndex, findKey, findLast, findLastIndex, findLastKey, head as first, flatMap, flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, floor, flow, flowRight, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, fromPairs, functions, functionsIn, get, groupBy, gt, gte, has, hasIn, head, identity, inRange, includes, indexOf, initial, intersection, intersectionBy, intersectionWith, invert, invertBy, invoke, invokeMap, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, join, kebabCase, keyBy, keys, keysIn, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, map, mapKeys, mapValues, matches, matchesProperty, max, maxBy, mean, meanBy, memoize, merge, mergeWith, method, methodOf, min, minBy, multiply, negate, noop, now, nth, nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, pad, padEnd, padStart, parseInt, partial, partialRight, partition, pick, pickBy, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt, random, range, rangeRight, rearg, reduce, reduceRight, reject, remove, repeat, replace, rest, result, reverse, round, sample, sampleSize, set, setWith, shuffle, size, slice, snakeCase, some, sortBy, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, split, spread, startCase, startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, template, templateSettings, throttle, times, toArray, toDefaulted, toFinite, toInteger, toLength, toLower, toNumber, toPairs, toPairsIn, toPath, toPlainObject, toSafeInteger, toString, toUpper, transform, trim, trimEnd, trimStart, truncate, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, uniqueId, unset, unzip, unzipWith, update, updateWith, upperCase, upperFirst, values, valuesIn, without, words, wrap, xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, zipWith };
|
package/dist/compat/index.d.ts
CHANGED
|
@@ -150,6 +150,8 @@ import { cloneWith } from "./object/cloneWith.js";
|
|
|
150
150
|
import { create } from "./object/create.js";
|
|
151
151
|
import { defaults } from "./object/defaults.js";
|
|
152
152
|
import { defaultsDeep } from "./object/defaultsDeep.js";
|
|
153
|
+
import { toPairs } from "./object/toPairs.js";
|
|
154
|
+
import { toPairsIn } from "./object/toPairsIn.js";
|
|
153
155
|
import { findKey } from "./object/findKey.js";
|
|
154
156
|
import { findLastKey } from "./object/findLastKey.js";
|
|
155
157
|
import { forIn } from "./object/forIn.js";
|
|
@@ -180,8 +182,6 @@ import { result } from "./object/result.js";
|
|
|
180
182
|
import { set } from "./object/set.js";
|
|
181
183
|
import { setWith } from "./object/setWith.js";
|
|
182
184
|
import { toDefaulted } from "./object/toDefaulted.js";
|
|
183
|
-
import { toPairs } from "./object/toPairs.js";
|
|
184
|
-
import { toPairsIn } from "./object/toPairsIn.js";
|
|
185
185
|
import { transform } from "./object/transform.js";
|
|
186
186
|
import { unset } from "./object/unset.js";
|
|
187
187
|
import { update } from "./object/update.js";
|
|
@@ -291,4 +291,4 @@ import { toPlainObject } from "./util/toPlainObject.js";
|
|
|
291
291
|
import { toSafeInteger } from "./util/toSafeInteger.js";
|
|
292
292
|
import { toString } from "./util/toString.js";
|
|
293
293
|
import { uniqueId } from "./util/uniqueId.js";
|
|
294
|
-
export { DebouncedFunc, add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, toolkit as default, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith, eq, escape, escapeRegExp, every, assignIn as extend, assignInWith as extendWith, fill, filter, find, findIndex, findKey, findLast, findLastIndex, findLastKey, head as first, flatMap, flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, floor, flow, flowRight, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, fromPairs, functions, functionsIn, get, groupBy, gt, gte, has, hasIn, head, identity, inRange, includes, indexOf, initial, intersection, intersectionBy, intersectionWith, invert, invertBy, invoke, invokeMap, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, join, kebabCase, keyBy, keys, keysIn, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, map, mapKeys, mapValues, matches, matchesProperty, max, maxBy, mean, meanBy, memoize, merge, mergeWith, method, methodOf, min, minBy, multiply, negate, noop, now, nth, nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, pad, padEnd, padStart, parseInt, partial, partialRight, partition, pick, pickBy, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt, random, range, rangeRight, rearg, reduce, reduceRight, reject, remove, repeat, replace, rest, result, reverse, round, sample, sampleSize, set, setWith, shuffle, size, slice, snakeCase, some, sortBy, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, split, spread, startCase, startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, template, templateSettings, throttle, times, toArray, toDefaulted, toFinite, toInteger, toLength, toLower, toNumber, toPairs, toPairsIn, toPath, toPlainObject, toSafeInteger, toString, toUpper, transform, trim, trimEnd, trimStart, truncate, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, uniqueId, unset, unzip, unzipWith, update, updateWith, upperCase, upperFirst, values, valuesIn, without, words, wrap, xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, zipWith };
|
|
294
|
+
export { DebouncedFunc, add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, toolkit as default, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith, toPairs as entries, toPairsIn as entriesIn, eq, escape, escapeRegExp, every, assignIn as extend, assignInWith as extendWith, fill, filter, find, findIndex, findKey, findLast, findLastIndex, findLastKey, head as first, flatMap, flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, floor, flow, flowRight, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, fromPairs, functions, functionsIn, get, groupBy, gt, gte, has, hasIn, head, identity, inRange, includes, indexOf, initial, intersection, intersectionBy, intersectionWith, invert, invertBy, invoke, invokeMap, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, join, kebabCase, keyBy, keys, keysIn, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, map, mapKeys, mapValues, matches, matchesProperty, max, maxBy, mean, meanBy, memoize, merge, mergeWith, method, methodOf, min, minBy, multiply, negate, noop, now, nth, nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, pad, padEnd, padStart, parseInt, partial, partialRight, partition, pick, pickBy, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt, random, range, rangeRight, rearg, reduce, reduceRight, reject, remove, repeat, replace, rest, result, reverse, round, sample, sampleSize, set, setWith, shuffle, size, slice, snakeCase, some, sortBy, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, split, spread, startCase, startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, template, templateSettings, throttle, times, toArray, toDefaulted, toFinite, toInteger, toLength, toLower, toNumber, toPairs, toPairsIn, toPath, toPlainObject, toSafeInteger, toString, toUpper, transform, trim, trimEnd, trimStart, truncate, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, uniqueId, unset, unzip, unzipWith, update, updateWith, upperCase, upperFirst, values, valuesIn, without, words, wrap, xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, zipWith };
|
package/dist/compat/index.js
CHANGED
|
@@ -54,8 +54,8 @@ const require_findLastIndex = require("./array/findLastIndex.js");
|
|
|
54
54
|
const require_head = require("./array/head.js");
|
|
55
55
|
const require_flattenDepth = require("./array/flattenDepth.js");
|
|
56
56
|
const require_map = require("./array/map.js");
|
|
57
|
-
const require_flatMap = require("./array/flatMap.js");
|
|
58
57
|
const require_flatMapDepth = require("./array/flatMapDepth.js");
|
|
58
|
+
const require_flatMap = require("./array/flatMap.js");
|
|
59
59
|
const require_flatMapDeep = require("./array/flatMapDeep.js");
|
|
60
60
|
const require_flatten = require("./array/flatten.js");
|
|
61
61
|
const require_flattenDeep = require("./array/flattenDeep.js");
|
|
@@ -65,7 +65,6 @@ const require_indexOf = require("./array/indexOf.js");
|
|
|
65
65
|
const require_initial = require("./array/initial.js");
|
|
66
66
|
const require_intersection = require("./array/intersection.js");
|
|
67
67
|
const require_intersectionBy = require("./array/intersectionBy.js");
|
|
68
|
-
const require_uniq = require("./array/uniq.js");
|
|
69
68
|
const require_intersectionWith = require("./array/intersectionWith.js");
|
|
70
69
|
const require_invokeMap = require("./array/invokeMap.js");
|
|
71
70
|
const require_join = require("./array/join.js");
|
|
@@ -119,6 +118,7 @@ const require_takeWhile = require("./array/takeWhile.js");
|
|
|
119
118
|
const require_union = require("./array/union.js");
|
|
120
119
|
const require_unionBy = require("./array/unionBy.js");
|
|
121
120
|
const require_unionWith = require("./array/unionWith.js");
|
|
121
|
+
const require_uniq = require("./array/uniq.js");
|
|
122
122
|
const require_uniqBy = require("./array/uniqBy.js");
|
|
123
123
|
const require_uniqWith = require("./array/uniqWith.js");
|
|
124
124
|
const require_unzip = require("./array/unzip.js");
|
|
@@ -190,6 +190,8 @@ const require_cloneWith = require("./object/cloneWith.js");
|
|
|
190
190
|
const require_create = require("./object/create.js");
|
|
191
191
|
const require_defaults = require("./object/defaults.js");
|
|
192
192
|
const require_defaultsDeep = require("./object/defaultsDeep.js");
|
|
193
|
+
const require_toPairs = require("./object/toPairs.js");
|
|
194
|
+
const require_toPairsIn = require("./object/toPairsIn.js");
|
|
193
195
|
const require_findKey = require("./object/findKey.js");
|
|
194
196
|
const require_findLastKey = require("./object/findLastKey.js");
|
|
195
197
|
const require_forIn = require("./object/forIn.js");
|
|
@@ -214,8 +216,6 @@ const require_propertyOf = require("./object/propertyOf.js");
|
|
|
214
216
|
const require_result = require("./object/result.js");
|
|
215
217
|
const require_setWith = require("./object/setWith.js");
|
|
216
218
|
const require_toDefaulted = require("./object/toDefaulted.js");
|
|
217
|
-
const require_toPairs = require("./object/toPairs.js");
|
|
218
|
-
const require_toPairsIn = require("./object/toPairsIn.js");
|
|
219
219
|
const require_isBuffer = require("./predicate/isBuffer.js");
|
|
220
220
|
const require_transform = require("./object/transform.js");
|
|
221
221
|
const require_update = require("./object/update.js");
|
|
@@ -348,6 +348,8 @@ exports.dropWhile = require_dropWhile.dropWhile;
|
|
|
348
348
|
exports.each = require_forEach.forEach;
|
|
349
349
|
exports.eachRight = require_forEachRight.forEachRight;
|
|
350
350
|
exports.endsWith = require_endsWith.endsWith;
|
|
351
|
+
exports.entries = require_toPairs.toPairs;
|
|
352
|
+
exports.entriesIn = require_toPairsIn.toPairsIn;
|
|
351
353
|
exports.eq = require_eq.eq;
|
|
352
354
|
exports.escape = require_escape.escape;
|
|
353
355
|
exports.escapeRegExp = require_escapeRegExp.escapeRegExp;
|
package/dist/compat/index.mjs
CHANGED
|
@@ -50,8 +50,8 @@ import { findLastIndex } from "./array/findLastIndex.mjs";
|
|
|
50
50
|
import { head } from "./array/head.mjs";
|
|
51
51
|
import { flattenDepth } from "./array/flattenDepth.mjs";
|
|
52
52
|
import { map } from "./array/map.mjs";
|
|
53
|
-
import { flatMap } from "./array/flatMap.mjs";
|
|
54
53
|
import { flatMapDepth } from "./array/flatMapDepth.mjs";
|
|
54
|
+
import { flatMap } from "./array/flatMap.mjs";
|
|
55
55
|
import { flatMapDeep } from "./array/flatMapDeep.mjs";
|
|
56
56
|
import { flatten } from "./array/flatten.mjs";
|
|
57
57
|
import { flattenDeep } from "./array/flattenDeep.mjs";
|
|
@@ -61,7 +61,6 @@ import { indexOf } from "./array/indexOf.mjs";
|
|
|
61
61
|
import { initial } from "./array/initial.mjs";
|
|
62
62
|
import { intersection } from "./array/intersection.mjs";
|
|
63
63
|
import { intersectionBy } from "./array/intersectionBy.mjs";
|
|
64
|
-
import { uniq } from "./array/uniq.mjs";
|
|
65
64
|
import { intersectionWith } from "./array/intersectionWith.mjs";
|
|
66
65
|
import { invokeMap } from "./array/invokeMap.mjs";
|
|
67
66
|
import { join } from "./array/join.mjs";
|
|
@@ -115,6 +114,7 @@ import { takeWhile } from "./array/takeWhile.mjs";
|
|
|
115
114
|
import { union } from "./array/union.mjs";
|
|
116
115
|
import { unionBy } from "./array/unionBy.mjs";
|
|
117
116
|
import { unionWith } from "./array/unionWith.mjs";
|
|
117
|
+
import { uniq } from "./array/uniq.mjs";
|
|
118
118
|
import { uniqBy } from "./array/uniqBy.mjs";
|
|
119
119
|
import { uniqWith } from "./array/uniqWith.mjs";
|
|
120
120
|
import { unzip } from "./array/unzip.mjs";
|
|
@@ -186,6 +186,8 @@ import { cloneWith } from "./object/cloneWith.mjs";
|
|
|
186
186
|
import { create } from "./object/create.mjs";
|
|
187
187
|
import { defaults } from "./object/defaults.mjs";
|
|
188
188
|
import { defaultsDeep } from "./object/defaultsDeep.mjs";
|
|
189
|
+
import { toPairs } from "./object/toPairs.mjs";
|
|
190
|
+
import { toPairsIn } from "./object/toPairsIn.mjs";
|
|
189
191
|
import { findKey } from "./object/findKey.mjs";
|
|
190
192
|
import { findLastKey } from "./object/findLastKey.mjs";
|
|
191
193
|
import { forIn } from "./object/forIn.mjs";
|
|
@@ -210,8 +212,6 @@ import { propertyOf } from "./object/propertyOf.mjs";
|
|
|
210
212
|
import { result } from "./object/result.mjs";
|
|
211
213
|
import { setWith } from "./object/setWith.mjs";
|
|
212
214
|
import { toDefaulted } from "./object/toDefaulted.mjs";
|
|
213
|
-
import { toPairs } from "./object/toPairs.mjs";
|
|
214
|
-
import { toPairsIn } from "./object/toPairsIn.mjs";
|
|
215
215
|
import { isBuffer } from "./predicate/isBuffer.mjs";
|
|
216
216
|
import { transform } from "./object/transform.mjs";
|
|
217
217
|
import { update } from "./object/update.mjs";
|
|
@@ -292,4 +292,4 @@ import { toSafeInteger } from "./util/toSafeInteger.mjs";
|
|
|
292
292
|
import { uniqueId } from "./util/uniqueId.mjs";
|
|
293
293
|
import "./compat.mjs";
|
|
294
294
|
import { toolkit } from "./toolkit.mjs";
|
|
295
|
-
export { add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, toolkit as default, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith, eq, escape, escapeRegExp, every, assignIn as extend, assignInWith as extendWith, fill, filter, find, findIndex, findKey, findLast, findLastIndex, findLastKey, head as first, flatMap, flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, floor, flow, flowRight, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, fromPairs, functions, functionsIn, get, groupBy, gt, gte, has, hasIn, head, identity, inRange, includes, indexOf, initial, intersection, intersectionBy, intersectionWith, invert, invertBy, invoke, invokeMap, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, join, kebabCase, keyBy, keys, keysIn, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, map, mapKeys, mapValues, matches, matchesProperty, max, maxBy, mean, meanBy, memoize, merge, mergeWith, method, methodOf, min, minBy, multiply, negate, noop, now, nth, nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, pad, padEnd, padStart, parseInt, partial, partialRight, partition, pick, pickBy, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt, random, range, rangeRight, rearg, reduce, reduceRight, reject, remove, repeat, replace, rest, result, reverse, round, sample, sampleSize, set, setWith, shuffle, size, slice, snakeCase, some, sortBy, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, split, spread, startCase, startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, template, templateSettings, throttle, times, toArray, toDefaulted, toFinite, toInteger, toLength, toLower, toNumber, toPairs, toPairsIn, toPath, toPlainObject, toSafeInteger, toString, toUpper, transform, trim, trimEnd, trimStart, truncate, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, uniqueId, unset, unzip, unzipWith, update, updateWith, upperCase, upperFirst, values, valuesIn, without, words, wrap, xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, zipWith };
|
|
295
|
+
export { add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, toolkit as default, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith, toPairs as entries, toPairsIn as entriesIn, eq, escape, escapeRegExp, every, assignIn as extend, assignInWith as extendWith, fill, filter, find, findIndex, findKey, findLast, findLastIndex, findLastKey, head as first, flatMap, flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, floor, flow, flowRight, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, fromPairs, functions, functionsIn, get, groupBy, gt, gte, has, hasIn, head, identity, inRange, includes, indexOf, initial, intersection, intersectionBy, intersectionWith, invert, invertBy, invoke, invokeMap, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, join, kebabCase, keyBy, keys, keysIn, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, map, mapKeys, mapValues, matches, matchesProperty, max, maxBy, mean, meanBy, memoize, merge, mergeWith, method, methodOf, min, minBy, multiply, negate, noop, now, nth, nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, pad, padEnd, padStart, parseInt, partial, partialRight, partition, pick, pickBy, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt, random, range, rangeRight, rearg, reduce, reduceRight, reject, remove, repeat, replace, rest, result, reverse, round, sample, sampleSize, set, setWith, shuffle, size, slice, snakeCase, some, sortBy, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, split, spread, startCase, startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, template, templateSettings, throttle, times, toArray, toDefaulted, toFinite, toInteger, toLength, toLower, toNumber, toPairs, toPairsIn, toPath, toPlainObject, toSafeInteger, toString, toUpper, transform, trim, trimEnd, trimStart, truncate, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, uniqueId, unset, unzip, unzipWith, update, updateWith, upperCase, upperFirst, values, valuesIn, without, words, wrap, xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, zipWith };
|
|
@@ -40,7 +40,7 @@ function maxBy(items, iteratee$1 = require_identity.identity) {
|
|
|
40
40
|
for (let i = 0; i < array.length; i++) {
|
|
41
41
|
const element = array[i];
|
|
42
42
|
const current = getValue(element, i, array);
|
|
43
|
-
if (Number.isNaN(current)) continue;
|
|
43
|
+
if (current == null || Number.isNaN(current) || typeof current === "symbol") continue;
|
|
44
44
|
if (max === void 0 || current > max) {
|
|
45
45
|
max = current;
|
|
46
46
|
maxElement = element;
|
|
@@ -40,7 +40,7 @@ function maxBy(items, iteratee$1 = identity) {
|
|
|
40
40
|
for (let i = 0; i < array.length; i++) {
|
|
41
41
|
const element = array[i];
|
|
42
42
|
const current = getValue(element, i, array);
|
|
43
|
-
if (Number.isNaN(current)) continue;
|
|
43
|
+
if (current == null || Number.isNaN(current) || typeof current === "symbol") continue;
|
|
44
44
|
if (max === void 0 || current > max) {
|
|
45
45
|
max = current;
|
|
46
46
|
maxElement = element;
|
|
@@ -7,6 +7,9 @@ import { ValueIteratee } from "../_internal/ValueIteratee.mjs";
|
|
|
7
7
|
*
|
|
8
8
|
* If the array is empty, this function returns `NaN`.
|
|
9
9
|
*
|
|
10
|
+
* If the key is missing or the value is `undefined`, it is treated as `0`.
|
|
11
|
+
* However, if every value is `undefined`, the result is `NaN`.
|
|
12
|
+
*
|
|
10
13
|
* @template T - The type of elements in the array.
|
|
11
14
|
* @param items An array to calculate the average.
|
|
12
15
|
* @param iteratee
|
|
@@ -22,6 +25,7 @@ import { ValueIteratee } from "../_internal/ValueIteratee.mjs";
|
|
|
22
25
|
* meanBy([], x => x.a); // Returns: NaN
|
|
23
26
|
* meanBy([[2], [3], [1]], 0); // Returns: 2
|
|
24
27
|
* meanBy([{ a: 2 }, { a: 3 }, { a: 1 }], 'a'); // Returns: 2
|
|
28
|
+
* meanBy([{ a: 1 }, {}], 'a'); // Returns: 0.5
|
|
25
29
|
*/
|
|
26
30
|
declare function meanBy<T>(items: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): number;
|
|
27
31
|
//#endregion
|
|
@@ -7,6 +7,9 @@ import { ValueIteratee } from "../_internal/ValueIteratee.js";
|
|
|
7
7
|
*
|
|
8
8
|
* If the array is empty, this function returns `NaN`.
|
|
9
9
|
*
|
|
10
|
+
* If the key is missing or the value is `undefined`, it is treated as `0`.
|
|
11
|
+
* However, if every value is `undefined`, the result is `NaN`.
|
|
12
|
+
*
|
|
10
13
|
* @template T - The type of elements in the array.
|
|
11
14
|
* @param items An array to calculate the average.
|
|
12
15
|
* @param iteratee
|
|
@@ -22,6 +25,7 @@ import { ValueIteratee } from "../_internal/ValueIteratee.js";
|
|
|
22
25
|
* meanBy([], x => x.a); // Returns: NaN
|
|
23
26
|
* meanBy([[2], [3], [1]], 0); // Returns: 2
|
|
24
27
|
* meanBy([{ a: 2 }, { a: 3 }, { a: 1 }], 'a'); // Returns: 2
|
|
28
|
+
* meanBy([{ a: 1 }, {}], 'a'); // Returns: 0.5
|
|
25
29
|
*/
|
|
26
30
|
declare function meanBy<T>(items: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): number;
|
|
27
31
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_identity = require("../../function/identity.js");
|
|
2
|
-
const require_meanBy = require("../../math/meanBy.js");
|
|
3
2
|
const require_iteratee = require("../util/iteratee.js");
|
|
3
|
+
const require_sumBy = require("./sumBy.js");
|
|
4
4
|
//#region src/compat/math/meanBy.ts
|
|
5
5
|
/**
|
|
6
6
|
* Calculates the average of an array of numbers when applying
|
|
@@ -8,6 +8,9 @@ const require_iteratee = require("../util/iteratee.js");
|
|
|
8
8
|
*
|
|
9
9
|
* If the array is empty, this function returns `NaN`.
|
|
10
10
|
*
|
|
11
|
+
* If the key is missing or the value is `undefined`, it is treated as `0`.
|
|
12
|
+
* However, if every value is `undefined`, the result is `NaN`.
|
|
13
|
+
*
|
|
11
14
|
* @template T - The type of elements in the array.
|
|
12
15
|
* @param items An array to calculate the average.
|
|
13
16
|
* @param iteratee
|
|
@@ -23,10 +26,12 @@ const require_iteratee = require("../util/iteratee.js");
|
|
|
23
26
|
* meanBy([], x => x.a); // Returns: NaN
|
|
24
27
|
* meanBy([[2], [3], [1]], 0); // Returns: 2
|
|
25
28
|
* meanBy([{ a: 2 }, { a: 3 }, { a: 1 }], 'a'); // Returns: 2
|
|
29
|
+
* meanBy([{ a: 1 }, {}], 'a'); // Returns: 0.5
|
|
26
30
|
*/
|
|
27
31
|
function meanBy(items, iteratee$1) {
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
const length = items == null ? 0 : items.length;
|
|
33
|
+
if (!length) return NaN;
|
|
34
|
+
return require_sumBy.sumBy(items, require_iteratee.iteratee(iteratee$1 ?? require_identity.identity)) / length;
|
|
30
35
|
}
|
|
31
36
|
//#endregion
|
|
32
37
|
exports.meanBy = meanBy;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { identity } from "../../function/identity.mjs";
|
|
2
|
-
import { meanBy as meanBy$1 } from "../../math/meanBy.mjs";
|
|
3
2
|
import { iteratee } from "../util/iteratee.mjs";
|
|
3
|
+
import { sumBy } from "./sumBy.mjs";
|
|
4
4
|
//#region src/compat/math/meanBy.ts
|
|
5
5
|
/**
|
|
6
6
|
* Calculates the average of an array of numbers when applying
|
|
@@ -8,6 +8,9 @@ import { iteratee } from "../util/iteratee.mjs";
|
|
|
8
8
|
*
|
|
9
9
|
* If the array is empty, this function returns `NaN`.
|
|
10
10
|
*
|
|
11
|
+
* If the key is missing or the value is `undefined`, it is treated as `0`.
|
|
12
|
+
* However, if every value is `undefined`, the result is `NaN`.
|
|
13
|
+
*
|
|
11
14
|
* @template T - The type of elements in the array.
|
|
12
15
|
* @param items An array to calculate the average.
|
|
13
16
|
* @param iteratee
|
|
@@ -23,10 +26,12 @@ import { iteratee } from "../util/iteratee.mjs";
|
|
|
23
26
|
* meanBy([], x => x.a); // Returns: NaN
|
|
24
27
|
* meanBy([[2], [3], [1]], 0); // Returns: 2
|
|
25
28
|
* meanBy([{ a: 2 }, { a: 3 }, { a: 1 }], 'a'); // Returns: 2
|
|
29
|
+
* meanBy([{ a: 1 }, {}], 'a'); // Returns: 0.5
|
|
26
30
|
*/
|
|
27
31
|
function meanBy(items, iteratee$1) {
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
const length = items == null ? 0 : items.length;
|
|
33
|
+
if (!length) return NaN;
|
|
34
|
+
return sumBy(items, iteratee(iteratee$1 ?? identity)) / length;
|
|
30
35
|
}
|
|
31
36
|
//#endregion
|
|
32
37
|
export { meanBy };
|
|
@@ -40,7 +40,7 @@ function minBy(items, iteratee$1 = require_identity.identity) {
|
|
|
40
40
|
for (let i = 0; i < array.length; i++) {
|
|
41
41
|
const element = array[i];
|
|
42
42
|
const current = getValue(element, i, array);
|
|
43
|
-
if (Number.isNaN(current)) continue;
|
|
43
|
+
if (current == null || Number.isNaN(current) || typeof current === "symbol") continue;
|
|
44
44
|
if (min === void 0 || current < min) {
|
|
45
45
|
min = current;
|
|
46
46
|
minElement = element;
|
|
@@ -40,7 +40,7 @@ function minBy(items, iteratee$1 = identity) {
|
|
|
40
40
|
for (let i = 0; i < array.length; i++) {
|
|
41
41
|
const element = array[i];
|
|
42
42
|
const current = getValue(element, i, array);
|
|
43
|
-
if (Number.isNaN(current)) continue;
|
|
43
|
+
if (current == null || Number.isNaN(current) || typeof current === "symbol") continue;
|
|
44
44
|
if (min === void 0 || current < min) {
|
|
45
45
|
min = current;
|
|
46
46
|
minElement = element;
|
|
@@ -16,30 +16,30 @@
|
|
|
16
16
|
* @example
|
|
17
17
|
* // Clone an array
|
|
18
18
|
* const arr = [1, 2, 3];
|
|
19
|
-
* const clonedArr =
|
|
19
|
+
* const clonedArr = cloneDeep(arr);
|
|
20
20
|
* console.log(clonedArr); // [1, 2, 3]
|
|
21
21
|
* console.log(clonedArr === arr); // false
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* // Clone an array with nested objects
|
|
25
25
|
* const arr = [1, { a: 1 }, [1, 2, 3]];
|
|
26
|
-
* const clonedArr =
|
|
26
|
+
* const clonedArr = cloneDeep(arr);
|
|
27
27
|
* arr[1].a = 2;
|
|
28
|
-
* console.log(arr); // [
|
|
28
|
+
* console.log(arr); // [1, { a: 2 }, [1, 2, 3]]
|
|
29
29
|
* console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]
|
|
30
30
|
* console.log(clonedArr === arr); // false
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
33
|
* // Clone an object
|
|
34
34
|
* const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
|
|
35
|
-
* const clonedObj =
|
|
35
|
+
* const clonedObj = cloneDeep(obj);
|
|
36
36
|
* console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
|
|
37
37
|
* console.log(clonedObj === obj); // false
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
40
|
* // Clone an object with nested objects
|
|
41
41
|
* const obj = { a: 1, b: { c: 1 } };
|
|
42
|
-
* const clonedObj =
|
|
42
|
+
* const clonedObj = cloneDeep(obj);
|
|
43
43
|
* obj.b.c = 2;
|
|
44
44
|
* console.log(obj); // { a: 1, b: { c: 2 } }
|
|
45
45
|
* console.log(clonedObj); // { a: 1, b: { c: 1 } }
|
|
@@ -16,30 +16,30 @@
|
|
|
16
16
|
* @example
|
|
17
17
|
* // Clone an array
|
|
18
18
|
* const arr = [1, 2, 3];
|
|
19
|
-
* const clonedArr =
|
|
19
|
+
* const clonedArr = cloneDeep(arr);
|
|
20
20
|
* console.log(clonedArr); // [1, 2, 3]
|
|
21
21
|
* console.log(clonedArr === arr); // false
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* // Clone an array with nested objects
|
|
25
25
|
* const arr = [1, { a: 1 }, [1, 2, 3]];
|
|
26
|
-
* const clonedArr =
|
|
26
|
+
* const clonedArr = cloneDeep(arr);
|
|
27
27
|
* arr[1].a = 2;
|
|
28
|
-
* console.log(arr); // [
|
|
28
|
+
* console.log(arr); // [1, { a: 2 }, [1, 2, 3]]
|
|
29
29
|
* console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]
|
|
30
30
|
* console.log(clonedArr === arr); // false
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
33
|
* // Clone an object
|
|
34
34
|
* const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
|
|
35
|
-
* const clonedObj =
|
|
35
|
+
* const clonedObj = cloneDeep(obj);
|
|
36
36
|
* console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
|
|
37
37
|
* console.log(clonedObj === obj); // false
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
40
|
* // Clone an object with nested objects
|
|
41
41
|
* const obj = { a: 1, b: { c: 1 } };
|
|
42
|
-
* const clonedObj =
|
|
42
|
+
* const clonedObj = cloneDeep(obj);
|
|
43
43
|
* obj.b.c = 2;
|
|
44
44
|
* console.log(obj); // { a: 1, b: { c: 2 } }
|
|
45
45
|
* console.log(clonedObj); // { a: 1, b: { c: 1 } }
|
|
@@ -17,30 +17,30 @@ const require_cloneDeepWith = require("./cloneDeepWith.js");
|
|
|
17
17
|
* @example
|
|
18
18
|
* // Clone an array
|
|
19
19
|
* const arr = [1, 2, 3];
|
|
20
|
-
* const clonedArr =
|
|
20
|
+
* const clonedArr = cloneDeep(arr);
|
|
21
21
|
* console.log(clonedArr); // [1, 2, 3]
|
|
22
22
|
* console.log(clonedArr === arr); // false
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* // Clone an array with nested objects
|
|
26
26
|
* const arr = [1, { a: 1 }, [1, 2, 3]];
|
|
27
|
-
* const clonedArr =
|
|
27
|
+
* const clonedArr = cloneDeep(arr);
|
|
28
28
|
* arr[1].a = 2;
|
|
29
|
-
* console.log(arr); // [
|
|
29
|
+
* console.log(arr); // [1, { a: 2 }, [1, 2, 3]]
|
|
30
30
|
* console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]
|
|
31
31
|
* console.log(clonedArr === arr); // false
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
34
|
* // Clone an object
|
|
35
35
|
* const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
|
|
36
|
-
* const clonedObj =
|
|
36
|
+
* const clonedObj = cloneDeep(obj);
|
|
37
37
|
* console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
|
|
38
38
|
* console.log(clonedObj === obj); // false
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* // Clone an object with nested objects
|
|
42
42
|
* const obj = { a: 1, b: { c: 1 } };
|
|
43
|
-
* const clonedObj =
|
|
43
|
+
* const clonedObj = cloneDeep(obj);
|
|
44
44
|
* obj.b.c = 2;
|
|
45
45
|
* console.log(obj); // { a: 1, b: { c: 2 } }
|
|
46
46
|
* console.log(clonedObj); // { a: 1, b: { c: 1 } }
|
|
@@ -17,30 +17,30 @@ import { cloneDeepWith } from "./cloneDeepWith.mjs";
|
|
|
17
17
|
* @example
|
|
18
18
|
* // Clone an array
|
|
19
19
|
* const arr = [1, 2, 3];
|
|
20
|
-
* const clonedArr =
|
|
20
|
+
* const clonedArr = cloneDeep(arr);
|
|
21
21
|
* console.log(clonedArr); // [1, 2, 3]
|
|
22
22
|
* console.log(clonedArr === arr); // false
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* // Clone an array with nested objects
|
|
26
26
|
* const arr = [1, { a: 1 }, [1, 2, 3]];
|
|
27
|
-
* const clonedArr =
|
|
27
|
+
* const clonedArr = cloneDeep(arr);
|
|
28
28
|
* arr[1].a = 2;
|
|
29
|
-
* console.log(arr); // [
|
|
29
|
+
* console.log(arr); // [1, { a: 2 }, [1, 2, 3]]
|
|
30
30
|
* console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]
|
|
31
31
|
* console.log(clonedArr === arr); // false
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
34
|
* // Clone an object
|
|
35
35
|
* const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
|
|
36
|
-
* const clonedObj =
|
|
36
|
+
* const clonedObj = cloneDeep(obj);
|
|
37
37
|
* console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
|
|
38
38
|
* console.log(clonedObj === obj); // false
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* // Clone an object with nested objects
|
|
42
42
|
* const obj = { a: 1, b: { c: 1 } };
|
|
43
|
-
* const clonedObj =
|
|
43
|
+
* const clonedObj = cloneDeep(obj);
|
|
44
44
|
* obj.b.c = 2;
|
|
45
45
|
* console.log(obj); // { a: 1, b: { c: 2 } }
|
|
46
46
|
* console.log(clonedObj); // { a: 1, b: { c: 1 } }
|
|
@@ -32,7 +32,9 @@ const require_cloneDeepWith = require("../../object/cloneDeepWith.js");
|
|
|
32
32
|
* // Clone an array with a customizer
|
|
33
33
|
* const arr = [1, 2, 3];
|
|
34
34
|
* const clonedArr = cloneDeepWith(arr, (value) => {
|
|
35
|
-
*
|
|
35
|
+
* if (typeof value === 'number') {
|
|
36
|
+
* return value + 1; // Increment each number
|
|
37
|
+
* }
|
|
36
38
|
* });
|
|
37
39
|
* console.log(clonedArr); // [2, 3, 4]
|
|
38
40
|
* console.log(clonedArr === arr); // false
|
|
@@ -32,7 +32,9 @@ import { cloneDeepWith as cloneDeepWith$1, copyProperties } from "../../object/c
|
|
|
32
32
|
* // Clone an array with a customizer
|
|
33
33
|
* const arr = [1, 2, 3];
|
|
34
34
|
* const clonedArr = cloneDeepWith(arr, (value) => {
|
|
35
|
-
*
|
|
35
|
+
* if (typeof value === 'number') {
|
|
36
|
+
* return value + 1; // Increment each number
|
|
37
|
+
* }
|
|
36
38
|
* });
|
|
37
39
|
* console.log(clonedArr); // [2, 3, 4]
|
|
38
40
|
* console.log(clonedArr === arr); // false
|
|
@@ -35,7 +35,7 @@ declare function cloneWith<T, R extends object | string | number | boolean | nul
|
|
|
35
35
|
* return value * 2;
|
|
36
36
|
* }
|
|
37
37
|
* });
|
|
38
|
-
* // => { a:
|
|
38
|
+
* // => { a: 1, b: 2 } (customizer returns undefined for objects, so the default shallow clone is used)
|
|
39
39
|
*/
|
|
40
40
|
declare function cloneWith<T, R>(value: T, customizer: CloneWithCustomizer<T, R | undefined>): R | T;
|
|
41
41
|
/**
|
|
@@ -35,7 +35,7 @@ declare function cloneWith<T, R extends object | string | number | boolean | nul
|
|
|
35
35
|
* return value * 2;
|
|
36
36
|
* }
|
|
37
37
|
* });
|
|
38
|
-
* // => { a:
|
|
38
|
+
* // => { a: 1, b: 2 } (customizer returns undefined for objects, so the default shallow clone is used)
|
|
39
39
|
*/
|
|
40
40
|
declare function cloneWith<T, R>(value: T, customizer: CloneWithCustomizer<T, R | undefined>): R | T;
|
|
41
41
|
/**
|
|
@@ -43,7 +43,7 @@ const require_clone = require("./clone.js");
|
|
|
43
43
|
* }
|
|
44
44
|
* // Returning undefined uses the default cloning
|
|
45
45
|
* });
|
|
46
|
-
* console.log(clonedObj); // { a:
|
|
46
|
+
* console.log(clonedObj); // { a: 1, b: 2 } (customizer returns undefined for objects, so the default shallow clone is used)
|
|
47
47
|
*/
|
|
48
48
|
function cloneWith(value, customizer) {
|
|
49
49
|
if (!customizer) return require_clone.clone(value);
|
|
@@ -43,7 +43,7 @@ import { clone } from "./clone.mjs";
|
|
|
43
43
|
* }
|
|
44
44
|
* // Returning undefined uses the default cloning
|
|
45
45
|
* });
|
|
46
|
-
* console.log(clonedObj); // { a:
|
|
46
|
+
* console.log(clonedObj); // { a: 1, b: 2 } (customizer returns undefined for objects, so the default shallow clone is used)
|
|
47
47
|
*/
|
|
48
48
|
function cloneWith(value, customizer) {
|
|
49
49
|
if (!customizer) return clone(value);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { toPairs } from "./toPairs.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { toPairs } from "./toPairs.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("./toPairs.js");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./toPairs.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { toPairsIn } from "./toPairsIn.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { toPairsIn } from "./toPairsIn.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("./toPairsIn.js");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./toPairsIn.mjs";
|
|
@@ -31,13 +31,13 @@ function omit(obj, ...keysArr) {
|
|
|
31
31
|
keysArr = require_flatten.flatten(keysArr);
|
|
32
32
|
const result = cloneInOmit(obj, keysArr);
|
|
33
33
|
for (let i = 0; i < keysArr.length; i++) {
|
|
34
|
-
|
|
34
|
+
const keys = keysArr[i];
|
|
35
35
|
switch (typeof keys) {
|
|
36
36
|
case "object":
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
require_unset.unset(result,
|
|
37
|
+
if (Array.isArray(keys)) require_unset.unset(result, keys);
|
|
38
|
+
else {
|
|
39
|
+
const arrayLikeKeys = Array.from(keys);
|
|
40
|
+
for (let j = 0; j < arrayLikeKeys.length; j++) require_unset.unset(result, arrayLikeKeys[j]);
|
|
41
41
|
}
|
|
42
42
|
break;
|
|
43
43
|
case "string":
|
|
@@ -31,13 +31,13 @@ function omit(obj, ...keysArr) {
|
|
|
31
31
|
keysArr = flatten(keysArr);
|
|
32
32
|
const result = cloneInOmit(obj, keysArr);
|
|
33
33
|
for (let i = 0; i < keysArr.length; i++) {
|
|
34
|
-
|
|
34
|
+
const keys = keysArr[i];
|
|
35
35
|
switch (typeof keys) {
|
|
36
36
|
case "object":
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
unset(result,
|
|
37
|
+
if (Array.isArray(keys)) unset(result, keys);
|
|
38
|
+
else {
|
|
39
|
+
const arrayLikeKeys = Array.from(keys);
|
|
40
|
+
for (let j = 0; j < arrayLikeKeys.length; j++) unset(result, arrayLikeKeys[j]);
|
|
41
41
|
}
|
|
42
42
|
break;
|
|
43
43
|
case "string":
|
|
@@ -23,7 +23,7 @@ The traversal is interrupted when the `iteratee` function returns `false`.
|
|
|
23
23
|
* @example
|
|
24
24
|
* // Transform an array
|
|
25
25
|
* const array = [2, 3, 4];
|
|
26
|
-
* transform(array, (acc, value) => { acc += value; return value % 2 === 0; }, 0) // => 5
|
|
26
|
+
* transform(array, (acc, value) => { acc.sum += value; return value % 2 === 0; }, { sum: 0 }) // => { sum: 5 }
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* // Transform an object
|
|
@@ -23,7 +23,7 @@ The traversal is interrupted when the `iteratee` function returns `false`.
|
|
|
23
23
|
* @example
|
|
24
24
|
* // Transform an array
|
|
25
25
|
* const array = [2, 3, 4];
|
|
26
|
-
* transform(array, (acc, value) => { acc += value; return value % 2 === 0; }, 0) // => 5
|
|
26
|
+
* transform(array, (acc, value) => { acc.sum += value; return value % 2 === 0; }, { sum: 0 }) // => { sum: 5 }
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* // Transform an object
|