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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/compat/index.ts","../src/compat/array/chunk.ts","../src/compat/array/concat.ts","../src/compat/array/difference.ts","../src/compat/array/fill.ts","../src/compat/_internal/isIndex.ts","../src/compat/_internal/toPath.ts","../src/compat/object/set.ts","../src/compat/array/zipObjectDeep.ts","../src/compat/_internal/isDeepKey.ts","../src/compat/object/get.ts","../src/compat/predicate/isPlainObject.ts","../src/compat/predicate/isArray.ts","../src/compat/predicate/isTypedArray.ts","../src/compat/string/startsWith.ts","../src/compat/string/endsWith.ts","../src/compat/math/max.ts","../src/compat/math/min.ts"],"sourcesContent":["/**\n * es-toolkit compatibility layer with lodash (WIP)\n * ====================================\n * ```tsx\n * // es-toolkit/compat aims to provide 100% feature parity with lodash\n * import { chunk } from 'es-toolkit/compat';\n *\n * chunk([1, 2, 3, 4], 0);\n * // Returns [], which is identical to lodash\n * ```\n *\n * `es-toolkit/compat` will offer complete compatibility with lodash, ensuring a seamless transition.\n *\n * To guarantee identical behavior, `es-toolkit/compat` will be thoroughly tested using actual lodash test cases.\n *\n * The primary goal of `es-toolkit/compat` is to serve as a drop-in replacement for lodash.\n *\n * It's important to note that while `es-toolkit/compat` will mirror the behavior of lodash functions with 100% accuracy,\n * it will deliberately omit unsafe features, such as:\n *\n * - Implicit type casting from an empty string `''` to 0 or false, and similar cases.\n *\n * @module\n */\nexport * from '../index.ts';\n\nexport { chunk } from './array/chunk.ts';\nexport { concat } from './array/concat.ts';\nexport { difference } from './array/difference.ts';\nexport { fill } from './array/fill.ts';\nexport { zipObjectDeep } from './array/zipObjectDeep.ts';\nexport { head as first } from '../index.ts';\n\nexport { get } from './object/get.ts';\nexport { set } from './object/set.ts';\n\nexport { isPlainObject } from './predicate/isPlainObject.ts';\nexport { isArray } from './predicate/isArray.ts';\nexport { isTypedArray } from './predicate/isTypedArray.ts';\n\nexport { startsWith } from './string/startsWith.ts';\nexport { endsWith } from './string/endsWith.ts';\n\nexport { max } from './math/max.ts';\nexport { min } from './math/min.ts';\n","import { chunk as chunkToolkit } from '../../array/chunk.ts';\n\n/**\n * Splits an array into smaller arrays of a specified length.\n *\n * This function takes an input array and divides it into multiple smaller arrays,\n * each of a specified length. If the input array cannot be evenly divided,\n * the final sub-array will contain the remaining elements.\n *\n * @template T The type of elements in the array.\n * @param {T[]} arr - The array to be chunked into smaller arrays.\n * @param {number} size - The size of each smaller array. Must be a positive integer.\n * @returns {T[][]} A two-dimensional array where each sub-array has a maximum length of `size`.\n * @throws {Error} Throws an error if `size` is not a positive integer.\n *\n * @example\n * // Splits an array of numbers into sub-arrays of length 2\n * chunk([1, 2, 3, 4, 5], 2);\n * // Returns: [[1, 2], [3, 4], [5]]\n *\n * @example\n * // Splits an array of strings into sub-arrays of length 3\n * chunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3);\n * // Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]\n */\nexport function chunk<T>(arr: readonly T[], size = 1): T[][] {\n size = Math.max(Math.floor(size), 0);\n\n if (size === 0) {\n return [];\n }\n\n return chunkToolkit(arr, size);\n}\n","import { flatten } from '../../array/flatten.ts';\n\n/**\n * Concatenates multiple arrays and values into a single array.\n *\n * @template T The type of elements in the array.\n * @param {...(T | T[])} values - The values and/or arrays to concatenate.\n * @returns {T[]} A new array containing all the input values.\n *\n * @example\n * // Concatenate individual values\n * concat(1, 2, 3);\n * // returns [1, 2, 3]\n *\n * @example\n * // Concatenate arrays of values\n * concat([1, 2], [3, 4]);\n * // returns [1, 2, 3, 4]\n *\n * @example\n * // Concatenate a mix of individual values and arrays\n * concat(1, [2, 3], 4);\n * // returns [1, 2, 3, 4]\n *\n * @example\n * // Concatenate nested arrays\n * concat([1, [2, 3]], 4);\n * // returns [1, [2, 3], 4]\n */\nexport function concat<T>(...values: Array<T | readonly T[]>): T[] {\n return flatten(values) as T[];\n}\n","import { difference as differenceToolkit } from '../../array/difference.ts';\nimport { flatten } from '../../array/flatten.ts';\n\nexport function difference<T>(arr: readonly T[], ...values: Array<readonly T[]>): T[] {\n const arr1 = arr;\n const arr2 = flatten(values);\n\n return differenceToolkit(arr1, arr2);\n}","import { fill as fillToolkit } from '../../array/fill.ts';\n\n/**\n * Fills elements of an array with a specified value from the start position up to, but not including, the end position.\n *\n * This function mutates the original array and replaces its elements with the provided value, starting from the specified\n * start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the\n * entire array.\n *\n * @template T, U, S, V\n * @param {Array<T | U>} array - The array to fill.\n * @param {U} value - The value to fill the array with.\n * @param {S} [start=0] - The start position. Defaults to 0.\n * @param {V} [end=arr.length] - The end position. Defaults to the array's length.\n * @returns {Array<T | U>} The array with the filled values.\n *\n * @example\n * const array = [1, 2, 3];\n * const result = fill(array, 'a');\n * // => ['a', 'a', 'a']\n *\n * const result = fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * const result = fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n *\n * const result = fill(array, '*', -2, -1);\n * // => [1, '*', 3]\n */\nexport function fill<T>(array: unknown[], value?: T): T[];\nexport function fill<T, U, S>(array: Array<T | U>, value: U, start: S): Array<T | U>;\nexport function fill<T, U, S, V>(array: Array<T | U>, value: U, start: S, end: V): Array<T | U>;\nexport function fill<T, U>(array: Array<T | U>, value: U, start = 0, end = array.length): Array<T | U> {\n start = Math.floor(start);\n end = Math.floor(end);\n\n if (!start) {\n start = 0;\n }\n if (!end) {\n end = 0;\n }\n\n return fillToolkit(array, value, start, end);\n}\n","const IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\\d*)$/\n\nexport function isIndex(value: PropertyKey) {\n switch (typeof value) {\n case 'number': {\n return Number.isInteger(value) && value >= 0 && value < Number.MAX_SAFE_INTEGER;\n }\n case 'symbol': {\n return false;\n }\n case 'string': {\n return IS_UNSIGNED_INTEGER.test(value);\n }\n }\n}","/**\n * Converts a deep key string into an array of path segments.\n *\n * This function takes a string representing a deep key (e.g., 'a.b.c' or 'a[b][c]') and breaks it down into an array of strings, each representing a segment of the path.\n *\n * @param {string} deepKey - The deep key string to convert.\n * @returns {string[]} An array of strings, each representing a segment of the path.\n *\n * Examples:\n *\n * toPath('a.b.c') // Returns ['a', 'b', 'c']\n * toPath('a[b][c]') // Returns ['a', 'b', 'c']\n * toPath('.a.b.c') // Returns ['', 'a', 'b', 'c']\n * toPath('a[\"b.c\"].d') // Returns ['a', 'b.c', 'd']\n * toPath('') // Returns []\n * toPath('.a[b].c.d[e][\"f.g\"].h') // Returns ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']\n */\nexport function toPath(deepKey: string): string[] {\n const ESCAPE_REGEXP = /\\\\(\\\\)?/g;\n const PROPERTY_REGEXP = RegExp(\n // Match anything that isn't a dot or bracket.\n '[^.[\\\\]]+' +\n '|' +\n // Or match property names within brackets.\n '\\\\[(?:' +\n // Match a non-string expression.\n '([^\"\\'][^[]*)' +\n '|' +\n // Or match strings (supports escaping characters).\n '([\"\\'])((?:(?!\\\\2)[^\\\\\\\\]|\\\\\\\\.)*?)\\\\2' +\n ')\\\\]' +\n '|' +\n // Or match \"\" as the space between consecutive dots or empty brackets.\n '(?=(?:\\\\.|\\\\[\\\\])(?:\\\\.|\\\\[\\\\]|$))',\n 'g'\n );\n\n const result: string[] = [];\n\n if (deepKey[0] === '.') {\n result.push('');\n }\n\n let match: RegExpExecArray | null;\n let lastIndex = 0;\n\n while ((match = PROPERTY_REGEXP.exec(deepKey)) !== null) {\n let key = match[0];\n const expr = match[1];\n const quote = match[2];\n const substr = match[3];\n\n if (quote) {\n key = substr.replace(ESCAPE_REGEXP, '$1');\n } else if (expr) {\n key = expr;\n }\n\n result.push(key);\n\n if (PROPERTY_REGEXP.lastIndex === lastIndex) {\n PROPERTY_REGEXP.lastIndex++;\n } else {\n lastIndex = PROPERTY_REGEXP.lastIndex;\n }\n }\n\n return result;\n}\n","import { isIndex } from \"../_internal/isIndex.ts\";\nimport { toPath } from \"../_internal/toPath.ts\";\n\n/**\n * Sets the value at the specified path of the given object. If any part of the path does not exist, it will be created.\n *\n * @template T - The type of the object.\n * @param {Settable} obj - The object to modify.\n * @param {Path} path - The path of the property to set.\n * @param {any} value - The value to set.\n * @returns {T} - The modified object.\n *\n * @example\n * // Set a value in a nested object\n * const obj = { a: { b: { c: 3 } } };\n * set(obj, 'a.b.c', 4);\n * console.log(obj.a.b.c); // 4\n *\n * @example\n * // Set a value in an array\n * const arr = [1, 2, 3];\n * set(arr, 1, 4);\n * console.log(arr[1]); // 4\n *\n * @example\n * // Create non-existent path and set value\n * const obj = {};\n * set(obj, 'a.b.c', 4);\n * console.log(obj); // { a: { b: { c: 4 } } }\n */\nexport function set<T>(obj: object, path: PropertyKey | readonly PropertyKey[], value: unknown): T;\nexport function set<T extends object>(obj: T, path: PropertyKey | readonly PropertyKey[], value: unknown): T {\n const resolvedPath = Array.isArray(path)\n ? path\n : typeof path === 'string'\n ? toPath(path)\n : [path];\n\n let current: any = obj;\n\n for (let i = 0; i < resolvedPath.length - 1; i++) {\n const key = resolvedPath[i];\n const nextKey = resolvedPath[i + 1];\n\n if (current[key] == null) {\n current[key] = isIndex(nextKey) ? [] : {};\n }\n\n current = current[key];\n }\n\n const lastKey = resolvedPath[resolvedPath.length - 1];\n current[lastKey] = value;\n\n return obj;\n}\n","import { zip } from \"../../array/zip.ts\";\nimport { set } from \"../object/set.ts\";\n\n/**\n * Creates a deeply nested object given arrays of paths and values.\n *\n * This function takes two arrays: one containing arrays of property paths, and the other containing corresponding values.\n * 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.\n * Paths can be dot-separated strings or arrays of property names.\n * \n * If the `keys` array is longer than the `values` array, the remaining keys will have `undefined` as their values.\n *\n * @template V - The type of elements in the array.\n * @param {P[] | P[][]} keys - An array of property paths, each path can be a dot-separated string or an array of property names.\n * @param {V[]} values - An array of values corresponding to the property paths.\n * @returns {object} A new object composed of the given property paths and values.\n *\n * @example\n * const paths = ['a.b.c', 'd.e.f'];\n * const values = [1, 2];\n * const result = zipObjectDeep(paths, values);\n * // result will be { a: { b: { c: 1 } }, d: { e: { f: 2 } } }\n *\n * @example\n * const paths = [['a', 'b', 'c'], ['d', 'e', 'f']];\n * const values = [1, 2];\n * const result = zipObjectDeep(paths, values);\n * // result will be { a: { b: { c: 1 } }, d: { e: { f: 2 } } }\n * \n * @example\n * const paths = ['a.b[0].c', 'a.b[1].d'];\n * const values = [1, 2];\n * const result = zipObjectDeep(paths, values);\n * // result will be { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\nexport function zipObjectDeep<P extends PropertyKey, V>(keys: P[] | P[][], values: V[]): { [K in P]: V } {\n const result = {} as { [K in P]: V };\n const zipped = zip<P | P[], V>(keys, values);\n\n for (let i = 0; i < zipped.length; i++) {\n const [key, value] = zipped[i];\n\n if (key != null) {\n set(result, key, value);\n }\n }\n\n return result;\n}\n","const IS_PLAIN = /^\\w*$/;\nconst IS_DEEP = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/;\n\n/**\n * Checks if a given key is a deep key.\n *\n * A deep key is a string that contains a dot (.) or square brackets with a property accessor.\n *\n * @param {PropertyKey} key - The key to check.\n * @returns {boolean} - Returns true if the key is a deep key, otherwise false.\n *\n * Examples:\n *\n * isDeepKey('a.b') // true\n * isDeepKey('a[b]') // true\n * isDeepKey('a') // false\n * isDeepKey(123) // false\n * isDeepKey('a.b.c') // true\n * isDeepKey('a[b][c]') // true\n */\nexport function isDeepKey(key: PropertyKey): boolean {\n switch (typeof key) {\n case 'number':\n case 'symbol': {\n return false;\n }\n case 'string': {\n return !IS_PLAIN.test(key) && IS_DEEP.test(key);\n }\n }\n}\n","import { isDeepKey } from \"../_internal/isDeepKey.ts\";\nimport { toPath } from \"../_internal/toPath.ts\";\nimport type { Get } from \"./get.types.ts\";\n\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template K - The type of the key in the object.\n * @template D - The type of the default value.\n * \n * @param {T} object - The object to query.\n * @param {K | [K]} path - The path of the property to get.\n * @returns {T[K]} - Returns the resolved value.\n */\nexport function get<T extends object, K extends keyof T>(object: T, path: K | [K]): T[K];\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template K - The type of the key in the object.\n * \n * @param {T | null | undefined} object - The object to query.\n * @param {K | [K]} path - The path of the property to get.\n * @returns {T[K] | undefined} - Returns the resolved value.\n */\nexport function get<T extends object, K extends keyof T>(object: T | null | undefined, path: K | [K]): T[K] | undefined;\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template K - The type of the key in the object.\n * @template D - The type of the default value.\n * \n * @param {T | null | undefined} object - The object to query.\n * @param {K | [K]} path - The path of the property to get.\n * @param {D} defaultValue - The value returned if the resolved value is undefined.\n * @returns {Exclude<T[K], undefined> | D} - Returns the resolved value.\n */\nexport function get<T extends object, K extends keyof T, D>(object: T | null | undefined, path: K | [K], defaultValue: D): Exclude<T[K], undefined> | D;\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template K1 - The type of the first key in the object.\n * @template K2 - The type of the second key in the object.\n * \n * @param {T} object - The object to query.\n * @param {[K1, K2]} path - The path of the property to get.\n * @returns {T[K1][K2]} - Returns the resolved value.\n */\nexport function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, path: [K1, K2]): T[K1][K2];\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template K1 - The type of the first key in the object.\n * @template K2 - The type of the second key in the object.\n * \n * @param {T | null | undefined} object - The object to query.\n * @param {[K1, K2]} path - The path of the property to get.\n * @returns {T[K1][K2] | undefined} - Returns the resolved value.\n */\nexport 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;\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template K1 - The type of the first key in the object.\n * @template K2 - The type of the second key in the object.\n * @template D - The type of the default value.\n * \n * @param {T | null | undefined} object - The object to query.\n * @param {[K1, K2]} path - The path of the property to get.\n * @param {D} defaultValue - The value returned if the resolved value is undefined.\n * @returns {Exclude<T[K1][K2], undefined> | D} - Returns the resolved value.\n */\nexport 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;\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template K1 - The type of the first key in the object.\n * @template K2 - The type of the second key in the object.\n * @template K3 - The type of the third key in the object.\n * \n * @param {T} object - The object to query.\n * @param {[K1, K2, K3]} path - The path of the property to get.\n * @returns {T[K1][K2][K3]} - Returns the resolved value.\n */\nexport 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];\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template K1 - The type of the first key in the object.\n * @template K2 - The type of the second key in the object.\n * @template K3 - The type of the third key in the object.\n * \n * @param {T | null | undefined} object - The object to query.\n * @param {[K1, K2, K3]} path - The path of the property to get.\n * @returns {T[K1][K2][K3] | undefined} - Returns the resolved value.\n */\nexport 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;\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template K1 - The type of the first key in the object.\n * @template K2 - The type of the second key in the object.\n * @template K3 - The type of the third key in the object.\n * @template D - The type of the default value.\n * \n * @param {T | null | undefined} object - The object to query.\n * @param {[K1, K2, K3]} path - The path of the property to get.\n * @param {D} defaultValue - The value returned if the resolved value is undefined.\n * @returns {Exclude<T[K1][K2][K3], undefined> | D} - Returns the resolved value.\n */\nexport 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;\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template K1 - The type of the first key in the object.\n * @template K2 - The type of the second key in the object.\n * @template K3 - The type of the third key in the object.\n * @template K4 - The type of the fourth key in the object.\n * \n * @param {T} object - The object to query.\n * @param {[K1, K2, K3, K4]} path - The path of the property to get.\n * @returns {T[K1][K2][K3][K4]} - Returns the resolved value.\n */\nexport 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];\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template K1 - The type of the first key in the object.\n * @template K2 - The type of the second key in the object.\n * @template K3 - The type of the third key in the object.\n * @template K4 - The type of the fourth key in the object.\n * \n * @param {T | null | undefined} object - The object to query.\n * @param {[K1, K2, K3, K4]} path - The path of the property to get.\n * @returns {T[K1][K2][K3][K4] | undefined} - Returns the resolved value.\n */\nexport 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;\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template K1 - The type of the first key in the object.\n * @template K2 - The type of the second key in the object.\n * @template K3 - The type of the third key in the object.\n * @template K4 - The type of the fourth key in the object.\n * @template D - The type of the default value.\n * \n * @param {T | null | undefined} object - The object to query.\n * @param {[K1, K2, K3, K4]} path - The path of the property to get.\n * @param {D} defaultValue - The value returned if the resolved value is undefined.\n * @returns {Exclude<T[K1][K2][K3][K4], undefined> | D} - Returns the resolved value.\n */\nexport 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;\n/**\n * Retrieves the value at a given path from an object with numeric keys. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the value.\n * \n * @param {Record<number, T>} object - The object to query.\n * @param {number} path - The path of the property to get.\n * @returns {T} - Returns the resolved value.\n */\nexport function get<T>(object: Record<number, T>, path: number): T;\n/**\n * Retrieves the value at a given path from an object with numeric keys. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the value.\n * \n * @param {Record<number, T> | null | undefined} object - The object to query.\n * @param {number} path - The path of the property to get.\n * @returns {T | undefined} - Returns the resolved value.\n */\nexport function get<T>(object: Record<number, T> | null | undefined, path: number): T | undefined;\n/**\n * Retrieves the value at a given path from an object with numeric keys. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the value.\n * @template D - The type of the default value.\n * \n * @param {Record<number, T> | null | undefined} object - The object to query.\n * @param {number} path - The path of the property to get.\n * @param {D} defaultValue - The value returned if the resolved value is undefined.\n * @returns {T | D} - Returns the resolved value.\n */\nexport function get<T, D>(object: Record<number, T> | null | undefined, path: number, defaultValue: D): T | D;\n/**\n * Retrieves the value at a given path from a null or undefined object, returning the default value.\n * \n * @template D - The type of the default value.\n * \n * @param {null | undefined} object - The object to query.\n * @param {PropertyKey} path - The path of the property to get.\n * @param {D} defaultValue - The value returned if the resolved value is undefined.\n * @returns {D} - Returns the default value.\n */\nexport function get<D>(object: null | undefined, path: PropertyKey, defaultValue: D): D;\n/**\n * Retrieves the value at a given path from a null or undefined object, returning undefined.\n * \n * @param {null | undefined} object - The object to query.\n * @param {PropertyKey} path - The path of the property to get.\n * @returns {undefined} - Returns undefined.\n */\nexport function get(object: null | undefined, path: PropertyKey): undefined;\n/**\n * Retrieves the value at a given path from a string-keyed object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template P - The type of the path.\n * \n * @param {T} data - The object to query.\n * @param {P} path - The path of the property to get.\n * @returns {string extends P ? any : Get<T, P>} - Returns the resolved value.\n */\nexport function get<T, P extends string>(data: T, path: P): string extends P ? any : Get<T, P>;\n/**\n * Retrieves the value at a given path from a string-keyed object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @template T - The type of the object.\n * @template P - The type of the path.\n * @template D - The type of the default value.\n * \n * @param {T} data - The object to query.\n * @param {P} path - The path of the property to get.\n * @param {D} defaultValue - The value returned if the resolved value is undefined.\n * @returns {Exclude<Get<T, P>, null | undefined> | D} - Returns the resolved value.\n */\nexport function get<T, P extends string, D = Get<T, P>>(data: T, path: P, defaultValue: D): Exclude<Get<T, P>, null | undefined> | D;\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n * \n * @param {unknown} object - The object to query.\n * @param {PropertyKey | readonly PropertyKey[]} path - The path of the property to get.\n * @param {unknown} [defaultValue] - The value returned if the resolved value is undefined.\n * @returns {any} - Returns the resolved value.\n */\nexport function get(object: unknown, path: PropertyKey | readonly PropertyKey[], defaultValue?: unknown): any;\nexport function get(object: any, path: PropertyKey | readonly PropertyKey[], defaultValue?: any): any {\n let resolvedPath;\n\n if (Array.isArray(path)) {\n resolvedPath = path;\n } else if (typeof path === 'string' && isDeepKey(path) && object?.[path] == null) {\n resolvedPath = toPath(path);\n } else {\n resolvedPath = [path];\n }\n\n if (resolvedPath.length === 0) {\n return defaultValue;\n }\n\n let current = object;\n let index;\n\n for (index = 0; index < resolvedPath.length && current != null; index++) {\n let key = resolvedPath[index];\n\n if (Object.is(key.valueOf(), -0)) {\n key = '-0';\n }\n\n current = current[key];\n }\n\n if (current === null && index === resolvedPath.length) {\n return current;\n }\n\n return current ?? defaultValue;\n}","/**\n * Checks if a given value is a plain object.\n *\n * A plain object is an object created by the `{}` literal, `new Object()`, or\n * `Object.create(null)`.\n *\n * This function also handles objects with custom\n * `Symbol.toStringTag` properties.\n *\n * `Symbol.toStringTag` is a built-in symbol that a constructor can use to customize the\n * default string description of objects.\n *\n * @param {unknown} [object] - The value to check.\n * @returns {boolean} - True if the value is a plain object, otherwise false.\n *\n * @example\n * console.log(isPlainObject({})); // true\n * console.log(isPlainObject([])); // false\n * console.log(isPlainObject(null)); // false\n * console.log(isPlainObject(Object.create(null))); // true\n * console.log(isPlainObject(new Map())); // false\n */\nexport function isPlainObject(object?: unknown): boolean {\n if (typeof object !== 'object') {\n return false;\n }\n\n if (object == null) {\n return false;\n }\n\n if (Object.getPrototypeOf(object) === null) {\n return true;\n }\n\n if (object.toString() !== '[object Object]') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const tag = object[Symbol.toStringTag];\n\n if (tag == null) {\n return false;\n }\n\n const isTagReadonly = !Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable;\n\n if (isTagReadonly) {\n return false;\n }\n\n return object.toString() === `[object ${tag}]`;\n }\n\n let proto = object;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(object) === proto;\n}\n","/**\n * Checks if the given value is an array.\n *\n * This function tests whether the provided value is an array or not.\n * It returns `true` if the value is an array, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an array.\n *\n * @template T - The type of value.\n * @param {T} value - The value to test if it is an array.\n * @returns {value is Extract<T, unknown[]>} `true` if the value is an array, `false` otherwise.\n *\n * @example\n * const value1 = [1, 2, 3];\n * const value2 = 'abc';\n * const value3 = () => {};\n *\n * console.log(isArray(value1)); // true\n * console.log(isArray(value2)); // false\n * console.log(isArray(value3)); // false\n */\nexport function isArray<T>(value?: T): value is Extract<T, readonly unknown[]> {\n return Array.isArray(value);\n}\n","import { isTypedArray as isTypedArrayToolkit } from '../../predicate/isTypedArray.ts';\n\n/**\n * Checks if a value is a TypedArray.\n * @param {unknown} x The value to check.\n * @returns {x is\n * | Uint8Array\n * | Uint8ClampedArray\n * | Uint16Array\n * | Uint32Array\n * | BigUint64Array\n * | Int8Array\n * | Int16Array\n * | Int32Array\n * | BigInt64Array\n * | Float32Array\n * | Float64Array} Returns true if `x` is a TypedArray, false otherwise.\n */\nexport function isTypedArray(\n x?: unknown\n): x is\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | BigUint64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | BigInt64Array\n | Float32Array\n | Float64Array {\n return isTypedArrayToolkit(x);\n}\n","/**\n * Checks if a string contains another string at the beginning of the string.\n *\n * Checks if one string startsWith another string. Optional position parameter to start searching from a certain index.\n *\n * @param {string} str - The string that might contain the target string.\n * @param {string} target - The string to search for.\n * @param {number} position - An optional offset to start searching in the str string\n * @returns {boolean} - True if the str string starts with the target string.\n *\n * @example\n * const isPrefix = startsWith('fooBar', 'foo') // returns true\n * const isPrefix = startsWith('fooBar', 'bar') // returns false\n * const isPrefix = startsWith('fooBar', 'abc') // returns false\n * const isPrefix = startsWith('fooBar', 'Bar', 2) // returns true\n * const isPrefix = startsWith('fooBar', 'Bar', 5) // returns false\n */\nexport const startsWith = (str: string, target: string, position = 0): boolean => {\n return str.startsWith(target, position);\n};\n","/**\n * Checks if a string contains another string at the end of the string.\n *\n * Checks if one string endsWith another string. Optional position parameter to offset searching before a certain index.\n *\n * @param {string} str - The string that might contain the target string.\n * @param {string} target - The string to search for.\n * @param {number} position - An optional position from the start to search up to this index\n * @returns {boolean} - True if the str string ends with the target string.\n *\n * @example\n * const isPrefix = endsWith('fooBar', 'foo') // returns true\n * const isPrefix = endsWith('fooBar', 'bar') // returns false\n * const isPrefix = endsWith('fooBar', 'abc') // returns false\n * const isPrefix = endsWith('fooBar', 'foo', 3) // returns true\n * const isPrefix = endsWith('fooBar', 'abc', 5) // returns false\n */\nexport const endsWith = (str: string, target: string, position: number = str.length): boolean => {\n return str.endsWith(target, position);\n};\n","/**\n * Finds the element in an array that has the maximum value.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @returns {T | undefined} The element with the maximum value.\n * @example\n * // Returns 9\n * max([3, 1, 4, 1, 5, 9])\n *\n * @example\n * // Returns 8\n * max([0, -3, 2, 8, 7])\n */\nexport function max<T>(items: readonly [T, ...T[]]): T;\nexport function max(): undefined;\nexport function max<T>(items?: readonly T[]): T | undefined;\nexport function max<T>(items: readonly T[] = []): T | undefined {\n let maxElement = items[0];\n let max = undefined;\n\n for (const element of items) {\n if (max == null || element > max) {\n max = element;\n maxElement = element;\n }\n }\n\n return maxElement;\n}\n","/**\n * Finds the element in an array that has the minimum value.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @returns {T | undefined} The element with the minimum value.\n * @example\n * // Returns 1\n * min([3, 1, 4, 1, 5, 9])\n *\n * @example\n * // Returns -3\n * min([0, -3, 2, 8, 7])\n */\nexport function min<T>(items: readonly [T, ...T[]]): T;\nexport function min(): undefined;\nexport function min<T>(items?: readonly T[]): T | undefined;\nexport function min<T>(items: readonly T[] = []): T {\n let minElement = items[0];\n let min = undefined;\n\n for (const element of items) {\n if (min == null || element < min) {\n min = element;\n minElement = element;\n }\n }\n\n return minElement;\n}\n"],"mappings":"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","names":["chunk","difference","fill","isTypedArray","chunk","difference","fill","isTypedArray","max","min"]}
|
package/dist/chunk-HPFDYUGP.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/object/pick.ts"],"sourcesContent":["/**\n * Creates a new object composed of the picked object properties.\n *\n * This function takes an object and an array of keys, and returns a new object that\n * includes only the properties corresponding to the specified keys.\n *\n * @template T - The type of object.\n * @template K - The type of keys in object.\n * @param {T} obj - The object to pick keys from.\n * @param {K[]} keys - An array of keys to be picked from the object.\n * @returns {Pick<T, K>} A new object with the specified keys picked.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = pick(obj, ['a', 'c']);\n * // result will be { a: 1, c: 3 }\n */\nexport function pick<T extends Record<string, any>, K extends keyof T>(obj: T, keys: K[]): Pick<T, K> {\n const result = {} as Pick<T, K>;\n\n for (const key of keys) {\n result[key] = obj[key];\n }\n\n return result;\n}\n"],"mappings":";AAiBO,SAAS,KAAuD,KAAQ,MAAuB;AACpG,QAAM,SAAS,CAAC;AAEhB,aAAW,OAAO,MAAM;AACtB,WAAO,GAAG,IAAI,IAAI,GAAG;AAAA,EACvB;AAEA,SAAO;AACT;","names":[]}
|
package/dist/chunk-IEA53J7P.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// src/array/forEachRight.ts
|
|
2
|
-
function forEachRight(arr, callback) {
|
|
3
|
-
for (let i = arr.length - 1; i >= 0; i--) {
|
|
4
|
-
const element = arr[i];
|
|
5
|
-
callback(element, i, arr);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
forEachRight
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=chunk-IEA53J7P.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/forEachRight.ts"],"sourcesContent":["/**\n * Iterates over elements of 'arr' from right to left and invokes 'callback' for each element.\n * \n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to iterate over.\n * @param {(value: T, index: number, arr: T[]) => void} callback - The function invoked per iteration.\n * The callback function receives three arguments:\n * - 'value': The current element being processed in the array.\n * - 'index': The index of the current element being processed in the array.\n * - 'arr': The array 'forEachRight' was called upon.\n * \n * @example\n * const array = [1, 2, 3];\n * const result: number[] = [];\n * \n * // Use the forEachRight function to iterate through the array and add each element to the result array.\n * forEachRight(array, (value) => {\n * result.push(value);\n * })\n * \n * console.log(result) // Output: [3, 2, 1]\n */\n\nexport function forEachRight<T>(arr: T[], callback: (value: T, index: number, arr: T[]) => void): void {\n for (let i = arr.length - 1; i >= 0; i--) {\n const element = arr[i];\n callback(element, i, arr);\n }\n}\n"],"mappings":";AAuBO,SAAS,aAAgB,KAAU,UAA6D;AACrG,WAAS,IAAI,IAAI,SAAS,GAAG,KAAK,GAAG,KAAK;AACxC,UAAM,UAAU,IAAI,CAAC;AACrB,aAAS,SAAS,GAAG,GAAG;AAAA,EAC1B;AACF;","names":[]}
|
package/dist/chunk-IFNXROZR.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// src/array/unzipWith.ts
|
|
2
|
-
function unzipWith(target, iteratee) {
|
|
3
|
-
const maxLength = Math.max(...target.map((innerArray) => innerArray.length));
|
|
4
|
-
const result = new Array(maxLength);
|
|
5
|
-
for (let i = 0; i < maxLength; i++) {
|
|
6
|
-
const group = new Array(target.length);
|
|
7
|
-
for (let j = 0; j < target.length; j++) {
|
|
8
|
-
group[j] = target[j][i];
|
|
9
|
-
}
|
|
10
|
-
result[i] = iteratee(...group);
|
|
11
|
-
}
|
|
12
|
-
return result;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
unzipWith
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=chunk-IFNXROZR.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/unzipWith.ts"],"sourcesContent":["/**\n * Unzips an array of arrays, applying an `iteratee` function to regrouped elements.\n *\n * @template T, R\n * @param {T[][]} target - The nested array to unzip. This is an array of arrays,\n * where each inner array contains elements to be unzipped.\n * @param {(...args: T[]) => R} iteratee - A function to transform the unzipped elements.\n * @returns {R[]} A new array of unzipped and transformed elements. \n *\n * @example\n * const nestedArray = [[1, 2], [3, 4], [5, 6]];\n * const result = unzipWith(nestedArray, (item, item2, item3) => item + item2 + item3);\n * // result will be [9, 12]\n */\nexport function unzipWith<T, R>(target: readonly T[][], iteratee: (...args: T[]) => R): R[] {\n const maxLength = Math.max(...target.map(innerArray => innerArray.length));\n const result: R[] = new Array(maxLength);\n\n for (let i = 0; i < maxLength; i++) {\n const group = new Array(target.length);\n\n for (let j = 0; j < target.length; j++) {\n group[j] = target[j][i];\n }\n\n result[i] = iteratee(...group);\n }\n\n return result;\n}\n"],"mappings":";AAcO,SAAS,UAAgB,QAAwB,UAAoC;AAC1F,QAAM,YAAY,KAAK,IAAI,GAAG,OAAO,IAAI,gBAAc,WAAW,MAAM,CAAC;AACzE,QAAM,SAAc,IAAI,MAAM,SAAS;AAEvC,WAAS,IAAI,GAAG,IAAI,WAAW,KAAK;AAClC,UAAM,QAAQ,IAAI,MAAM,OAAO,MAAM;AAErC,aAAS,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;AACtC,YAAM,CAAC,IAAI,OAAO,CAAC,EAAE,CAAC;AAAA,IACxB;AAEA,WAAO,CAAC,IAAI,SAAS,GAAG,KAAK;AAAA,EAC/B;AAEA,SAAO;AACT;","names":[]}
|
package/dist/chunk-IJD7FE2Z.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// src/array/minBy.ts
|
|
2
|
-
function minBy(items, getValue) {
|
|
3
|
-
let minElement = items[0];
|
|
4
|
-
let min = Infinity;
|
|
5
|
-
for (const element of items) {
|
|
6
|
-
const value = getValue(element);
|
|
7
|
-
if (value < min) {
|
|
8
|
-
min = value;
|
|
9
|
-
minElement = element;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return minElement;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
minBy
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=chunk-IJD7FE2Z.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/minBy.ts"],"sourcesContent":["/**\n * Finds the element in an array that has the minimum value when applying\n * the `getValue` function to each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @param {(element: T) => number} getValue A function that selects a numeric value from each element.\n * @returns {T} The element with the minimum value as determined by the `getValue` function.\n * @example\n * minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 }\n * minBy([], x => x.a); // Returns: undefined\n */\nexport function minBy<T>(items: T[], getValue: (element: T) => number): T {\n let minElement = items[0];\n let min = Infinity;\n\n for (const element of items) {\n const value = getValue(element);\n if (value < min) {\n min = value;\n minElement = element;\n }\n }\n\n return minElement;\n}\n"],"mappings":";AAYO,SAAS,MAAS,OAAY,UAAqC;AACxE,MAAI,aAAa,MAAM,CAAC;AACxB,MAAI,MAAM;AAEV,aAAW,WAAW,OAAO;AAC3B,UAAM,QAAQ,SAAS,OAAO;AAC9B,QAAI,QAAQ,KAAK;AACf,YAAM;AACN,mBAAa;AAAA,IACf;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
package/dist/chunk-IWXZI3QT.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getWords
|
|
3
|
-
} from "./chunk-OG2RLT5U.mjs";
|
|
4
|
-
|
|
5
|
-
// src/string/snakeCase.ts
|
|
6
|
-
var snakeCase = (str) => {
|
|
7
|
-
const words = getWords(str);
|
|
8
|
-
return words.map((word) => word.toLowerCase()).join("_");
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
snakeCase
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=chunk-IWXZI3QT.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/string/snakeCase.ts"],"sourcesContent":["import { getWords } from './_internal/getWords.ts';\n\n/**\n * Converts a string to snake case.\n *\n * Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character.\n *\n * @param {string} str - The string that is to be changed to snake case.\n * @returns {string} - The converted string to snake case.\n *\n * @example\n * const convertedStr1 = snakeCase('camelCase') // returns 'camel_case'\n * const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace'\n * const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text'\n * const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request'\n */\n\nexport const snakeCase = (str: string): string => {\n const words = getWords(str);\n return words.map(word => word.toLowerCase()).join('_');\n};\n"],"mappings":";;;;;AAiBO,IAAM,YAAY,CAAC,QAAwB;AAChD,QAAM,QAAQ,SAAS,GAAG;AAC1B,SAAO,MAAM,IAAI,UAAQ,KAAK,YAAY,CAAC,EAAE,KAAK,GAAG;AACvD;","names":[]}
|
package/dist/chunk-J5LGTIGS.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/chunk-JCRY7ZYS.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// src/array/unzip.ts
|
|
2
|
-
function unzip(zipped) {
|
|
3
|
-
let maxLen = 0;
|
|
4
|
-
for (let i = 0; i < zipped.length; i++) {
|
|
5
|
-
if (zipped[i].length > maxLen) {
|
|
6
|
-
maxLen = zipped[i].length;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
const result = new Array(maxLen);
|
|
10
|
-
for (let i = 0; i < maxLen; i++) {
|
|
11
|
-
result[i] = new Array(zipped.length);
|
|
12
|
-
for (let j = 0; j < zipped.length; j++) {
|
|
13
|
-
result[i][j] = zipped[j][i];
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return result;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
unzip
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=chunk-JCRY7ZYS.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/unzip.ts"],"sourcesContent":["/**\n * Gathers elements in the same position in an internal array\n * from a grouped array of elements and returns them as a new array.\n *\n * @template T - The type of elements in the nested array.\n * @param {Array<[...T]>} zipped - The nested array to unzip.\n * @returns {Unzip<T>} A new array of unzipped elements.\n *\n * @example\n * const zipped = [['a', true, 1],['b', false, 2]];\n * const result = unzip(zipped);\n * // result will be [['a', 'b'], [true, false], [1, 2]]\n */\nexport function unzip<T extends unknown[]>(zipped: Array<[...T]>): Unzip<T> {\n // For performance reasons, use this implementation instead of\n // const maxLen = Math.max(...zipped.map(arr => arr.length));\n let maxLen = 0;\n\n for (let i = 0; i < zipped.length; i++) {\n if (zipped[i].length > maxLen) {\n maxLen = zipped[i].length;\n }\n }\n\n const result = new Array(maxLen) as Unzip<T>;\n\n for (let i = 0; i < maxLen; i++) {\n result[i] = new Array(zipped.length);\n for (let j = 0; j < zipped.length; j++) {\n result[i][j] = zipped[j][i];\n }\n }\n\n return result;\n}\n\ntype Unzip<K extends unknown[]> = { [I in keyof K]: Array<K[I]> };\n"],"mappings":";AAaO,SAAS,MAA2B,QAAiC;AAG1E,MAAI,SAAS;AAEb,WAAS,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;AACtC,QAAI,OAAO,CAAC,EAAE,SAAS,QAAQ;AAC7B,eAAS,OAAO,CAAC,EAAE;AAAA,IACrB;AAAA,EACF;AAEA,QAAM,SAAS,IAAI,MAAM,MAAM;AAE/B,WAAS,IAAI,GAAG,IAAI,QAAQ,KAAK;AAC/B,WAAO,CAAC,IAAI,IAAI,MAAM,OAAO,MAAM;AACnC,aAAS,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;AACtC,aAAO,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,EAAE,CAAC;AAAA,IAC5B;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
package/dist/chunk-JPUKH67K.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/difference.ts"],"sourcesContent":["/**\n * Computes the difference between two arrays.\n *\n * This function takes two arrays and returns a new array containing the elements\n * that are present in the first array but not in the second array. It effectively\n * filters out any elements from the first array that also appear in the second array.\n *\n * @template T\n * @param {T[]} firstArr - The array from which to derive the difference. This is the primary array\n * from which elements will be compared and filtered.\n * @param {T[]} secondArr - The array containing elements to be excluded from the first array.\n * Each element in this array will be checked against the first array, and if a match is found,\n * that element will be excluded from the result.\n * @returns {T[]} A new array containing the elements that are present in the first array but not\n * in the second array.\n *\n * @example\n * const array1 = [1, 2, 3, 4, 5];\n * const array2 = [2, 4];\n * const result = difference(array1, array2);\n * // result will be [1, 3, 5] since 2 and 4 are in both arrays and are excluded from the result.\n */\nexport function difference<T>(firstArr: readonly T[], secondArr: readonly T[]): T[] {\n const secondSet = new Set(secondArr);\n\n return firstArr.filter(item => !secondSet.has(item));\n}\n"],"mappings":";AAsBO,SAAS,WAAc,UAAwB,WAA8B;AAClF,QAAM,YAAY,IAAI,IAAI,SAAS;AAEnC,SAAO,SAAS,OAAO,UAAQ,CAAC,UAAU,IAAI,IAAI,CAAC;AACrD;","names":[]}
|
package/dist/chunk-K5WL54BY.mjs
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// src/object/cloneDeep.ts
|
|
2
|
-
function cloneDeep(obj) {
|
|
3
|
-
if (isPrimitive(obj)) {
|
|
4
|
-
return obj;
|
|
5
|
-
}
|
|
6
|
-
if (Array.isArray(obj)) {
|
|
7
|
-
return obj.map((item) => cloneDeep(item));
|
|
8
|
-
}
|
|
9
|
-
if (obj instanceof Date) {
|
|
10
|
-
return new Date(obj.getTime());
|
|
11
|
-
}
|
|
12
|
-
if (obj instanceof RegExp) {
|
|
13
|
-
return new RegExp(obj.source, obj.flags);
|
|
14
|
-
}
|
|
15
|
-
if (obj instanceof Map) {
|
|
16
|
-
const result = /* @__PURE__ */ new Map();
|
|
17
|
-
for (const [key, value] of obj.entries()) {
|
|
18
|
-
result.set(key, cloneDeep(value));
|
|
19
|
-
}
|
|
20
|
-
return result;
|
|
21
|
-
}
|
|
22
|
-
if (obj instanceof Set) {
|
|
23
|
-
const result = /* @__PURE__ */ new Set();
|
|
24
|
-
for (const value of obj.values()) {
|
|
25
|
-
result.add(cloneDeep(value));
|
|
26
|
-
}
|
|
27
|
-
return result;
|
|
28
|
-
}
|
|
29
|
-
if (isTypedArray(obj)) {
|
|
30
|
-
const result = new (Object.getPrototypeOf(obj)).constructor(obj.length);
|
|
31
|
-
for (let i = 0; i < obj.length; i++) {
|
|
32
|
-
result[i] = cloneDeep(obj[i]);
|
|
33
|
-
}
|
|
34
|
-
return result;
|
|
35
|
-
}
|
|
36
|
-
if (obj instanceof ArrayBuffer || obj instanceof SharedArrayBuffer) {
|
|
37
|
-
return obj.slice(0);
|
|
38
|
-
}
|
|
39
|
-
if (obj instanceof DataView) {
|
|
40
|
-
const result = new DataView(obj.buffer.slice(0));
|
|
41
|
-
cloneDeepHelper(obj, result);
|
|
42
|
-
return result;
|
|
43
|
-
}
|
|
44
|
-
if (typeof File !== "undefined" && obj instanceof File) {
|
|
45
|
-
const result = new File([obj], obj.name, { type: obj.type });
|
|
46
|
-
cloneDeepHelper(obj, result);
|
|
47
|
-
return result;
|
|
48
|
-
}
|
|
49
|
-
if (obj instanceof Blob) {
|
|
50
|
-
const result = new Blob([obj], { type: obj.type });
|
|
51
|
-
cloneDeepHelper(obj, result);
|
|
52
|
-
return result;
|
|
53
|
-
}
|
|
54
|
-
if (obj instanceof Error) {
|
|
55
|
-
const result = new obj.constructor();
|
|
56
|
-
result.message = obj.message;
|
|
57
|
-
result.name = obj.name;
|
|
58
|
-
result.stack = obj.stack;
|
|
59
|
-
result.cause = obj.cause;
|
|
60
|
-
cloneDeepHelper(obj, result);
|
|
61
|
-
return result;
|
|
62
|
-
}
|
|
63
|
-
if (typeof obj === "object" && obj !== null) {
|
|
64
|
-
const result = {};
|
|
65
|
-
cloneDeepHelper(obj, result);
|
|
66
|
-
return result;
|
|
67
|
-
}
|
|
68
|
-
if (typeof obj === "function") {
|
|
69
|
-
return void 0;
|
|
70
|
-
}
|
|
71
|
-
return obj;
|
|
72
|
-
}
|
|
73
|
-
function isPrimitive(value) {
|
|
74
|
-
return value == null || typeof value !== "object" && typeof value !== "function";
|
|
75
|
-
}
|
|
76
|
-
function cloneDeepHelper(obj, clonedObj) {
|
|
77
|
-
for (const key in obj) {
|
|
78
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
79
|
-
const descriptor = Object.getOwnPropertyDescriptor(obj, key);
|
|
80
|
-
if ((descriptor?.writable || descriptor?.set) && typeof descriptor?.value !== "function") {
|
|
81
|
-
clonedObj[key] = cloneDeep(obj[key]);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function isTypedArray(obj) {
|
|
87
|
-
return obj instanceof Uint8Array || obj instanceof Uint8ClampedArray || obj instanceof Uint16Array || obj instanceof Uint32Array || obj instanceof BigUint64Array || obj instanceof Int8Array || obj instanceof Int16Array || obj instanceof Int32Array || obj instanceof BigInt64Array || obj instanceof Float32Array || obj instanceof Float64Array;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export {
|
|
91
|
-
cloneDeep
|
|
92
|
-
};
|
|
93
|
-
//# sourceMappingURL=chunk-K5WL54BY.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/object/cloneDeep.ts"],"sourcesContent":["/**\n * Creates a deep clone of the given object.\n *\n * @template T - The type of the object.\n * @param {T} obj - The object to clone.\n * @returns {T} - A deep clone of the given object.\n *\n * @example\n * // Clone a primitive values\n * const num = 29;\n * const clonedNum = clone(num);\n * console.log(clonedNum); // 29\n * console.log(clonedNum === num) ; // true\n *\n * @example\n * // Clone an array\n * const arr = [1, 2, 3];\n * const clonedArr = clone(arr);\n * console.log(clonedArr); // [1, 2, 3]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an array with nested objects\n * const arr = [1, { a: 1 }, [1, 2, 3]];\n * const clonedArr = clone(arr);\n * arr[1].a = 2;\n * console.log(arr); // [2, { a: 2 }, [1, 2, 3]]\n * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an object\n * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n * const clonedObj = clone(obj);\n * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n * console.log(clonedObj === obj); // false\n *\n * @example\n * // Clone an object with nested objects\n * const obj = { a: 1, b: { c: 1 } };\n * const clonedObj = clone(obj);\n * obj.b.c = 2;\n * console.log(obj); // { a: 1, b: { c: 2 } }\n * console.log(clonedObj); // { a: 1, b: { c: 1 } }\n * console.log(clonedObj === obj); // false\n */\nexport function cloneDeep<T>(obj: T): Resolved<T> {\n if (isPrimitive(obj)) {\n return obj as Resolved<T>;\n }\n\n if (Array.isArray(obj)) {\n return obj.map(item => cloneDeep(item)) as Resolved<T>;\n }\n\n if (obj instanceof Date) {\n return new Date(obj.getTime()) as Resolved<T>;\n }\n\n if (obj instanceof RegExp) {\n return new RegExp(obj.source, obj.flags) as Resolved<T>;\n }\n\n if (obj instanceof Map) {\n const result = new Map();\n for (const [key, value] of obj.entries()) {\n result.set(key, cloneDeep(value));\n }\n return result as Resolved<T>;\n }\n\n if (obj instanceof Set) {\n const result = new Set();\n for (const value of obj.values()) {\n result.add(cloneDeep(value));\n }\n return result as Resolved<T>;\n }\n\n if (isTypedArray(obj)) {\n const result = new (Object.getPrototypeOf(obj).constructor)(obj.length);\n for (let i = 0; i < obj.length; i++) {\n result[i] = cloneDeep(obj[i]);\n }\n return result as Resolved<T>;\n }\n\n if (obj instanceof ArrayBuffer || obj instanceof SharedArrayBuffer) {\n return obj.slice(0) as Resolved<T>;\n }\n\n if (obj instanceof DataView) {\n const result = new DataView(obj.buffer.slice(0));\n cloneDeepHelper(obj, result);\n return result as Resolved<T>;\n }\n\n // For legacy NodeJS support\n if (typeof File !== 'undefined' && obj instanceof File) {\n const result = new File([obj], obj.name, { type: obj.type });\n cloneDeepHelper(obj, result);\n return result as Resolved<T>;\n }\n\n if (obj instanceof Blob) {\n const result = new Blob([obj], { type: obj.type });\n cloneDeepHelper(obj, result);\n return result as Resolved<T>;\n }\n\n if (obj instanceof Error) {\n const result = new (obj.constructor as { new (): Error })();\n result.message = obj.message;\n result.name = obj.name;\n result.stack = obj.stack;\n result.cause = obj.cause;\n cloneDeepHelper(obj, result);\n return result as Resolved<T>;\n }\n\n if (typeof obj === 'object' && obj !== null) {\n const result = {};\n cloneDeepHelper(obj, result);\n return result as Resolved<T>;\n }\n\n if (typeof obj === 'function') {\n return void 0 as Resolved<T>;\n }\n\n return obj as Resolved<T>;\n}\n\ntype Primitive = null | undefined | string | number | boolean | symbol | bigint;\nfunction isPrimitive(value: unknown): value is Primitive {\n return value == null || (typeof value !== 'object' && typeof value !== 'function');\n}\n\n// eslint-disable-next-line\nfunction cloneDeepHelper(obj: any, clonedObj: any): void {\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n const descriptor = Object.getOwnPropertyDescriptor(obj, key);\n if ((descriptor?.writable || descriptor?.set) && typeof descriptor?.value !== 'function') {\n clonedObj[key] = cloneDeep(obj[key]);\n }\n }\n }\n}\n\nfunction isTypedArray(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obj: any\n): obj is\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | BigUint64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | BigInt64Array\n | Float32Array\n | Float64Array {\n return (\n obj instanceof Uint8Array ||\n obj instanceof Uint8ClampedArray ||\n obj instanceof Uint16Array ||\n obj instanceof Uint32Array ||\n obj instanceof BigUint64Array ||\n obj instanceof Int8Array ||\n obj instanceof Int16Array ||\n obj instanceof Int32Array ||\n obj instanceof BigInt64Array ||\n obj instanceof Float32Array ||\n obj instanceof Float64Array\n );\n}\n\nexport type Resolved<T> = Equal<T, ResolvedMain<T>> extends true ? T : ResolvedMain<T>;\n\ntype Equal<X, Y> = X extends Y ? (Y extends X ? true : false) : false;\n\ntype ResolvedMain<T> = T extends [never]\n ? never // (special trick for jsonable | null) type\n : ValueOf<T> extends boolean | number | bigint | string\n ? ValueOf<T>\n : T extends (...args: any[]) => any\n ? never\n : T extends object\n ? ResolvedObject<T>\n : ValueOf<T>;\n\ntype ResolvedObject<T extends object> =\n T extends Array<infer U>\n ? IsTuple<T> extends true\n ? ResolvedTuple<T>\n : Array<ResolvedMain<U>>\n : T extends Set<infer U>\n ? Set<ResolvedMain<U>>\n : T extends Map<infer K, infer V>\n ? Map<ResolvedMain<K>, ResolvedMain<V>>\n : T extends WeakSet<any> | WeakMap<any, any>\n ? never\n : T extends\n | Date\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | BigUint64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | BigInt64Array\n | Float32Array\n | Float64Array\n | ArrayBuffer\n | SharedArrayBuffer\n | DataView\n | Blob\n | File\n ? T\n : {\n [P in keyof T]: ResolvedMain<T[P]>;\n };\n\ntype ResolvedTuple<T extends readonly any[]> = T extends []\n ? []\n : T extends [infer F]\n ? [ResolvedMain<F>]\n : T extends [infer F, ...infer Rest extends readonly any[]]\n ? [ResolvedMain<F>, ...ResolvedTuple<Rest>]\n : T extends [(infer F)?]\n ? [ResolvedMain<F>?]\n : T extends [(infer F)?, ...infer Rest extends readonly any[]]\n ? [ResolvedMain<F>?, ...ResolvedTuple<Rest>]\n : [];\n\ntype IsTuple<T extends readonly any[] | { length: number }> = [T] extends [never]\n ? false\n : T extends readonly any[]\n ? number extends T['length']\n ? false\n : true\n : false;\n\ntype ValueOf<Instance> =\n IsValueOf<Instance, boolean> extends true\n ? boolean\n : IsValueOf<Instance, number> extends true\n ? number\n : IsValueOf<Instance, string> extends true\n ? string\n : Instance;\n\ntype IsValueOf<Instance, O extends IValueOf<any>> = Instance extends O\n ? O extends IValueOf<infer Primitive>\n ? Instance extends Primitive\n ? false\n : true // not Primitive, but Object\n : false // cannot be\n : false;\n\ninterface IValueOf<T> {\n valueOf(): T;\n}\n"],"mappings":";AA8CO,SAAS,UAAa,KAAqB;AAChD,MAAI,YAAY,GAAG,GAAG;AACpB,WAAO;AAAA,EACT;AAEA,MAAI,MAAM,QAAQ,GAAG,GAAG;AACtB,WAAO,IAAI,IAAI,UAAQ,UAAU,IAAI,CAAC;AAAA,EACxC;AAEA,MAAI,eAAe,MAAM;AACvB,WAAO,IAAI,KAAK,IAAI,QAAQ,CAAC;AAAA,EAC/B;AAEA,MAAI,eAAe,QAAQ;AACzB,WAAO,IAAI,OAAO,IAAI,QAAQ,IAAI,KAAK;AAAA,EACzC;AAEA,MAAI,eAAe,KAAK;AACtB,UAAM,SAAS,oBAAI,IAAI;AACvB,eAAW,CAAC,KAAK,KAAK,KAAK,IAAI,QAAQ,GAAG;AACxC,aAAO,IAAI,KAAK,UAAU,KAAK,CAAC;AAAA,IAClC;AACA,WAAO;AAAA,EACT;AAEA,MAAI,eAAe,KAAK;AACtB,UAAM,SAAS,oBAAI,IAAI;AACvB,eAAW,SAAS,IAAI,OAAO,GAAG;AAChC,aAAO,IAAI,UAAU,KAAK,CAAC;AAAA,IAC7B;AACA,WAAO;AAAA,EACT;AAEA,MAAI,aAAa,GAAG,GAAG;AACrB,UAAM,SAAS,KAAK,OAAO,eAAe,GAAG,GAAE,YAAa,IAAI,MAAM;AACtE,aAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,aAAO,CAAC,IAAI,UAAU,IAAI,CAAC,CAAC;AAAA,IAC9B;AACA,WAAO;AAAA,EACT;AAEA,MAAI,eAAe,eAAe,eAAe,mBAAmB;AAClE,WAAO,IAAI,MAAM,CAAC;AAAA,EACpB;AAEA,MAAI,eAAe,UAAU;AAC3B,UAAM,SAAS,IAAI,SAAS,IAAI,OAAO,MAAM,CAAC,CAAC;AAC/C,oBAAgB,KAAK,MAAM;AAC3B,WAAO;AAAA,EACT;AAGA,MAAI,OAAO,SAAS,eAAe,eAAe,MAAM;AACtD,UAAM,SAAS,IAAI,KAAK,CAAC,GAAG,GAAG,IAAI,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC;AAC3D,oBAAgB,KAAK,MAAM;AAC3B,WAAO;AAAA,EACT;AAEA,MAAI,eAAe,MAAM;AACvB,UAAM,SAAS,IAAI,KAAK,CAAC,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC;AACjD,oBAAgB,KAAK,MAAM;AAC3B,WAAO;AAAA,EACT;AAEA,MAAI,eAAe,OAAO;AACxB,UAAM,SAAS,IAAK,IAAI,YAAkC;AAC1D,WAAO,UAAU,IAAI;AACrB,WAAO,OAAO,IAAI;AAClB,WAAO,QAAQ,IAAI;AACnB,WAAO,QAAQ,IAAI;AACnB,oBAAgB,KAAK,MAAM;AAC3B,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,QAAQ,YAAY,QAAQ,MAAM;AAC3C,UAAM,SAAS,CAAC;AAChB,oBAAgB,KAAK,MAAM;AAC3B,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAGA,SAAS,YAAY,OAAoC;AACvD,SAAO,SAAS,QAAS,OAAO,UAAU,YAAY,OAAO,UAAU;AACzE;AAGA,SAAS,gBAAgB,KAAU,WAAsB;AACvD,aAAW,OAAO,KAAK;AACrB,QAAI,OAAO,UAAU,eAAe,KAAK,KAAK,GAAG,GAAG;AAClD,YAAM,aAAa,OAAO,yBAAyB,KAAK,GAAG;AAC3D,WAAK,YAAY,YAAY,YAAY,QAAQ,OAAO,YAAY,UAAU,YAAY;AACxF,kBAAU,GAAG,IAAI,UAAU,IAAI,GAAG,CAAC;AAAA,MACrC;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,aAEP,KAYe;AACf,SACE,eAAe,cACf,eAAe,qBACf,eAAe,eACf,eAAe,eACf,eAAe,kBACf,eAAe,aACf,eAAe,cACf,eAAe,cACf,eAAe,iBACf,eAAe,gBACf,eAAe;AAEnB;","names":[]}
|
package/dist/chunk-KIOYQRMQ.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// src/error/TimeoutError.ts
|
|
2
|
-
var TimeoutError = class extends Error {
|
|
3
|
-
constructor(message = "The operation was timed out") {
|
|
4
|
-
super(message);
|
|
5
|
-
this.name = "TimeoutError";
|
|
6
|
-
}
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
TimeoutError
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=chunk-KIOYQRMQ.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/error/TimeoutError.ts"],"sourcesContent":["/**\n * An error class representing an timeout operation.\n * @augments Error\n */\nexport class TimeoutError extends Error {\n constructor(message = 'The operation was timed out') {\n super(message);\n this.name = 'TimeoutError';\n }\n}\n"],"mappings":";AAIO,IAAM,eAAN,cAA2B,MAAM;AAAA,EACtC,YAAY,UAAU,+BAA+B;AACnD,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;","names":[]}
|
package/dist/chunk-L7FQX5MN.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
union
|
|
3
|
-
} from "./chunk-R6QA7PLZ.mjs";
|
|
4
|
-
import {
|
|
5
|
-
intersection
|
|
6
|
-
} from "./chunk-FVVSE2F2.mjs";
|
|
7
|
-
import {
|
|
8
|
-
difference
|
|
9
|
-
} from "./chunk-JPUKH67K.mjs";
|
|
10
|
-
|
|
11
|
-
// src/array/xor.ts
|
|
12
|
-
function xor(arr1, arr2) {
|
|
13
|
-
return difference(union(arr1, arr2), intersection(arr1, arr2));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
xor
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=chunk-L7FQX5MN.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/xor.ts"],"sourcesContent":["import { difference } from './difference.ts';\nimport { intersection } from './intersection.ts';\nimport { union } from './union.ts';\n\n/**\n * Computes the symmetric difference between two arrays. The symmetric difference is the set of elements\n * which are in either of the arrays, but not in their intersection.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @returns {T[]} An array containing the elements that are present in either `arr1` or `arr2` but not in both.\n *\n * @example\n * // Returns [1, 2, 5, 6]\n * xor([1, 2, 3, 4], [3, 4, 5, 6]);\n *\n * @example\n * // Returns ['a', 'c']\n * xor(['a', 'b'], ['b', 'c']);\n */\nexport function xor<T>(arr1: readonly T[], arr2: readonly T[]): T[] {\n return difference(union(arr1, arr2), intersection(arr1, arr2));\n}\n"],"mappings":";;;;;;;;;;;AAqBO,SAAS,IAAO,MAAoB,MAAyB;AAClE,SAAO,WAAW,MAAM,MAAM,IAAI,GAAG,aAAa,MAAM,IAAI,CAAC;AAC/D;","names":[]}
|
package/dist/chunk-LJ2C6MVP.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// src/array/dropWhile.ts
|
|
2
|
-
function dropWhile(arr, canContinueDropping) {
|
|
3
|
-
const dropEndIndex = arr.findIndex((item) => !canContinueDropping(item));
|
|
4
|
-
if (dropEndIndex === -1) {
|
|
5
|
-
return [];
|
|
6
|
-
}
|
|
7
|
-
return arr.slice(dropEndIndex);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
dropWhile
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=chunk-LJ2C6MVP.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/dropWhile.ts"],"sourcesContent":["/**\n * Removes elements from the beginning of an array until the predicate returns false.\n *\n * This function iterates over an array and drops elements from the start until the provided\n * predicate function returns false. It then returns a new array with the remaining elements.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to drop elements.\n * @param {(item: T) => boolean} canContinueDropping - A predicate function that determines\n * whether to continue dropping elements. The function is called with each element, and dropping\n * continues as long as it returns true.\n * @returns {T[]} A new array with the elements remaining after the predicate returns false.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = dropWhile(array, x => x < 3);\n * // result will be [3, 4, 5] since elements less than 3 are dropped.\n */\nexport function dropWhile<T>(arr: readonly T[], canContinueDropping: (item: T) => boolean): T[] {\n const dropEndIndex = arr.findIndex(item => !canContinueDropping(item));\n if (dropEndIndex === -1) {\n return [];\n }\n\n return arr.slice(dropEndIndex);\n}\n"],"mappings":";AAkBO,SAAS,UAAa,KAAmB,qBAAgD;AAC9F,QAAM,eAAe,IAAI,UAAU,UAAQ,CAAC,oBAAoB,IAAI,CAAC;AACrE,MAAI,iBAAiB,IAAI;AACvB,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,IAAI,MAAM,YAAY;AAC/B;","names":[]}
|
package/dist/chunk-LKXCOLNY.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/function/noop.ts"],"sourcesContent":["/**\n * A no-operation function that does nothing.\n * This can be used as a placeholder or default function.\n *\n * @example\n * noop(); // Does nothing\n *\n * @returns {void} This function does not return anything.\n */\nexport function noop(): void {}\n"],"mappings":";AASO,SAAS,OAAa;AAAC;","names":[]}
|
package/dist/chunk-LPZZIY5Z.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isLength
|
|
3
|
-
} from "./chunk-27QMXBLJ.mjs";
|
|
4
|
-
|
|
5
|
-
// src/predicate/isArrayLike.ts
|
|
6
|
-
function isArrayLike(value) {
|
|
7
|
-
return value != null && typeof value !== "function" && isLength(value.length);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
isArrayLike
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=chunk-LPZZIY5Z.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/predicate/isArrayLike.ts"],"sourcesContent":["import { isLength } from \"./isLength.ts\";\n\n/**\n * Checks if `value` is array-like.\n *\n * @param {unknown} value The value to check.\n * @returns {value is ArrayLike<unknown>} Returns `true` if `value` is array-like, else `false`.\n *\n * @example\n * isArrayLike([1, 2, 3]); // true\n * isArrayLike('abc'); // true\n * isArrayLike({ 0: 'a', length: 1 }); // true\n * isArrayLike({}); // false\n * isArrayLike(null); // false\n * isArrayLike(undefined); // false\n */\nexport function isArrayLike(value: unknown): value is ArrayLike<unknown> {\n return value != null && typeof value !== \"function\" &&\n isLength((value as ArrayLike<unknown>).length);\n}\n"],"mappings":";;;;;AAgBO,SAAS,YAAY,OAA6C;AACvE,SAAO,SAAS,QAAQ,OAAO,UAAU,cACvC,SAAU,MAA6B,MAAM;AACjD;","names":[]}
|
package/dist/chunk-LVWX5B43.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// src/array/differenceBy.ts
|
|
2
|
-
function differenceBy(firstArr, secondArr, mapper) {
|
|
3
|
-
const mappedSecondSet = new Set(secondArr.map((item) => mapper(item)));
|
|
4
|
-
return firstArr.filter((item) => {
|
|
5
|
-
return !mappedSecondSet.has(mapper(item));
|
|
6
|
-
});
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
differenceBy
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=chunk-LVWX5B43.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/differenceBy.ts"],"sourcesContent":["/**\n * Computes the difference between two arrays after mapping their elements through a provided function.\n *\n * This function takes two arrays and a mapper function. It returns a new array containing the elements\n * that are present in the first array but not in the second array, based on the identity calculated\n * by the mapper function.\n *\n * Essentially, it filters out any elements from the first array that, when\n * mapped, match an element in the mapped version of the second array.\n *\n * @template T, U\n * @param {T[]} firstArr - The primary array from which to derive the difference.\n * @param {T[]} secondArr - The array containing elements to be excluded from the first array.\n * @param {(value: T) => U} mapper - The function to map the elements of both arrays. This function\n * is applied to each element in both arrays, and the comparison is made based on the mapped values.\n * @returns {T[]} A new array containing the elements from the first array that do not have a corresponding\n * mapped identity in the second array.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const mapper = item => item.id;\n * const result = differenceBy(array1, array2, mapper);\n * // result will be [{ id: 1 }, { id: 3 }] since the elements with id 2 are in both arrays and are excluded from the result.\n */\nexport function differenceBy<T, U>(firstArr: readonly T[], secondArr: readonly T[], mapper: (value: T) => U): T[] {\n const mappedSecondSet = new Set(secondArr.map(item => mapper(item)));\n\n return firstArr.filter(item => {\n return !mappedSecondSet.has(mapper(item));\n });\n}\n"],"mappings":";AAyBO,SAAS,aAAmB,UAAwB,WAAyB,QAA8B;AAChH,QAAM,kBAAkB,IAAI,IAAI,UAAU,IAAI,UAAQ,OAAO,IAAI,CAAC,CAAC;AAEnE,SAAO,SAAS,OAAO,UAAQ;AAC7B,WAAO,CAAC,gBAAgB,IAAI,OAAO,IAAI,CAAC;AAAA,EAC1C,CAAC;AACH;","names":[]}
|
package/dist/chunk-M7SBBYV2.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// src/array/dropRightWhile.ts
|
|
2
|
-
function dropRightWhile(arr, canContinueDropping) {
|
|
3
|
-
for (let i = arr.length - 1; i >= 0; i--) {
|
|
4
|
-
if (!canContinueDropping(arr[i])) {
|
|
5
|
-
return arr.slice(0, i + 1);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
return [];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
dropRightWhile
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=chunk-M7SBBYV2.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/dropRightWhile.ts"],"sourcesContent":["/**\n * Removes elements from the end of an array until the predicate returns false.\n *\n * This function iterates over an array from the end and drops elements until the provided\n * predicate function returns false. It then returns a new array with the remaining elements.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to drop elements.\n * @param {(item: T) => boolean} canContinueDropping - A predicate function that determines\n * whether to continue dropping elements. The function is called with each element from the end,\n * and dropping continues as long as it returns true.\n * @returns {T[]} A new array with the elements remaining after the predicate returns false.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = dropRightWhile(array, x => x > 3);\n * // result will be [1, 2, 3] since elements greater than 3 are dropped from the end.\n */\nexport function dropRightWhile<T>(arr: readonly T[], canContinueDropping: (item: T) => boolean): T[] {\n for (let i = arr.length - 1; i >= 0; i--) {\n if (!canContinueDropping(arr[i])) {\n return arr.slice(0, i + 1);\n }\n }\n\n return [];\n}\n"],"mappings":";AAkBO,SAAS,eAAkB,KAAmB,qBAAgD;AACnG,WAAS,IAAI,IAAI,SAAS,GAAG,KAAK,GAAG,KAAK;AACxC,QAAI,CAAC,oBAAoB,IAAI,CAAC,CAAC,GAAG;AAChC,aAAO,IAAI,MAAM,GAAG,IAAI,CAAC;AAAA,IAC3B;AAAA,EACF;AAEA,SAAO,CAAC;AACV;","names":[]}
|
package/dist/chunk-ME352XO7.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/take.ts"],"sourcesContent":["/**\n * Returns a new array containing the first `count` elements from the input array `arr`.\n * If `count` is greater than the length of `arr`, the entire array is returned.\n *\n * @template T - Type of elements in the input array.\n *\n * @param {T[]} arr - The array to take elements from.\n * @param {number} count - The number of elements to take.\n * @returns {T[]} A new array containing the first `count` elements from `arr`.\n *\n * @example\n * // Returns [1, 2, 3]\n * take([1, 2, 3, 4, 5], 3);\n *\n * @example\n * // Returns ['a', 'b']\n * take(['a', 'b', 'c'], 2);\n *\n * @example\n * // Returns [1, 2, 3]\n * take([1, 2, 3], 5);\n */\nexport function take<T>(arr: readonly T[], count: number): T[] {\n return arr.slice(0, count);\n}\n"],"mappings":";AAsBO,SAAS,KAAQ,KAAmB,OAAoB;AAC7D,SAAO,IAAI,MAAM,GAAG,KAAK;AAC3B;","names":[]}
|
package/dist/chunk-MIGAC7F4.mjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// src/predicate/isPlainObject.ts
|
|
2
|
-
function isPlainObject(object) {
|
|
3
|
-
if (typeof object !== "object") {
|
|
4
|
-
return false;
|
|
5
|
-
}
|
|
6
|
-
if (object == null) {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
if (Object.getPrototypeOf(object) === null) {
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
if (object.toString() !== "[object Object]") {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
let proto = object;
|
|
16
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
17
|
-
proto = Object.getPrototypeOf(proto);
|
|
18
|
-
}
|
|
19
|
-
return Object.getPrototypeOf(object) === proto;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
isPlainObject
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=chunk-MIGAC7F4.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/predicate/isPlainObject.ts"],"sourcesContent":["/**\n * Checks if a given value is a plain object.\n * \n * @param {object} object - The value to check.\n * @returns {boolean} - True if the value is a plain object, otherwise false.\n * \n * @example\n * console.log(isPlainObject({})); // true\n * console.log(isPlainObject([])); // false\n * console.log(isPlainObject(null)); // false\n * console.log(isPlainObject(Object.create(null))); // true\n * console.log(Buffer.from('hello, world')); // false\n */\nexport function isPlainObject(object: object): boolean {\n if (typeof object !== 'object') {\n return false;\n }\n\n if (object == null) {\n return false;\n }\n\n if (Object.getPrototypeOf(object) === null) {\n return true;\n }\n\n if (object.toString() !== '[object Object]') {\n return false;\n }\n\n let proto = object;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(object) === proto;\n}"],"mappings":";AAaO,SAAS,cAAc,QAAyB;AACrD,MAAI,OAAO,WAAW,UAAU;AAC9B,WAAO;AAAA,EACT;AAEA,MAAI,UAAU,MAAM;AAClB,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,eAAe,MAAM,MAAM,MAAM;AAC1C,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,SAAS,MAAM,mBAAmB;AAC3C,WAAO;AAAA,EACT;AAEA,MAAI,QAAQ;AAEZ,SAAO,OAAO,eAAe,KAAK,MAAM,MAAM;AAC5C,YAAQ,OAAO,eAAe,KAAK;AAAA,EACrC;AAEA,SAAO,OAAO,eAAe,MAAM,MAAM;AAC3C;","names":[]}
|
package/dist/chunk-MJ7LNBI6.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// src/array/zipWith.ts
|
|
2
|
-
function zipWith(arr1, ...rest) {
|
|
3
|
-
const arrs = [arr1, ...rest.slice(0, -1)];
|
|
4
|
-
const combine = rest[rest.length - 1];
|
|
5
|
-
const result = [];
|
|
6
|
-
const maxIndex = Math.max(...arrs.map((arr) => arr.length));
|
|
7
|
-
for (let i = 0; i < maxIndex; i++) {
|
|
8
|
-
const elements = arrs.map((arr) => arr[i]);
|
|
9
|
-
result.push(combine(...elements));
|
|
10
|
-
}
|
|
11
|
-
return result;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
zipWith
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=chunk-MJ7LNBI6.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/zipWith.ts"],"sourcesContent":["/**\n * Combines multiple arrays into a single array using a custom combiner function.\n *\n * This function takes multiple arrays and a combiner function, and returns a new array where each element\n * is the result of applying the combiner function to the corresponding elements of the input arrays.\n *\n * @template T - The type of elements in the first array.\n * @template U - The type of elements in the second array (optional).\n * @template V - The type of elements in the third array (optional).\n * @template W - The type of elements in the fourth array (optional).\n * @template R - The type of elements in the resulting array.\n * @param {T[]} arr1 - The first array to zip.\n * @param {U[]} [arr2] - The second array to zip (optional).\n * @param {V[]} [arr3] - The third array to zip (optional).\n * @param {W[]} [arr4] - The fourth array to zip (optional).\n * @param {(...items: T[]) => R} combine - The combiner function that takes corresponding elements from each array and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n *\n * @example\n * // Example usage with two arrays:\n * const arr1 = [1, 2, 3];\n * const arr2 = [4, 5, 6];\n * const result = zipWith(arr1, arr2, (a, b) => a + b);\n * // result will be [5, 7, 9]\n *\n * @example\n * // Example usage with three arrays:\n * const arr1 = [1, 2];\n * const arr2 = [3, 4];\n * const arr3 = [5, 6];\n * const result = zipWith(arr1, arr2, arr3, (a, b, c) => `${a}${b}${c}`);\n * // result will be [`135`, `246`]\n */\nexport function zipWith<T, R>(arr1: readonly T[], combine: (item: T) => R): R[];\nexport function zipWith<T, U, R>(arr1: readonly T[], arr2: readonly U[], combine: (item1: T, item2: U) => R): R[];\nexport function zipWith<T, U, V, R>(\n arr1: readonly T[],\n arr2: readonly U[],\n arr3: readonly V[],\n combine: (item1: T, item2: U, item3: V) => R\n): R[];\nexport function zipWith<T, U, V, W, R>(\n arr1: readonly T[],\n arr2: readonly U[],\n arr3: readonly V[],\n arr4: readonly W[],\n combine: (item1: T, item2: U, item3: V, item4: W) => R\n): R[];\nexport function zipWith<T, R>(arr1: readonly T[], ...rest: any[]): R[] {\n const arrs = [arr1, ...rest.slice(0, -1)];\n const combine = rest[rest.length - 1] as (...items: T[]) => R;\n\n const result: R[] = [];\n const maxIndex = Math.max(...arrs.map(arr => arr.length));\n\n for (let i = 0; i < maxIndex; i++) {\n const elements: T[] = arrs.map(arr => arr[i]);\n result.push(combine(...elements));\n }\n\n return result;\n}\n"],"mappings":";AAgDO,SAAS,QAAc,SAAuB,MAAkB;AACrE,QAAM,OAAO,CAAC,MAAM,GAAG,KAAK,MAAM,GAAG,EAAE,CAAC;AACxC,QAAM,UAAU,KAAK,KAAK,SAAS,CAAC;AAEpC,QAAM,SAAc,CAAC;AACrB,QAAM,WAAW,KAAK,IAAI,GAAG,KAAK,IAAI,SAAO,IAAI,MAAM,CAAC;AAExD,WAAS,IAAI,GAAG,IAAI,UAAU,KAAK;AACjC,UAAM,WAAgB,KAAK,IAAI,SAAO,IAAI,CAAC,CAAC;AAC5C,WAAO,KAAK,QAAQ,GAAG,QAAQ,CAAC;AAAA,EAClC;AAEA,SAAO;AACT;","names":[]}
|
package/dist/chunk-ML727RRJ.mjs
DELETED