es-toolkit 1.13.1-dev.332 → 1.13.1-dev.333
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/dist/_chunk/index-CwRt_M.js +47 -0
- package/dist/_chunk/index-CwRt_M.js.map +1 -0
- package/dist/_chunk/isPlainObject-bK22pA.js +24 -0
- package/dist/_chunk/isPlainObject-bK22pA.js.map +1 -0
- package/dist/_chunk/randomInt-CF7bZK.js +20 -0
- package/dist/_chunk/randomInt-CF7bZK.js.map +1 -0
- package/dist/_chunk/union-CdQeDK.js +13 -0
- package/dist/_chunk/union-CdQeDK.js.map +1 -0
- package/dist/array/chunk.mjs +16 -8
- package/dist/array/chunk.mjs.map +1 -1
- package/dist/array/compact.mjs +12 -8
- package/dist/array/compact.mjs.map +1 -1
- package/dist/array/countBy.mjs +11 -8
- package/dist/array/countBy.mjs.map +1 -1
- package/dist/array/difference.mjs +7 -8
- package/dist/array/difference.mjs.map +1 -1
- package/dist/array/differenceBy.mjs +9 -8
- package/dist/array/differenceBy.mjs.map +1 -1
- package/dist/array/differenceWith.mjs +10 -8
- package/dist/array/differenceWith.mjs.map +1 -1
- package/dist/array/drop.mjs +7 -8
- package/dist/array/drop.mjs.map +1 -1
- package/dist/array/dropRight.mjs +10 -8
- package/dist/array/dropRight.mjs.map +1 -1
- package/dist/array/dropRightWhile.mjs +11 -8
- package/dist/array/dropRightWhile.mjs.map +1 -1
- package/dist/array/dropWhile.mjs +10 -8
- package/dist/array/dropWhile.mjs.map +1 -1
- package/dist/array/fill.mjs +12 -8
- package/dist/array/fill.mjs.map +1 -1
- package/dist/array/flatMap.mjs +8 -9
- package/dist/array/flatMap.mjs.map +1 -1
- package/dist/array/flatten.mjs +19 -8
- package/dist/array/flatten.mjs.map +1 -1
- package/dist/array/flattenDeep.mjs +8 -9
- package/dist/array/flattenDeep.mjs.map +1 -1
- package/dist/array/forEachRight.mjs +9 -8
- package/dist/array/forEachRight.mjs.map +1 -1
- package/dist/array/groupBy.mjs +14 -8
- package/dist/array/groupBy.mjs.map +1 -1
- package/dist/array/head.mjs +6 -8
- package/dist/array/head.mjs.map +1 -1
- package/dist/array/index.js +353 -498
- package/dist/array/index.js.map +1 -1
- package/dist/array/index.mjs +52 -211
- package/dist/array/index.mjs.map +1 -1
- package/dist/array/initial.mjs +9 -8
- package/dist/array/initial.mjs.map +1 -1
- package/dist/array/intersection.mjs +9 -8
- package/dist/array/intersection.mjs.map +1 -1
- package/dist/array/intersectionBy.mjs +7 -8
- package/dist/array/intersectionBy.mjs.map +1 -1
- package/dist/array/intersectionWith.mjs +10 -8
- package/dist/array/intersectionWith.mjs.map +1 -1
- package/dist/array/keyBy.mjs +11 -8
- package/dist/array/keyBy.mjs.map +1 -1
- package/dist/array/last.mjs +6 -8
- package/dist/array/last.mjs.map +1 -1
- package/dist/array/maxBy.mjs +15 -8
- package/dist/array/maxBy.mjs.map +1 -1
- package/dist/array/minBy.mjs +15 -8
- package/dist/array/minBy.mjs.map +1 -1
- package/dist/array/orderBy.mjs +26 -8
- package/dist/array/orderBy.mjs.map +1 -1
- package/dist/array/partition.mjs +16 -8
- package/dist/array/partition.mjs.map +1 -1
- package/dist/array/sample.mjs +7 -8
- package/dist/array/sample.mjs.map +1 -1
- package/dist/array/sampleSize.mjs +21 -10
- package/dist/array/sampleSize.mjs.map +1 -1
- package/dist/array/shuffle.mjs +11 -8
- package/dist/array/shuffle.mjs.map +1 -1
- package/dist/array/tail.mjs +14 -8
- package/dist/array/tail.mjs.map +1 -1
- package/dist/array/take.mjs +6 -8
- package/dist/array/take.mjs.map +1 -1
- package/dist/array/takeRight.mjs +9 -8
- package/dist/array/takeRight.mjs.map +1 -1
- package/dist/array/takeRightWhile.mjs +11 -8
- package/dist/array/takeRightWhile.mjs.map +1 -1
- package/dist/array/takeWhile.mjs +13 -8
- package/dist/array/takeWhile.mjs.map +1 -1
- package/dist/array/toFilled.mjs +13 -8
- package/dist/array/toFilled.mjs.map +1 -1
- package/dist/array/union.mjs +8 -9
- package/dist/array/union.mjs.map +1 -1
- package/dist/array/unionBy.mjs +13 -8
- package/dist/array/unionBy.mjs.map +1 -1
- package/dist/array/unionWith.mjs +8 -9
- package/dist/array/unionWith.mjs.map +1 -1
- package/dist/array/uniq.mjs +6 -8
- package/dist/array/uniq.mjs.map +1 -1
- package/dist/array/uniqBy.mjs +13 -8
- package/dist/array/uniqBy.mjs.map +1 -1
- package/dist/array/uniqWith.mjs +13 -8
- package/dist/array/uniqWith.mjs.map +1 -1
- package/dist/array/unzip.mjs +19 -8
- package/dist/array/unzip.mjs.map +1 -1
- package/dist/array/unzipWith.mjs +15 -8
- package/dist/array/unzipWith.mjs.map +1 -1
- package/dist/array/without.mjs +7 -8
- package/dist/array/without.mjs.map +1 -1
- package/dist/array/xor.mjs +10 -12
- package/dist/array/xor.mjs.map +1 -1
- package/dist/array/xorBy.mjs +12 -11
- package/dist/array/xorBy.mjs.map +1 -1
- package/dist/array/xorWith.mjs +12 -12
- package/dist/array/xorWith.mjs.map +1 -1
- package/dist/array/zip.mjs +15 -8
- package/dist/array/zip.mjs.map +1 -1
- package/dist/array/zipObject.mjs +10 -8
- package/dist/array/zipObject.mjs.map +1 -1
- package/dist/array/zipWith.mjs +14 -8
- package/dist/array/zipWith.mjs.map +1 -1
- package/dist/compat/_internal/isDeepKey.mjs +16 -0
- package/dist/compat/_internal/isDeepKey.mjs.map +1 -0
- package/dist/compat/_internal/isIndex.mjs +17 -0
- package/dist/compat/_internal/isIndex.mjs.map +1 -0
- package/dist/compat/_internal/toPath.mjs +41 -0
- package/dist/compat/_internal/toPath.mjs.map +1 -0
- package/dist/compat/array/chunk.d.mts +26 -0
- package/dist/compat/array/chunk.d.ts +26 -0
- package/dist/compat/array/chunk.mjs +12 -0
- package/dist/compat/array/chunk.mjs.map +1 -0
- package/dist/compat/array/concat.d.mts +30 -0
- package/dist/compat/array/concat.d.ts +30 -0
- package/dist/compat/array/concat.mjs +8 -0
- package/dist/compat/array/concat.mjs.map +1 -0
- package/dist/compat/array/difference.d.mts +3 -0
- package/dist/compat/array/difference.d.ts +3 -0
- package/dist/compat/array/difference.mjs +11 -0
- package/dist/compat/array/difference.mjs.map +1 -0
- package/dist/compat/array/fill.d.mts +33 -0
- package/dist/compat/array/fill.d.ts +33 -0
- package/dist/compat/array/fill.mjs +16 -0
- package/dist/compat/array/fill.mjs.map +1 -0
- package/dist/compat/array/zipObjectDeep.d.mts +37 -0
- package/dist/compat/array/zipObjectDeep.d.ts +37 -0
- package/dist/compat/array/zipObjectDeep.mjs +17 -0
- package/dist/compat/array/zipObjectDeep.mjs.map +1 -0
- package/dist/compat/index.d.mts +14 -546
- package/dist/compat/index.d.ts +14 -546
- package/dist/compat/index.js +287 -1498
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/index.mjs +106 -415
- package/dist/compat/index.mjs.map +1 -1
- package/dist/compat/math/max.d.mts +19 -0
- package/dist/compat/math/max.d.ts +19 -0
- package/dist/compat/math/max.mjs +14 -0
- package/dist/compat/math/max.mjs.map +1 -0
- package/dist/compat/math/min.d.mts +19 -0
- package/dist/compat/math/min.d.ts +19 -0
- package/dist/compat/math/min.mjs +14 -0
- package/dist/compat/math/min.mjs.map +1 -0
- package/dist/compat/object/get.d.mts +247 -0
- package/dist/compat/object/get.d.ts +247 -0
- package/dist/compat/object/get.mjs +34 -0
- package/dist/compat/object/get.mjs.map +1 -0
- package/dist/compat/object/get.types.d.mts +9 -0
- package/dist/compat/object/get.types.d.ts +9 -0
- package/dist/compat/object/set.d.mts +30 -0
- package/dist/compat/object/set.d.ts +30 -0
- package/dist/compat/object/set.mjs +25 -0
- package/dist/compat/object/set.mjs.map +1 -0
- package/dist/compat/predicate/isArray.d.mts +24 -0
- package/dist/compat/predicate/isArray.d.ts +24 -0
- package/dist/compat/predicate/isArray.mjs +6 -0
- package/dist/compat/predicate/isArray.mjs.map +1 -0
- package/dist/compat/predicate/isPlainObject.d.mts +25 -0
- package/dist/compat/predicate/isPlainObject.d.ts +25 -0
- package/dist/compat/predicate/isPlainObject.mjs +30 -0
- package/dist/compat/predicate/isPlainObject.mjs.map +1 -0
- package/dist/compat/predicate/isTypedArray.d.mts +19 -0
- package/dist/compat/predicate/isTypedArray.d.ts +19 -0
- package/dist/compat/predicate/isTypedArray.mjs +8 -0
- package/dist/compat/predicate/isTypedArray.mjs.map +1 -0
- package/dist/compat/string/endsWith.d.mts +20 -0
- package/dist/compat/string/endsWith.d.ts +20 -0
- package/dist/compat/string/endsWith.mjs +6 -0
- package/dist/compat/string/endsWith.mjs.map +1 -0
- package/dist/compat/string/startsWith.d.mts +20 -0
- package/dist/compat/string/startsWith.d.ts +20 -0
- package/dist/compat/string/startsWith.mjs +6 -0
- package/dist/compat/string/startsWith.mjs.map +1 -0
- package/dist/error/AbortError.mjs +9 -8
- package/dist/error/AbortError.mjs.map +1 -1
- package/dist/error/TimeoutError.mjs +9 -8
- package/dist/error/TimeoutError.mjs.map +1 -1
- package/dist/function/after.mjs +14 -7
- package/dist/function/after.mjs.map +1 -1
- package/dist/function/debounce.mjs +29 -8
- package/dist/function/debounce.mjs.map +1 -1
- package/dist/function/index.js +66 -102
- package/dist/function/index.js.map +1 -1
- package/dist/function/index.mjs +7 -29
- package/dist/function/index.mjs.map +1 -1
- package/dist/function/negate.mjs +6 -8
- package/dist/function/negate.mjs.map +1 -1
- package/dist/function/noop.mjs +4 -8
- package/dist/function/noop.mjs.map +1 -1
- package/dist/function/once.mjs +16 -8
- package/dist/function/once.mjs.map +1 -1
- package/dist/function/throttle.mjs +14 -8
- package/dist/function/throttle.mjs.map +1 -1
- package/dist/index.js +114 -1307
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -399
- package/dist/index.mjs.map +1 -1
- package/dist/math/clamp.mjs +9 -8
- package/dist/math/clamp.mjs.map +1 -1
- package/dist/math/inRange.mjs +13 -8
- package/dist/math/inRange.mjs.map +1 -1
- package/dist/math/index.js +59 -115
- package/dist/math/index.js.map +1 -1
- package/dist/math/index.mjs +11 -45
- package/dist/math/index.mjs.map +1 -1
- package/dist/math/mean.mjs +8 -9
- package/dist/math/mean.mjs.map +1 -1
- package/dist/math/meanBy.mjs +9 -10
- package/dist/math/meanBy.mjs.map +1 -1
- package/dist/math/random.mjs +13 -8
- package/dist/math/random.mjs.map +1 -1
- package/dist/math/randomInt.mjs +8 -9
- package/dist/math/randomInt.mjs.map +1 -1
- package/dist/math/range.mjs +21 -8
- package/dist/math/range.mjs.map +1 -1
- package/dist/math/round.mjs +10 -8
- package/dist/math/round.mjs.map +1 -1
- package/dist/math/sum.mjs +10 -8
- package/dist/math/sum.mjs.map +1 -1
- package/dist/math/sumBy.mjs +9 -9
- package/dist/math/sumBy.mjs.map +1 -1
- package/dist/object/clone.mjs +40 -8
- package/dist/object/clone.mjs.map +1 -1
- package/dist/object/cloneDeep.mjs +100 -8
- package/dist/object/cloneDeep.mjs.map +1 -1
- package/dist/object/flattenObject.mjs +29 -9
- package/dist/object/flattenObject.mjs.map +1 -1
- package/dist/object/index.js +184 -232
- package/dist/object/index.js.map +1 -1
- package/dist/object/index.mjs +9 -38
- package/dist/object/index.mjs.map +1 -1
- package/dist/object/invert.mjs +13 -8
- package/dist/object/invert.mjs.map +1 -1
- package/dist/object/omit.mjs +10 -8
- package/dist/object/omit.mjs.map +1 -1
- package/dist/object/omitBy.mjs +13 -8
- package/dist/object/omitBy.mjs.map +1 -1
- package/dist/object/pick.mjs +10 -8
- package/dist/object/pick.mjs.map +1 -1
- package/dist/object/pickBy.mjs +13 -8
- package/dist/object/pickBy.mjs.map +1 -1
- package/dist/predicate/index.js +65 -126
- package/dist/predicate/index.js.map +1 -1
- package/dist/predicate/index.mjs +12 -51
- package/dist/predicate/index.mjs.map +1 -1
- package/dist/predicate/isArrayLike.mjs +9 -9
- package/dist/predicate/isArrayLike.mjs.map +1 -1
- package/dist/predicate/isEqual.mjs +36 -10
- package/dist/predicate/isEqual.mjs.map +1 -1
- package/dist/predicate/isFunction.mjs +6 -8
- package/dist/predicate/isFunction.mjs.map +1 -1
- package/dist/predicate/isLength.mjs +6 -8
- package/dist/predicate/isLength.mjs.map +1 -1
- package/dist/predicate/isNil.mjs +6 -8
- package/dist/predicate/isNil.mjs.map +1 -1
- package/dist/predicate/isNotNil.mjs +6 -8
- package/dist/predicate/isNotNil.mjs.map +1 -1
- package/dist/predicate/isNull.mjs +6 -8
- package/dist/predicate/isNull.mjs.map +1 -1
- package/dist/predicate/isPlainObject.mjs +22 -8
- package/dist/predicate/isPlainObject.mjs.map +1 -1
- package/dist/predicate/isPrimitive.mjs +6 -8
- package/dist/predicate/isPrimitive.mjs.map +1 -1
- package/dist/predicate/isTypedArray.mjs +16 -8
- package/dist/predicate/isTypedArray.mjs.map +1 -1
- package/dist/predicate/isUndefined.mjs +6 -8
- package/dist/predicate/isUndefined.mjs.map +1 -1
- package/dist/promise/delay.mjs +21 -9
- package/dist/promise/delay.mjs.map +1 -1
- package/dist/promise/index.js +6 -72
- package/dist/promise/index.js.map +1 -1
- package/dist/promise/index.mjs +3 -16
- package/dist/promise/index.mjs.map +1 -1
- package/dist/promise/timeout.mjs +10 -11
- package/dist/promise/timeout.mjs.map +1 -1
- package/dist/promise/withTimeout.mjs +8 -12
- package/dist/promise/withTimeout.mjs.map +1 -1
- package/dist/string/_internal/getWords.mjs +7 -0
- package/dist/string/_internal/getWords.mjs.map +1 -0
- package/dist/string/camelCase.mjs +14 -10
- package/dist/string/camelCase.mjs.map +1 -1
- package/dist/string/capitalize.mjs +5 -7
- package/dist/string/capitalize.mjs.map +1 -1
- package/dist/string/index.js +42 -77
- package/dist/string/index.js.map +1 -1
- package/dist/string/index.mjs +7 -30
- package/dist/string/index.mjs.map +1 -1
- package/dist/string/kebabCase.mjs +8 -8
- package/dist/string/kebabCase.mjs.map +1 -1
- package/dist/string/lowerCase.mjs +8 -8
- package/dist/string/lowerCase.mjs.map +1 -1
- package/dist/string/snakeCase.mjs +8 -8
- package/dist/string/snakeCase.mjs.map +1 -1
- package/dist/string/startCase.mjs +21 -9
- package/dist/string/startCase.mjs.map +1 -1
- package/package.json +8 -2
- package/umd/browser.global.js +2 -2
- package/umd/browser.global.js.map +1 -0
- package/dist/array/chunk.js +0 -43
- package/dist/array/chunk.js.map +0 -1
- package/dist/array/compact.js +0 -39
- package/dist/array/compact.js.map +0 -1
- package/dist/array/countBy.js +0 -38
- package/dist/array/countBy.js.map +0 -1
- package/dist/array/difference.js +0 -34
- package/dist/array/difference.js.map +0 -1
- package/dist/array/differenceBy.js +0 -36
- package/dist/array/differenceBy.js.map +0 -1
- package/dist/array/differenceWith.js +0 -37
- package/dist/array/differenceWith.js.map +0 -1
- package/dist/array/drop.js +0 -34
- package/dist/array/drop.js.map +0 -1
- package/dist/array/dropRight.js +0 -37
- package/dist/array/dropRight.js.map +0 -1
- package/dist/array/dropRightWhile.js +0 -38
- package/dist/array/dropRightWhile.js.map +0 -1
- package/dist/array/dropWhile.js +0 -37
- package/dist/array/dropWhile.js.map +0 -1
- package/dist/array/fill.js +0 -39
- package/dist/array/fill.js.map +0 -1
- package/dist/array/flatMap.js +0 -52
- package/dist/array/flatMap.js.map +0 -1
- package/dist/array/flatten.js +0 -45
- package/dist/array/flatten.js.map +0 -1
- package/dist/array/flattenDeep.js +0 -52
- package/dist/array/flattenDeep.js.map +0 -1
- package/dist/array/forEachRight.js +0 -36
- package/dist/array/forEachRight.js.map +0 -1
- package/dist/array/groupBy.js +0 -41
- package/dist/array/groupBy.js.map +0 -1
- package/dist/array/head.js +0 -33
- package/dist/array/head.js.map +0 -1
- package/dist/array/initial.js +0 -36
- package/dist/array/initial.js.map +0 -1
- package/dist/array/intersection.js +0 -36
- package/dist/array/intersection.js.map +0 -1
- package/dist/array/intersectionBy.js +0 -34
- package/dist/array/intersectionBy.js.map +0 -1
- package/dist/array/intersectionWith.js +0 -37
- package/dist/array/intersectionWith.js.map +0 -1
- package/dist/array/keyBy.js +0 -38
- package/dist/array/keyBy.js.map +0 -1
- package/dist/array/last.js +0 -33
- package/dist/array/last.js.map +0 -1
- package/dist/array/maxBy.js +0 -42
- package/dist/array/maxBy.js.map +0 -1
- package/dist/array/minBy.js +0 -42
- package/dist/array/minBy.js.map +0 -1
- package/dist/array/orderBy.js +0 -53
- package/dist/array/orderBy.js.map +0 -1
- package/dist/array/partition.js +0 -42
- package/dist/array/partition.js.map +0 -1
- package/dist/array/sample.js +0 -34
- package/dist/array/sample.js.map +0 -1
- package/dist/array/sampleSize.js +0 -65
- package/dist/array/sampleSize.js.map +0 -1
- package/dist/array/shuffle.js +0 -38
- package/dist/array/shuffle.js.map +0 -1
- package/dist/array/tail.js +0 -41
- package/dist/array/tail.js.map +0 -1
- package/dist/array/take.js +0 -33
- package/dist/array/take.js.map +0 -1
- package/dist/array/takeRight.js +0 -36
- package/dist/array/takeRight.js.map +0 -1
- package/dist/array/takeRightWhile.js +0 -38
- package/dist/array/takeRightWhile.js.map +0 -1
- package/dist/array/takeWhile.js +0 -40
- package/dist/array/takeWhile.js.map +0 -1
- package/dist/array/toFilled.js +0 -40
- package/dist/array/toFilled.js.map +0 -1
- package/dist/array/union.js +0 -40
- package/dist/array/union.js.map +0 -1
- package/dist/array/unionBy.js +0 -40
- package/dist/array/unionBy.js.map +0 -1
- package/dist/array/unionWith.js +0 -47
- package/dist/array/unionWith.js.map +0 -1
- package/dist/array/uniq.js +0 -33
- package/dist/array/uniq.js.map +0 -1
- package/dist/array/uniqBy.js +0 -40
- package/dist/array/uniqBy.js.map +0 -1
- package/dist/array/uniqWith.js +0 -40
- package/dist/array/uniqWith.js.map +0 -1
- package/dist/array/unzip.js +0 -46
- package/dist/array/unzip.js.map +0 -1
- package/dist/array/unzipWith.js +0 -42
- package/dist/array/unzipWith.js.map +0 -1
- package/dist/array/without.js +0 -34
- package/dist/array/without.js.map +0 -1
- package/dist/array/xor.js +0 -59
- package/dist/array/xor.js.map +0 -1
- package/dist/array/xorBy.js +0 -63
- package/dist/array/xorBy.js.map +0 -1
- package/dist/array/xorWith.js +0 -72
- package/dist/array/xorWith.js.map +0 -1
- package/dist/array/zip.js +0 -42
- package/dist/array/zip.js.map +0 -1
- package/dist/array/zipObject.js +0 -37
- package/dist/array/zipObject.js.map +0 -1
- package/dist/array/zipWith.js +0 -41
- package/dist/array/zipWith.js.map +0 -1
- package/dist/browser.d.mts +0 -2
- package/dist/browser.d.ts +0 -2
- package/dist/browser.js +0 -1440
- package/dist/browser.js.map +0 -1
- package/dist/browser.mjs +0 -115
- package/dist/browser.mjs.map +0 -1
- package/dist/chunk-237HGSZS.mjs +0 -16
- package/dist/chunk-237HGSZS.mjs.map +0 -1
- package/dist/chunk-27QMXBLJ.mjs +0 -9
- package/dist/chunk-27QMXBLJ.mjs.map +0 -1
- package/dist/chunk-2IXFGSUA.mjs +0 -16
- package/dist/chunk-2IXFGSUA.mjs.map +0 -1
- package/dist/chunk-2KNLZB7V.mjs +0 -10
- package/dist/chunk-2KNLZB7V.mjs.map +0 -1
- package/dist/chunk-2SLTL4KL.mjs +0 -13
- package/dist/chunk-2SLTL4KL.mjs.map +0 -1
- package/dist/chunk-2ZCITDMK.mjs +0 -13
- package/dist/chunk-2ZCITDMK.mjs.map +0 -1
- package/dist/chunk-33MSBDC6.mjs +0 -21
- package/dist/chunk-33MSBDC6.mjs.map +0 -1
- package/dist/chunk-3EZAFZG3.mjs +0 -10
- package/dist/chunk-3EZAFZG3.mjs.map +0 -1
- package/dist/chunk-3SBT6WDU.mjs +0 -25
- package/dist/chunk-3SBT6WDU.mjs.map +0 -1
- package/dist/chunk-4DFAGGIM.mjs +0 -26
- package/dist/chunk-4DFAGGIM.mjs.map +0 -1
- package/dist/chunk-4OIZM4HS.mjs +0 -1
- package/dist/chunk-4OIZM4HS.mjs.map +0 -1
- package/dist/chunk-4ZES5T6V.mjs +0 -21
- package/dist/chunk-4ZES5T6V.mjs.map +0 -1
- package/dist/chunk-5ASRKEB4.mjs +0 -13
- package/dist/chunk-5ASRKEB4.mjs.map +0 -1
- package/dist/chunk-5F26PFZL.mjs +0 -32
- package/dist/chunk-5F26PFZL.mjs.map +0 -1
- package/dist/chunk-5L4VWRFX.mjs +0 -14
- package/dist/chunk-5L4VWRFX.mjs.map +0 -1
- package/dist/chunk-5PMKOZ2F.mjs +0 -13
- package/dist/chunk-5PMKOZ2F.mjs.map +0 -1
- package/dist/chunk-6CLH5YZ2.mjs +0 -16
- package/dist/chunk-6CLH5YZ2.mjs.map +0 -1
- package/dist/chunk-6NVQAHXP.mjs +0 -13
- package/dist/chunk-6NVQAHXP.mjs.map +0 -1
- package/dist/chunk-74CREQXW.mjs +0 -9
- package/dist/chunk-74CREQXW.mjs.map +0 -1
- package/dist/chunk-7B7W36UP.mjs +0 -29
- package/dist/chunk-7B7W36UP.mjs.map +0 -1
- package/dist/chunk-7GXKT3VW.mjs +0 -41
- package/dist/chunk-7GXKT3VW.mjs.map +0 -1
- package/dist/chunk-AIRSKN47.mjs +0 -9
- package/dist/chunk-AIRSKN47.mjs.map +0 -1
- package/dist/chunk-AJKZMN2V.mjs +0 -14
- package/dist/chunk-AJKZMN2V.mjs.map +0 -1
- package/dist/chunk-B4COTK4K.mjs +0 -16
- package/dist/chunk-B4COTK4K.mjs.map +0 -1
- package/dist/chunk-BCTYOXT7.mjs +0 -16
- package/dist/chunk-BCTYOXT7.mjs.map +0 -1
- package/dist/chunk-BGWHVWY4.mjs +0 -13
- package/dist/chunk-BGWHVWY4.mjs.map +0 -1
- package/dist/chunk-BH6HLGBA.mjs +0 -16
- package/dist/chunk-BH6HLGBA.mjs.map +0 -1
- package/dist/chunk-BMRTZMRE.mjs +0 -9
- package/dist/chunk-BMRTZMRE.mjs.map +0 -1
- package/dist/chunk-BOOQBJN2.mjs +0 -9
- package/dist/chunk-BOOQBJN2.mjs.map +0 -1
- package/dist/chunk-CMBC4MXG.mjs +0 -19
- package/dist/chunk-CMBC4MXG.mjs.map +0 -1
- package/dist/chunk-DDH7K4QM.mjs +0 -1
- package/dist/chunk-DDH7K4QM.mjs.map +0 -1
- package/dist/chunk-DLS7UJKJ.mjs +0 -17
- package/dist/chunk-DLS7UJKJ.mjs.map +0 -1
- package/dist/chunk-DN3NOZ3H.mjs +0 -18
- package/dist/chunk-DN3NOZ3H.mjs.map +0 -1
- package/dist/chunk-DPH2KE6O.mjs +0 -24
- package/dist/chunk-DPH2KE6O.mjs.map +0 -1
- package/dist/chunk-DTTKJ3VC.mjs +0 -9
- package/dist/chunk-DTTKJ3VC.mjs.map +0 -1
- package/dist/chunk-DVK2N4KC.mjs +0 -9
- package/dist/chunk-DVK2N4KC.mjs.map +0 -1
- package/dist/chunk-DXB7EZUQ.mjs +0 -12
- package/dist/chunk-DXB7EZUQ.mjs.map +0 -1
- package/dist/chunk-E6C5EZQA.mjs +0 -19
- package/dist/chunk-E6C5EZQA.mjs.map +0 -1
- package/dist/chunk-E6E4RZLN.mjs +0 -17
- package/dist/chunk-E6E4RZLN.mjs.map +0 -1
- package/dist/chunk-EHSKB6DF.mjs +0 -26
- package/dist/chunk-EHSKB6DF.mjs.map +0 -1
- package/dist/chunk-ET33L3MQ.mjs +0 -14
- package/dist/chunk-ET33L3MQ.mjs.map +0 -1
- package/dist/chunk-EZYYB34V.mjs +0 -17
- package/dist/chunk-EZYYB34V.mjs.map +0 -1
- package/dist/chunk-F47GLYUU.mjs +0 -1
- package/dist/chunk-F47GLYUU.mjs.map +0 -1
- package/dist/chunk-FUS75PJ7.mjs +0 -1
- package/dist/chunk-FUS75PJ7.mjs.map +0 -1
- package/dist/chunk-FVVSE2F2.mjs +0 -12
- package/dist/chunk-FVVSE2F2.mjs.map +0 -1
- package/dist/chunk-FZZNWXDM.mjs +0 -9
- package/dist/chunk-FZZNWXDM.mjs.map +0 -1
- package/dist/chunk-G7UQ5PUR.mjs +0 -14
- package/dist/chunk-G7UQ5PUR.mjs.map +0 -1
- package/dist/chunk-GIWAOOFY.mjs +0 -13
- package/dist/chunk-GIWAOOFY.mjs.map +0 -1
- package/dist/chunk-GTFDDKZ2.mjs +0 -15
- package/dist/chunk-GTFDDKZ2.mjs.map +0 -1
- package/dist/chunk-GZGXXIF7.mjs +0 -650
- package/dist/chunk-GZGXXIF7.mjs.map +0 -1
- package/dist/chunk-HPFDYUGP.mjs +0 -13
- package/dist/chunk-HPFDYUGP.mjs.map +0 -1
- package/dist/chunk-IEA53J7P.mjs +0 -12
- package/dist/chunk-IEA53J7P.mjs.map +0 -1
- package/dist/chunk-IFNXROZR.mjs +0 -18
- package/dist/chunk-IFNXROZR.mjs.map +0 -1
- package/dist/chunk-IJD7FE2Z.mjs +0 -18
- package/dist/chunk-IJD7FE2Z.mjs.map +0 -1
- package/dist/chunk-IWXZI3QT.mjs +0 -14
- package/dist/chunk-IWXZI3QT.mjs.map +0 -1
- package/dist/chunk-J5LGTIGS.mjs +0 -10
- package/dist/chunk-J5LGTIGS.mjs.map +0 -1
- package/dist/chunk-JCRY7ZYS.mjs +0 -22
- package/dist/chunk-JCRY7ZYS.mjs.map +0 -1
- package/dist/chunk-JPUKH67K.mjs +0 -10
- package/dist/chunk-JPUKH67K.mjs.map +0 -1
- package/dist/chunk-K5WL54BY.mjs +0 -93
- package/dist/chunk-K5WL54BY.mjs.map +0 -1
- package/dist/chunk-KIOYQRMQ.mjs +0 -12
- package/dist/chunk-KIOYQRMQ.mjs.map +0 -1
- package/dist/chunk-L7FQX5MN.mjs +0 -19
- package/dist/chunk-L7FQX5MN.mjs.map +0 -1
- package/dist/chunk-LJ2C6MVP.mjs +0 -13
- package/dist/chunk-LJ2C6MVP.mjs.map +0 -1
- package/dist/chunk-LKXCOLNY.mjs +0 -8
- package/dist/chunk-LKXCOLNY.mjs.map +0 -1
- package/dist/chunk-LPZZIY5Z.mjs +0 -13
- package/dist/chunk-LPZZIY5Z.mjs.map +0 -1
- package/dist/chunk-LVWX5B43.mjs +0 -12
- package/dist/chunk-LVWX5B43.mjs.map +0 -1
- package/dist/chunk-M7SBBYV2.mjs +0 -14
- package/dist/chunk-M7SBBYV2.mjs.map +0 -1
- package/dist/chunk-ME352XO7.mjs +0 -9
- package/dist/chunk-ME352XO7.mjs.map +0 -1
- package/dist/chunk-MIGAC7F4.mjs +0 -25
- package/dist/chunk-MIGAC7F4.mjs.map +0 -1
- package/dist/chunk-MJ7LNBI6.mjs +0 -17
- package/dist/chunk-MJ7LNBI6.mjs.map +0 -1
- package/dist/chunk-ML727RRJ.mjs +0 -13
- package/dist/chunk-ML727RRJ.mjs.map +0 -1
- package/dist/chunk-MLCL773E.mjs +0 -12
- package/dist/chunk-MLCL773E.mjs.map +0 -1
- package/dist/chunk-MY4G7R3I.mjs +0 -14
- package/dist/chunk-MY4G7R3I.mjs.map +0 -1
- package/dist/chunk-N3QYJX4T.mjs +0 -12
- package/dist/chunk-N3QYJX4T.mjs.map +0 -1
- package/dist/chunk-NFS7RWWE.mjs +0 -16
- package/dist/chunk-NFS7RWWE.mjs.map +0 -1
- package/dist/chunk-NKLIE2OI.mjs +0 -1
- package/dist/chunk-NKLIE2OI.mjs.map +0 -1
- package/dist/chunk-NTLX2MPV.mjs +0 -14
- package/dist/chunk-NTLX2MPV.mjs.map +0 -1
- package/dist/chunk-O6UXZR3U.mjs +0 -10
- package/dist/chunk-O6UXZR3U.mjs.map +0 -1
- package/dist/chunk-OG2RLT5U.mjs +0 -10
- package/dist/chunk-OG2RLT5U.mjs.map +0 -1
- package/dist/chunk-OGZMEWPR.mjs +0 -18
- package/dist/chunk-OGZMEWPR.mjs.map +0 -1
- package/dist/chunk-OLORW442.mjs +0 -18
- package/dist/chunk-OLORW442.mjs.map +0 -1
- package/dist/chunk-OLX53VEF.mjs +0 -16
- package/dist/chunk-OLX53VEF.mjs.map +0 -1
- package/dist/chunk-OOKNBU4V.mjs +0 -18
- package/dist/chunk-OOKNBU4V.mjs.map +0 -1
- package/dist/chunk-OXZCMC5I.mjs +0 -13
- package/dist/chunk-OXZCMC5I.mjs.map +0 -1
- package/dist/chunk-PJPGJ2O6.mjs +0 -15
- package/dist/chunk-PJPGJ2O6.mjs.map +0 -1
- package/dist/chunk-PYEYV7BY.mjs +0 -10
- package/dist/chunk-PYEYV7BY.mjs.map +0 -1
- package/dist/chunk-Q47NGNXT.mjs +0 -21
- package/dist/chunk-Q47NGNXT.mjs.map +0 -1
- package/dist/chunk-QOJGMVVR.mjs +0 -17
- package/dist/chunk-QOJGMVVR.mjs.map +0 -1
- package/dist/chunk-QRSJBBFY.mjs +0 -21
- package/dist/chunk-QRSJBBFY.mjs.map +0 -1
- package/dist/chunk-R6GLTTAB.mjs +0 -9
- package/dist/chunk-R6GLTTAB.mjs.map +0 -1
- package/dist/chunk-R6QA7PLZ.mjs +0 -13
- package/dist/chunk-R6QA7PLZ.mjs.map +0 -1
- package/dist/chunk-RTFTLCF3.mjs +0 -14
- package/dist/chunk-RTFTLCF3.mjs.map +0 -1
- package/dist/chunk-SXFMQQ6F.mjs +0 -9
- package/dist/chunk-SXFMQQ6F.mjs.map +0 -1
- package/dist/chunk-SYWMYQYJ.mjs +0 -16
- package/dist/chunk-SYWMYQYJ.mjs.map +0 -1
- package/dist/chunk-U56ZOM7L.mjs +0 -9
- package/dist/chunk-U56ZOM7L.mjs.map +0 -1
- package/dist/chunk-UY76KTPE.mjs +0 -13
- package/dist/chunk-UY76KTPE.mjs.map +0 -1
- package/dist/chunk-VH2PV426.mjs +0 -9
- package/dist/chunk-VH2PV426.mjs.map +0 -1
- package/dist/chunk-VRUTBJYS.mjs +0 -43
- package/dist/chunk-VRUTBJYS.mjs.map +0 -1
- package/dist/chunk-WMM7TZLG.mjs +0 -9
- package/dist/chunk-WMM7TZLG.mjs.map +0 -1
- package/dist/chunk-XGQWTHW6.mjs +0 -34
- package/dist/chunk-XGQWTHW6.mjs.map +0 -1
- package/dist/chunk-XHSIT5DL.mjs +0 -16
- package/dist/chunk-XHSIT5DL.mjs.map +0 -1
- package/dist/chunk-XI7KRD2C.mjs +0 -13
- package/dist/chunk-XI7KRD2C.mjs.map +0 -1
- package/dist/chunk-XPSOKBRZ.mjs +0 -12
- package/dist/chunk-XPSOKBRZ.mjs.map +0 -1
- package/dist/chunk-XT74R35S.mjs +0 -1
- package/dist/chunk-XT74R35S.mjs.map +0 -1
- package/dist/chunk-YOPFSFTD.mjs +0 -13
- package/dist/chunk-YOPFSFTD.mjs.map +0 -1
- package/dist/chunk-YXAOYIRV.mjs +0 -1
- package/dist/chunk-YXAOYIRV.mjs.map +0 -1
- package/dist/chunk-YXD3AQAK.mjs +0 -1
- package/dist/chunk-YXD3AQAK.mjs.map +0 -1
- package/dist/chunk-Z7HWEOQX.mjs +0 -14
- package/dist/chunk-Z7HWEOQX.mjs.map +0 -1
- package/dist/chunk-ZA2XI3OV.mjs +0 -1
- package/dist/chunk-ZA2XI3OV.mjs.map +0 -1
- package/dist/chunk-ZPNX2QDE.mjs +0 -13
- package/dist/chunk-ZPNX2QDE.mjs.map +0 -1
- package/dist/error/AbortError.js +0 -36
- package/dist/error/AbortError.js.map +0 -1
- package/dist/error/TimeoutError.js +0 -36
- package/dist/error/TimeoutError.js.map +0 -1
- package/dist/error/index.d.mts +0 -2
- package/dist/error/index.d.ts +0 -2
- package/dist/error/index.js +0 -48
- package/dist/error/index.js.map +0 -1
- package/dist/error/index.mjs +0 -13
- package/dist/error/index.mjs.map +0 -1
- package/dist/function/after.js +0 -42
- package/dist/function/after.js.map +0 -1
- package/dist/function/debounce.js +0 -56
- package/dist/function/debounce.js.map +0 -1
- package/dist/function/negate.js +0 -33
- package/dist/function/negate.js.map +0 -1
- package/dist/function/noop.js +0 -32
- package/dist/function/noop.js.map +0 -1
- package/dist/function/once.js +0 -43
- package/dist/function/once.js.map +0 -1
- package/dist/function/throttle.js +0 -41
- package/dist/function/throttle.js.map +0 -1
- package/dist/math/clamp.js +0 -36
- package/dist/math/clamp.js.map +0 -1
- package/dist/math/inRange.js +0 -40
- package/dist/math/inRange.js.map +0 -1
- package/dist/math/mean.js +0 -44
- package/dist/math/mean.js.map +0 -1
- package/dist/math/meanBy.js +0 -50
- package/dist/math/meanBy.js.map +0 -1
- package/dist/math/random.js +0 -40
- package/dist/math/random.js.map +0 -1
- package/dist/math/randomInt.js +0 -47
- package/dist/math/randomInt.js.map +0 -1
- package/dist/math/range.js +0 -48
- package/dist/math/range.js.map +0 -1
- package/dist/math/round.js +0 -37
- package/dist/math/round.js.map +0 -1
- package/dist/math/sum.js +0 -37
- package/dist/math/sum.js.map +0 -1
- package/dist/math/sumBy.js +0 -45
- package/dist/math/sumBy.js.map +0 -1
- package/dist/object/clone.js +0 -67
- package/dist/object/clone.js.map +0 -1
- package/dist/object/cloneDeep.js +0 -117
- package/dist/object/cloneDeep.js.map +0 -1
- package/dist/object/flattenObject.js +0 -77
- package/dist/object/flattenObject.js.map +0 -1
- package/dist/object/invert.js +0 -40
- package/dist/object/invert.js.map +0 -1
- package/dist/object/omit.js +0 -37
- package/dist/object/omit.js.map +0 -1
- package/dist/object/omitBy.js +0 -40
- package/dist/object/omitBy.js.map +0 -1
- package/dist/object/pick.js +0 -37
- package/dist/object/pick.js.map +0 -1
- package/dist/object/pickBy.js +0 -40
- package/dist/object/pickBy.js.map +0 -1
- package/dist/predicate/isArrayLike.js +0 -40
- package/dist/predicate/isArrayLike.js.map +0 -1
- package/dist/predicate/isEqual.js +0 -73
- package/dist/predicate/isEqual.js.map +0 -1
- package/dist/predicate/isFunction.js +0 -33
- package/dist/predicate/isFunction.js.map +0 -1
- package/dist/predicate/isLength.js +0 -33
- package/dist/predicate/isLength.js.map +0 -1
- package/dist/predicate/isNil.js +0 -33
- package/dist/predicate/isNil.js.map +0 -1
- package/dist/predicate/isNotNil.js +0 -33
- package/dist/predicate/isNotNil.js.map +0 -1
- package/dist/predicate/isNull.js +0 -33
- package/dist/predicate/isNull.js.map +0 -1
- package/dist/predicate/isPlainObject.js +0 -49
- package/dist/predicate/isPlainObject.js.map +0 -1
- package/dist/predicate/isPrimitive.js +0 -33
- package/dist/predicate/isPrimitive.js.map +0 -1
- package/dist/predicate/isTypedArray.js +0 -33
- package/dist/predicate/isTypedArray.js.map +0 -1
- package/dist/predicate/isUndefined.js +0 -33
- package/dist/predicate/isUndefined.js.map +0 -1
- package/dist/promise/delay.js +0 -56
- package/dist/promise/delay.js.map +0 -1
- package/dist/promise/timeout.d.mts +0 -10
- package/dist/promise/timeout.d.ts +0 -10
- package/dist/promise/timeout.js +0 -70
- package/dist/promise/timeout.js.map +0 -1
- package/dist/promise/withTimeout.js +0 -75
- package/dist/promise/withTimeout.js.map +0 -1
- package/dist/string/camelCase.js +0 -51
- package/dist/string/camelCase.js.map +0 -1
- package/dist/string/capitalize.js +0 -33
- package/dist/string/capitalize.js.map +0 -1
- package/dist/string/kebabCase.js +0 -42
- package/dist/string/kebabCase.js.map +0 -1
- package/dist/string/lowerCase.js +0 -42
- package/dist/string/lowerCase.js.map +0 -1
- package/dist/string/snakeCase.js +0 -42
- package/dist/string/snakeCase.js.map +0 -1
- package/dist/string/startCase.js +0 -53
- package/dist/string/startCase.js.map +0 -1
package/dist/compat/index.d.mts
CHANGED
|
@@ -89,549 +89,17 @@ export { kebabCase } from '../string/kebabCase.mjs';
|
|
|
89
89
|
export { lowerCase } from '../string/lowerCase.mjs';
|
|
90
90
|
export { startCase } from '../string/startCase.mjs';
|
|
91
91
|
export { capitalize } from '../string/capitalize.mjs';
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
* @example
|
|
107
|
-
* // Splits an array of numbers into sub-arrays of length 2
|
|
108
|
-
* chunk([1, 2, 3, 4, 5], 2);
|
|
109
|
-
* // Returns: [[1, 2], [3, 4], [5]]
|
|
110
|
-
*
|
|
111
|
-
* @example
|
|
112
|
-
* // Splits an array of strings into sub-arrays of length 3
|
|
113
|
-
* chunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3);
|
|
114
|
-
* // Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]
|
|
115
|
-
*/
|
|
116
|
-
declare function chunk<T>(arr: readonly T[], size?: number): T[][];
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Concatenates multiple arrays and values into a single array.
|
|
120
|
-
*
|
|
121
|
-
* @template T The type of elements in the array.
|
|
122
|
-
* @param {...(T | T[])} values - The values and/or arrays to concatenate.
|
|
123
|
-
* @returns {T[]} A new array containing all the input values.
|
|
124
|
-
*
|
|
125
|
-
* @example
|
|
126
|
-
* // Concatenate individual values
|
|
127
|
-
* concat(1, 2, 3);
|
|
128
|
-
* // returns [1, 2, 3]
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* // Concatenate arrays of values
|
|
132
|
-
* concat([1, 2], [3, 4]);
|
|
133
|
-
* // returns [1, 2, 3, 4]
|
|
134
|
-
*
|
|
135
|
-
* @example
|
|
136
|
-
* // Concatenate a mix of individual values and arrays
|
|
137
|
-
* concat(1, [2, 3], 4);
|
|
138
|
-
* // returns [1, 2, 3, 4]
|
|
139
|
-
*
|
|
140
|
-
* @example
|
|
141
|
-
* // Concatenate nested arrays
|
|
142
|
-
* concat([1, [2, 3]], 4);
|
|
143
|
-
* // returns [1, [2, 3], 4]
|
|
144
|
-
*/
|
|
145
|
-
declare function concat<T>(...values: Array<T | readonly T[]>): T[];
|
|
146
|
-
|
|
147
|
-
declare function difference<T>(arr: readonly T[], ...values: Array<readonly T[]>): T[];
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Fills elements of an array with a specified value from the start position up to, but not including, the end position.
|
|
151
|
-
*
|
|
152
|
-
* This function mutates the original array and replaces its elements with the provided value, starting from the specified
|
|
153
|
-
* start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the
|
|
154
|
-
* entire array.
|
|
155
|
-
*
|
|
156
|
-
* @template T, U, S, V
|
|
157
|
-
* @param {Array<T | U>} array - The array to fill.
|
|
158
|
-
* @param {U} value - The value to fill the array with.
|
|
159
|
-
* @param {S} [start=0] - The start position. Defaults to 0.
|
|
160
|
-
* @param {V} [end=arr.length] - The end position. Defaults to the array's length.
|
|
161
|
-
* @returns {Array<T | U>} The array with the filled values.
|
|
162
|
-
*
|
|
163
|
-
* @example
|
|
164
|
-
* const array = [1, 2, 3];
|
|
165
|
-
* const result = fill(array, 'a');
|
|
166
|
-
* // => ['a', 'a', 'a']
|
|
167
|
-
*
|
|
168
|
-
* const result = fill(Array(3), 2);
|
|
169
|
-
* // => [2, 2, 2]
|
|
170
|
-
*
|
|
171
|
-
* const result = fill([4, 6, 8, 10], '*', 1, 3);
|
|
172
|
-
* // => [4, '*', '*', 10]
|
|
173
|
-
*
|
|
174
|
-
* const result = fill(array, '*', -2, -1);
|
|
175
|
-
* // => [1, '*', 3]
|
|
176
|
-
*/
|
|
177
|
-
declare function fill<T>(array: unknown[], value?: T): T[];
|
|
178
|
-
declare function fill<T, U, S>(array: Array<T | U>, value: U, start: S): Array<T | U>;
|
|
179
|
-
declare function fill<T, U, S, V>(array: Array<T | U>, value: U, start: S, end: V): Array<T | U>;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Creates a deeply nested object given arrays of paths and values.
|
|
183
|
-
*
|
|
184
|
-
* This function takes two arrays: one containing arrays of property paths, and the other containing corresponding values.
|
|
185
|
-
* It returns a new object where paths from the first array are used as key paths to set values, with corresponding elements from the second array as values.
|
|
186
|
-
* Paths can be dot-separated strings or arrays of property names.
|
|
187
|
-
*
|
|
188
|
-
* If the `keys` array is longer than the `values` array, the remaining keys will have `undefined` as their values.
|
|
189
|
-
*
|
|
190
|
-
* @template V - The type of elements in the array.
|
|
191
|
-
* @param {P[] | P[][]} keys - An array of property paths, each path can be a dot-separated string or an array of property names.
|
|
192
|
-
* @param {V[]} values - An array of values corresponding to the property paths.
|
|
193
|
-
* @returns {object} A new object composed of the given property paths and values.
|
|
194
|
-
*
|
|
195
|
-
* @example
|
|
196
|
-
* const paths = ['a.b.c', 'd.e.f'];
|
|
197
|
-
* const values = [1, 2];
|
|
198
|
-
* const result = zipObjectDeep(paths, values);
|
|
199
|
-
* // result will be { a: { b: { c: 1 } }, d: { e: { f: 2 } } }
|
|
200
|
-
*
|
|
201
|
-
* @example
|
|
202
|
-
* const paths = [['a', 'b', 'c'], ['d', 'e', 'f']];
|
|
203
|
-
* const values = [1, 2];
|
|
204
|
-
* const result = zipObjectDeep(paths, values);
|
|
205
|
-
* // result will be { a: { b: { c: 1 } }, d: { e: { f: 2 } } }
|
|
206
|
-
*
|
|
207
|
-
* @example
|
|
208
|
-
* const paths = ['a.b[0].c', 'a.b[1].d'];
|
|
209
|
-
* const values = [1, 2];
|
|
210
|
-
* const result = zipObjectDeep(paths, values);
|
|
211
|
-
* // result will be { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
|
|
212
|
-
*/
|
|
213
|
-
declare function zipObjectDeep<P extends PropertyKey, V>(keys: P[] | P[][], values: V[]): {
|
|
214
|
-
[K in P]: V;
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* See the definition of `@types/lodash`.
|
|
219
|
-
*/
|
|
220
|
-
type GetIndexedField<T, K> = K extends keyof T ? T[K] : K extends `${number}` ? 'length' extends keyof T ? number extends T['length'] ? number extends keyof T ? T[number] : undefined : undefined : undefined : undefined;
|
|
221
|
-
type FieldWithPossiblyUndefined<T, Key> = Get<Exclude<T, undefined>, Key> | Extract<T, undefined>;
|
|
222
|
-
type IndexedFieldWithPossiblyUndefined<T, Key> = GetIndexedField<Exclude<T, undefined>, Key> | Extract<T, undefined>;
|
|
223
|
-
type Get<T, P> = P extends `${infer Left}.${infer Right}` ? Left extends keyof Exclude<T, undefined> ? FieldWithPossiblyUndefined<Exclude<T, undefined>[Left], Right> | Extract<T, undefined> : Left extends `${infer FieldKey}[${infer IndexKey}]` ? FieldKey extends keyof T ? FieldWithPossiblyUndefined<IndexedFieldWithPossiblyUndefined<T[FieldKey], IndexKey>, Right> : undefined : undefined : P extends keyof T ? T[P] : P extends `${infer FieldKey}[${infer IndexKey}]` ? FieldKey extends keyof T ? IndexedFieldWithPossiblyUndefined<T[FieldKey], IndexKey> : undefined : IndexedFieldWithPossiblyUndefined<T, P>;
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
227
|
-
*
|
|
228
|
-
* @template T - The type of the object.
|
|
229
|
-
* @template K - The type of the key in the object.
|
|
230
|
-
* @template D - The type of the default value.
|
|
231
|
-
*
|
|
232
|
-
* @param {T} object - The object to query.
|
|
233
|
-
* @param {K | [K]} path - The path of the property to get.
|
|
234
|
-
* @returns {T[K]} - Returns the resolved value.
|
|
235
|
-
*/
|
|
236
|
-
declare function get<T extends object, K extends keyof T>(object: T, path: K | [K]): T[K];
|
|
237
|
-
/**
|
|
238
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
239
|
-
*
|
|
240
|
-
* @template T - The type of the object.
|
|
241
|
-
* @template K - The type of the key in the object.
|
|
242
|
-
*
|
|
243
|
-
* @param {T | null | undefined} object - The object to query.
|
|
244
|
-
* @param {K | [K]} path - The path of the property to get.
|
|
245
|
-
* @returns {T[K] | undefined} - Returns the resolved value.
|
|
246
|
-
*/
|
|
247
|
-
declare function get<T extends object, K extends keyof T>(object: T | null | undefined, path: K | [K]): T[K] | undefined;
|
|
248
|
-
/**
|
|
249
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
250
|
-
*
|
|
251
|
-
* @template T - The type of the object.
|
|
252
|
-
* @template K - The type of the key in the object.
|
|
253
|
-
* @template D - The type of the default value.
|
|
254
|
-
*
|
|
255
|
-
* @param {T | null | undefined} object - The object to query.
|
|
256
|
-
* @param {K | [K]} path - The path of the property to get.
|
|
257
|
-
* @param {D} defaultValue - The value returned if the resolved value is undefined.
|
|
258
|
-
* @returns {Exclude<T[K], undefined> | D} - Returns the resolved value.
|
|
259
|
-
*/
|
|
260
|
-
declare function get<T extends object, K extends keyof T, D>(object: T | null | undefined, path: K | [K], defaultValue: D): Exclude<T[K], undefined> | D;
|
|
261
|
-
/**
|
|
262
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
263
|
-
*
|
|
264
|
-
* @template T - The type of the object.
|
|
265
|
-
* @template K1 - The type of the first key in the object.
|
|
266
|
-
* @template K2 - The type of the second key in the object.
|
|
267
|
-
*
|
|
268
|
-
* @param {T} object - The object to query.
|
|
269
|
-
* @param {[K1, K2]} path - The path of the property to get.
|
|
270
|
-
* @returns {T[K1][K2]} - Returns the resolved value.
|
|
271
|
-
*/
|
|
272
|
-
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, path: [K1, K2]): T[K1][K2];
|
|
273
|
-
/**
|
|
274
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
275
|
-
*
|
|
276
|
-
* @template T - The type of the object.
|
|
277
|
-
* @template K1 - The type of the first key in the object.
|
|
278
|
-
* @template K2 - The type of the second key in the object.
|
|
279
|
-
*
|
|
280
|
-
* @param {T | null | undefined} object - The object to query.
|
|
281
|
-
* @param {[K1, K2]} path - The path of the property to get.
|
|
282
|
-
* @returns {T[K1][K2] | undefined} - Returns the resolved value.
|
|
283
|
-
*/
|
|
284
|
-
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1]>(object: T | null | undefined, path: [K1, K2]): T[K1][K2] | undefined;
|
|
285
|
-
/**
|
|
286
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
287
|
-
*
|
|
288
|
-
* @template T - The type of the object.
|
|
289
|
-
* @template K1 - The type of the first key in the object.
|
|
290
|
-
* @template K2 - The type of the second key in the object.
|
|
291
|
-
* @template D - The type of the default value.
|
|
292
|
-
*
|
|
293
|
-
* @param {T | null | undefined} object - The object to query.
|
|
294
|
-
* @param {[K1, K2]} path - The path of the property to get.
|
|
295
|
-
* @param {D} defaultValue - The value returned if the resolved value is undefined.
|
|
296
|
-
* @returns {Exclude<T[K1][K2], undefined> | D} - Returns the resolved value.
|
|
297
|
-
*/
|
|
298
|
-
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], D>(object: T | null | undefined, path: [K1, K2], defaultValue: D): Exclude<T[K1][K2], undefined> | D;
|
|
299
|
-
/**
|
|
300
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
301
|
-
*
|
|
302
|
-
* @template T - The type of the object.
|
|
303
|
-
* @template K1 - The type of the first key in the object.
|
|
304
|
-
* @template K2 - The type of the second key in the object.
|
|
305
|
-
* @template K3 - The type of the third key in the object.
|
|
306
|
-
*
|
|
307
|
-
* @param {T} object - The object to query.
|
|
308
|
-
* @param {[K1, K2, K3]} path - The path of the property to get.
|
|
309
|
-
* @returns {T[K1][K2][K3]} - Returns the resolved value.
|
|
310
|
-
*/
|
|
311
|
-
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(object: T, path: [K1, K2, K3]): T[K1][K2][K3];
|
|
312
|
-
/**
|
|
313
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
314
|
-
*
|
|
315
|
-
* @template T - The type of the object.
|
|
316
|
-
* @template K1 - The type of the first key in the object.
|
|
317
|
-
* @template K2 - The type of the second key in the object.
|
|
318
|
-
* @template K3 - The type of the third key in the object.
|
|
319
|
-
*
|
|
320
|
-
* @param {T | null | undefined} object - The object to query.
|
|
321
|
-
* @param {[K1, K2, K3]} path - The path of the property to get.
|
|
322
|
-
* @returns {T[K1][K2][K3] | undefined} - Returns the resolved value.
|
|
323
|
-
*/
|
|
324
|
-
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(object: T | null | undefined, path: [K1, K2, K3]): T[K1][K2][K3] | undefined;
|
|
325
|
-
/**
|
|
326
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
327
|
-
*
|
|
328
|
-
* @template T - The type of the object.
|
|
329
|
-
* @template K1 - The type of the first key in the object.
|
|
330
|
-
* @template K2 - The type of the second key in the object.
|
|
331
|
-
* @template K3 - The type of the third key in the object.
|
|
332
|
-
* @template D - The type of the default value.
|
|
333
|
-
*
|
|
334
|
-
* @param {T | null | undefined} object - The object to query.
|
|
335
|
-
* @param {[K1, K2, K3]} path - The path of the property to get.
|
|
336
|
-
* @param {D} defaultValue - The value returned if the resolved value is undefined.
|
|
337
|
-
* @returns {Exclude<T[K1][K2][K3], undefined> | D} - Returns the resolved value.
|
|
338
|
-
*/
|
|
339
|
-
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], D>(object: T | null | undefined, path: [K1, K2, K3], defaultValue: D): Exclude<T[K1][K2][K3], undefined> | D;
|
|
340
|
-
/**
|
|
341
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
342
|
-
*
|
|
343
|
-
* @template T - The type of the object.
|
|
344
|
-
* @template K1 - The type of the first key in the object.
|
|
345
|
-
* @template K2 - The type of the second key in the object.
|
|
346
|
-
* @template K3 - The type of the third key in the object.
|
|
347
|
-
* @template K4 - The type of the fourth key in the object.
|
|
348
|
-
*
|
|
349
|
-
* @param {T} object - The object to query.
|
|
350
|
-
* @param {[K1, K2, K3, K4]} path - The path of the property to get.
|
|
351
|
-
* @returns {T[K1][K2][K3][K4]} - Returns the resolved value.
|
|
352
|
-
*/
|
|
353
|
-
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3]>(object: T, path: [K1, K2, K3, K4]): T[K1][K2][K3][K4];
|
|
354
|
-
/**
|
|
355
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
356
|
-
*
|
|
357
|
-
* @template T - The type of the object.
|
|
358
|
-
* @template K1 - The type of the first key in the object.
|
|
359
|
-
* @template K2 - The type of the second key in the object.
|
|
360
|
-
* @template K3 - The type of the third key in the object.
|
|
361
|
-
* @template K4 - The type of the fourth key in the object.
|
|
362
|
-
*
|
|
363
|
-
* @param {T | null | undefined} object - The object to query.
|
|
364
|
-
* @param {[K1, K2, K3, K4]} path - The path of the property to get.
|
|
365
|
-
* @returns {T[K1][K2][K3][K4] | undefined} - Returns the resolved value.
|
|
366
|
-
*/
|
|
367
|
-
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3]>(object: T | null | undefined, path: [K1, K2, K3, K4]): T[K1][K2][K3][K4] | undefined;
|
|
368
|
-
/**
|
|
369
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
370
|
-
*
|
|
371
|
-
* @template T - The type of the object.
|
|
372
|
-
* @template K1 - The type of the first key in the object.
|
|
373
|
-
* @template K2 - The type of the second key in the object.
|
|
374
|
-
* @template K3 - The type of the third key in the object.
|
|
375
|
-
* @template K4 - The type of the fourth key in the object.
|
|
376
|
-
* @template D - The type of the default value.
|
|
377
|
-
*
|
|
378
|
-
* @param {T | null | undefined} object - The object to query.
|
|
379
|
-
* @param {[K1, K2, K3, K4]} path - The path of the property to get.
|
|
380
|
-
* @param {D} defaultValue - The value returned if the resolved value is undefined.
|
|
381
|
-
* @returns {Exclude<T[K1][K2][K3][K4], undefined> | D} - Returns the resolved value.
|
|
382
|
-
*/
|
|
383
|
-
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3], D>(object: T | null | undefined, path: [K1, K2, K3, K4], defaultValue: D): Exclude<T[K1][K2][K3][K4], undefined> | D;
|
|
384
|
-
/**
|
|
385
|
-
* Retrieves the value at a given path from an object with numeric keys. If the resolved value is undefined, the defaultValue is returned instead.
|
|
386
|
-
*
|
|
387
|
-
* @template T - The type of the value.
|
|
388
|
-
*
|
|
389
|
-
* @param {Record<number, T>} object - The object to query.
|
|
390
|
-
* @param {number} path - The path of the property to get.
|
|
391
|
-
* @returns {T} - Returns the resolved value.
|
|
392
|
-
*/
|
|
393
|
-
declare function get<T>(object: Record<number, T>, path: number): T;
|
|
394
|
-
/**
|
|
395
|
-
* Retrieves the value at a given path from an object with numeric keys. If the resolved value is undefined, the defaultValue is returned instead.
|
|
396
|
-
*
|
|
397
|
-
* @template T - The type of the value.
|
|
398
|
-
*
|
|
399
|
-
* @param {Record<number, T> | null | undefined} object - The object to query.
|
|
400
|
-
* @param {number} path - The path of the property to get.
|
|
401
|
-
* @returns {T | undefined} - Returns the resolved value.
|
|
402
|
-
*/
|
|
403
|
-
declare function get<T>(object: Record<number, T> | null | undefined, path: number): T | undefined;
|
|
404
|
-
/**
|
|
405
|
-
* Retrieves the value at a given path from an object with numeric keys. If the resolved value is undefined, the defaultValue is returned instead.
|
|
406
|
-
*
|
|
407
|
-
* @template T - The type of the value.
|
|
408
|
-
* @template D - The type of the default value.
|
|
409
|
-
*
|
|
410
|
-
* @param {Record<number, T> | null | undefined} object - The object to query.
|
|
411
|
-
* @param {number} path - The path of the property to get.
|
|
412
|
-
* @param {D} defaultValue - The value returned if the resolved value is undefined.
|
|
413
|
-
* @returns {T | D} - Returns the resolved value.
|
|
414
|
-
*/
|
|
415
|
-
declare function get<T, D>(object: Record<number, T> | null | undefined, path: number, defaultValue: D): T | D;
|
|
416
|
-
/**
|
|
417
|
-
* Retrieves the value at a given path from a null or undefined object, returning the default value.
|
|
418
|
-
*
|
|
419
|
-
* @template D - The type of the default value.
|
|
420
|
-
*
|
|
421
|
-
* @param {null | undefined} object - The object to query.
|
|
422
|
-
* @param {PropertyKey} path - The path of the property to get.
|
|
423
|
-
* @param {D} defaultValue - The value returned if the resolved value is undefined.
|
|
424
|
-
* @returns {D} - Returns the default value.
|
|
425
|
-
*/
|
|
426
|
-
declare function get<D>(object: null | undefined, path: PropertyKey, defaultValue: D): D;
|
|
427
|
-
/**
|
|
428
|
-
* Retrieves the value at a given path from a null or undefined object, returning undefined.
|
|
429
|
-
*
|
|
430
|
-
* @param {null | undefined} object - The object to query.
|
|
431
|
-
* @param {PropertyKey} path - The path of the property to get.
|
|
432
|
-
* @returns {undefined} - Returns undefined.
|
|
433
|
-
*/
|
|
434
|
-
declare function get(object: null | undefined, path: PropertyKey): undefined;
|
|
435
|
-
/**
|
|
436
|
-
* Retrieves the value at a given path from a string-keyed object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
437
|
-
*
|
|
438
|
-
* @template T - The type of the object.
|
|
439
|
-
* @template P - The type of the path.
|
|
440
|
-
*
|
|
441
|
-
* @param {T} data - The object to query.
|
|
442
|
-
* @param {P} path - The path of the property to get.
|
|
443
|
-
* @returns {string extends P ? any : Get<T, P>} - Returns the resolved value.
|
|
444
|
-
*/
|
|
445
|
-
declare function get<T, P extends string>(data: T, path: P): string extends P ? any : Get<T, P>;
|
|
446
|
-
/**
|
|
447
|
-
* Retrieves the value at a given path from a string-keyed object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
448
|
-
*
|
|
449
|
-
* @template T - The type of the object.
|
|
450
|
-
* @template P - The type of the path.
|
|
451
|
-
* @template D - The type of the default value.
|
|
452
|
-
*
|
|
453
|
-
* @param {T} data - The object to query.
|
|
454
|
-
* @param {P} path - The path of the property to get.
|
|
455
|
-
* @param {D} defaultValue - The value returned if the resolved value is undefined.
|
|
456
|
-
* @returns {Exclude<Get<T, P>, null | undefined> | D} - Returns the resolved value.
|
|
457
|
-
*/
|
|
458
|
-
declare function get<T, P extends string, D = Get<T, P>>(data: T, path: P, defaultValue: D): Exclude<Get<T, P>, null | undefined> | D;
|
|
459
|
-
/**
|
|
460
|
-
* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
|
|
461
|
-
*
|
|
462
|
-
* @param {unknown} object - The object to query.
|
|
463
|
-
* @param {PropertyKey | readonly PropertyKey[]} path - The path of the property to get.
|
|
464
|
-
* @param {unknown} [defaultValue] - The value returned if the resolved value is undefined.
|
|
465
|
-
* @returns {any} - Returns the resolved value.
|
|
466
|
-
*/
|
|
467
|
-
declare function get(object: unknown, path: PropertyKey | readonly PropertyKey[], defaultValue?: unknown): any;
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* Sets the value at the specified path of the given object. If any part of the path does not exist, it will be created.
|
|
471
|
-
*
|
|
472
|
-
* @template T - The type of the object.
|
|
473
|
-
* @param {Settable} obj - The object to modify.
|
|
474
|
-
* @param {Path} path - The path of the property to set.
|
|
475
|
-
* @param {any} value - The value to set.
|
|
476
|
-
* @returns {T} - The modified object.
|
|
477
|
-
*
|
|
478
|
-
* @example
|
|
479
|
-
* // Set a value in a nested object
|
|
480
|
-
* const obj = { a: { b: { c: 3 } } };
|
|
481
|
-
* set(obj, 'a.b.c', 4);
|
|
482
|
-
* console.log(obj.a.b.c); // 4
|
|
483
|
-
*
|
|
484
|
-
* @example
|
|
485
|
-
* // Set a value in an array
|
|
486
|
-
* const arr = [1, 2, 3];
|
|
487
|
-
* set(arr, 1, 4);
|
|
488
|
-
* console.log(arr[1]); // 4
|
|
489
|
-
*
|
|
490
|
-
* @example
|
|
491
|
-
* // Create non-existent path and set value
|
|
492
|
-
* const obj = {};
|
|
493
|
-
* set(obj, 'a.b.c', 4);
|
|
494
|
-
* console.log(obj); // { a: { b: { c: 4 } } }
|
|
495
|
-
*/
|
|
496
|
-
declare function set<T>(obj: object, path: PropertyKey | readonly PropertyKey[], value: unknown): T;
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* Checks if a given value is a plain object.
|
|
500
|
-
*
|
|
501
|
-
* A plain object is an object created by the `{}` literal, `new Object()`, or
|
|
502
|
-
* `Object.create(null)`.
|
|
503
|
-
*
|
|
504
|
-
* This function also handles objects with custom
|
|
505
|
-
* `Symbol.toStringTag` properties.
|
|
506
|
-
*
|
|
507
|
-
* `Symbol.toStringTag` is a built-in symbol that a constructor can use to customize the
|
|
508
|
-
* default string description of objects.
|
|
509
|
-
*
|
|
510
|
-
* @param {unknown} [object] - The value to check.
|
|
511
|
-
* @returns {boolean} - True if the value is a plain object, otherwise false.
|
|
512
|
-
*
|
|
513
|
-
* @example
|
|
514
|
-
* console.log(isPlainObject({})); // true
|
|
515
|
-
* console.log(isPlainObject([])); // false
|
|
516
|
-
* console.log(isPlainObject(null)); // false
|
|
517
|
-
* console.log(isPlainObject(Object.create(null))); // true
|
|
518
|
-
* console.log(isPlainObject(new Map())); // false
|
|
519
|
-
*/
|
|
520
|
-
declare function isPlainObject(object?: unknown): boolean;
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
* Checks if the given value is an array.
|
|
524
|
-
*
|
|
525
|
-
* This function tests whether the provided value is an array or not.
|
|
526
|
-
* It returns `true` if the value is an array, and `false` otherwise.
|
|
527
|
-
*
|
|
528
|
-
* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an array.
|
|
529
|
-
*
|
|
530
|
-
* @template T - The type of value.
|
|
531
|
-
* @param {T} value - The value to test if it is an array.
|
|
532
|
-
* @returns {value is Extract<T, unknown[]>} `true` if the value is an array, `false` otherwise.
|
|
533
|
-
*
|
|
534
|
-
* @example
|
|
535
|
-
* const value1 = [1, 2, 3];
|
|
536
|
-
* const value2 = 'abc';
|
|
537
|
-
* const value3 = () => {};
|
|
538
|
-
*
|
|
539
|
-
* console.log(isArray(value1)); // true
|
|
540
|
-
* console.log(isArray(value2)); // false
|
|
541
|
-
* console.log(isArray(value3)); // false
|
|
542
|
-
*/
|
|
543
|
-
declare function isArray<T>(value?: T): value is Extract<T, readonly unknown[]>;
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* Checks if a value is a TypedArray.
|
|
547
|
-
* @param {unknown} x The value to check.
|
|
548
|
-
* @returns {x is
|
|
549
|
-
* | Uint8Array
|
|
550
|
-
* | Uint8ClampedArray
|
|
551
|
-
* | Uint16Array
|
|
552
|
-
* | Uint32Array
|
|
553
|
-
* | BigUint64Array
|
|
554
|
-
* | Int8Array
|
|
555
|
-
* | Int16Array
|
|
556
|
-
* | Int32Array
|
|
557
|
-
* | BigInt64Array
|
|
558
|
-
* | Float32Array
|
|
559
|
-
* | Float64Array} Returns true if `x` is a TypedArray, false otherwise.
|
|
560
|
-
*/
|
|
561
|
-
declare function isTypedArray(x?: unknown): x is Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | BigUint64Array | Int8Array | Int16Array | Int32Array | BigInt64Array | Float32Array | Float64Array;
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* Checks if a string contains another string at the beginning of the string.
|
|
565
|
-
*
|
|
566
|
-
* Checks if one string startsWith another string. Optional position parameter to start searching from a certain index.
|
|
567
|
-
*
|
|
568
|
-
* @param {string} str - The string that might contain the target string.
|
|
569
|
-
* @param {string} target - The string to search for.
|
|
570
|
-
* @param {number} position - An optional offset to start searching in the str string
|
|
571
|
-
* @returns {boolean} - True if the str string starts with the target string.
|
|
572
|
-
*
|
|
573
|
-
* @example
|
|
574
|
-
* const isPrefix = startsWith('fooBar', 'foo') // returns true
|
|
575
|
-
* const isPrefix = startsWith('fooBar', 'bar') // returns false
|
|
576
|
-
* const isPrefix = startsWith('fooBar', 'abc') // returns false
|
|
577
|
-
* const isPrefix = startsWith('fooBar', 'Bar', 2) // returns true
|
|
578
|
-
* const isPrefix = startsWith('fooBar', 'Bar', 5) // returns false
|
|
579
|
-
*/
|
|
580
|
-
declare const startsWith: (str: string, target: string, position?: number) => boolean;
|
|
581
|
-
|
|
582
|
-
/**
|
|
583
|
-
* Checks if a string contains another string at the end of the string.
|
|
584
|
-
*
|
|
585
|
-
* Checks if one string endsWith another string. Optional position parameter to offset searching before a certain index.
|
|
586
|
-
*
|
|
587
|
-
* @param {string} str - The string that might contain the target string.
|
|
588
|
-
* @param {string} target - The string to search for.
|
|
589
|
-
* @param {number} position - An optional position from the start to search up to this index
|
|
590
|
-
* @returns {boolean} - True if the str string ends with the target string.
|
|
591
|
-
*
|
|
592
|
-
* @example
|
|
593
|
-
* const isPrefix = endsWith('fooBar', 'foo') // returns true
|
|
594
|
-
* const isPrefix = endsWith('fooBar', 'bar') // returns false
|
|
595
|
-
* const isPrefix = endsWith('fooBar', 'abc') // returns false
|
|
596
|
-
* const isPrefix = endsWith('fooBar', 'foo', 3) // returns true
|
|
597
|
-
* const isPrefix = endsWith('fooBar', 'abc', 5) // returns false
|
|
598
|
-
*/
|
|
599
|
-
declare const endsWith: (str: string, target: string, position?: number) => boolean;
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* Finds the element in an array that has the maximum value.
|
|
603
|
-
*
|
|
604
|
-
* @template T - The type of elements in the array.
|
|
605
|
-
* @param {T[]} items The array of elements to search.
|
|
606
|
-
* @returns {T | undefined} The element with the maximum value.
|
|
607
|
-
* @example
|
|
608
|
-
* // Returns 9
|
|
609
|
-
* max([3, 1, 4, 1, 5, 9])
|
|
610
|
-
*
|
|
611
|
-
* @example
|
|
612
|
-
* // Returns 8
|
|
613
|
-
* max([0, -3, 2, 8, 7])
|
|
614
|
-
*/
|
|
615
|
-
declare function max<T>(items: readonly [T, ...T[]]): T;
|
|
616
|
-
declare function max(): undefined;
|
|
617
|
-
declare function max<T>(items?: readonly T[]): T | undefined;
|
|
618
|
-
|
|
619
|
-
/**
|
|
620
|
-
* Finds the element in an array that has the minimum value.
|
|
621
|
-
*
|
|
622
|
-
* @template T - The type of elements in the array.
|
|
623
|
-
* @param {T[]} items The array of elements to search.
|
|
624
|
-
* @returns {T | undefined} The element with the minimum value.
|
|
625
|
-
* @example
|
|
626
|
-
* // Returns 1
|
|
627
|
-
* min([3, 1, 4, 1, 5, 9])
|
|
628
|
-
*
|
|
629
|
-
* @example
|
|
630
|
-
* // Returns -3
|
|
631
|
-
* min([0, -3, 2, 8, 7])
|
|
632
|
-
*/
|
|
633
|
-
declare function min<T>(items: readonly [T, ...T[]]): T;
|
|
634
|
-
declare function min(): undefined;
|
|
635
|
-
declare function min<T>(items?: readonly T[]): T | undefined;
|
|
636
|
-
|
|
637
|
-
export { chunk, concat, difference, endsWith, fill, get, isArray, isPlainObject, isTypedArray, max, min, set, startsWith, zipObjectDeep };
|
|
92
|
+
export { chunk } from './array/chunk.mjs';
|
|
93
|
+
export { concat } from './array/concat.mjs';
|
|
94
|
+
export { difference } from './array/difference.mjs';
|
|
95
|
+
export { fill } from './array/fill.mjs';
|
|
96
|
+
export { zipObjectDeep } from './array/zipObjectDeep.mjs';
|
|
97
|
+
export { get } from './object/get.mjs';
|
|
98
|
+
export { set } from './object/set.mjs';
|
|
99
|
+
export { isPlainObject } from './predicate/isPlainObject.mjs';
|
|
100
|
+
export { isArray } from './predicate/isArray.mjs';
|
|
101
|
+
export { isTypedArray } from './predicate/isTypedArray.mjs';
|
|
102
|
+
export { startsWith } from './string/startsWith.mjs';
|
|
103
|
+
export { endsWith } from './string/endsWith.mjs';
|
|
104
|
+
export { max } from './math/max.mjs';
|
|
105
|
+
export { min } from './math/min.mjs';
|