es-toolkit 1.50.0 → 1.51.0-dev.2069
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +82 -0
- package/NOTICE +39 -0
- package/README.md +2 -2
- package/bigint.d.ts +1 -0
- package/bigint.js +1 -0
- package/dist/_internal/NonPlainObject.d.mts +8 -0
- package/dist/_internal/NonPlainObject.d.ts +8 -0
- package/dist/_internal/bigIntRangeLength.js +19 -0
- package/dist/_internal/bigIntRangeLength.mjs +19 -0
- package/dist/_internal/isMergeableValue.js +17 -0
- package/dist/_internal/isMergeableValue.mjs +17 -0
- package/dist/_internal/isUnsafeProperty.js +7 -4
- package/dist/_internal/isUnsafeProperty.mjs +7 -4
- package/dist/_internal/isUnsafeToWriteProperty.js +22 -0
- package/dist/_internal/isUnsafeToWriteProperty.mjs +22 -0
- package/dist/array/at.d.mts +1 -1
- package/dist/array/at.d.ts +1 -1
- package/dist/array/filterAsync.js +1 -1
- package/dist/array/filterAsync.mjs +1 -1
- package/dist/array/flatMapAsync.js +1 -1
- package/dist/array/flatMapAsync.mjs +1 -1
- package/dist/array/forEachAsync.js +1 -1
- package/dist/array/forEachAsync.mjs +1 -1
- package/dist/array/index.js +1 -1
- package/dist/array/index.mjs +1 -1
- package/dist/array/limitAsync.d.mts +4 -28
- package/dist/array/limitAsync.d.ts +4 -28
- package/dist/array/limitAsync.js +2 -39
- package/dist/array/limitAsync.mjs +3 -39
- package/dist/array/mapAsync.js +1 -1
- package/dist/array/mapAsync.mjs +1 -1
- package/dist/array/orderBy.d.mts +1 -1
- package/dist/array/orderBy.d.ts +1 -1
- package/dist/array/pullAt.d.mts +1 -1
- package/dist/array/pullAt.d.ts +1 -1
- package/dist/array/pullAt.js +1 -1
- package/dist/array/pullAt.mjs +1 -1
- package/dist/array/sortBy.d.mts +1 -1
- package/dist/array/sortBy.d.ts +1 -1
- package/dist/array/unzip.d.mts +3 -0
- package/dist/array/unzip.d.ts +3 -0
- package/dist/array/unzip.js +3 -0
- package/dist/array/unzip.mjs +3 -0
- package/dist/bigint/clamp.d.mts +37 -0
- package/dist/bigint/clamp.d.ts +37 -0
- package/dist/bigint/clamp.js +16 -0
- package/dist/bigint/clamp.mjs +16 -0
- package/dist/bigint/inRange.d.mts +37 -0
- package/dist/bigint/inRange.d.ts +37 -0
- package/dist/bigint/inRange.js +20 -0
- package/dist/bigint/inRange.mjs +20 -0
- package/dist/bigint/index.d.mts +14 -0
- package/dist/bigint/index.d.ts +14 -0
- package/dist/bigint/index.js +27 -0
- package/dist/bigint/index.mjs +14 -0
- package/dist/bigint/max.d.mts +21 -0
- package/dist/bigint/max.d.ts +21 -0
- package/dist/bigint/max.js +26 -0
- package/dist/bigint/max.mjs +26 -0
- package/dist/bigint/maxBy.d.mts +21 -0
- package/dist/bigint/maxBy.d.ts +21 -0
- package/dist/bigint/maxBy.js +34 -0
- package/dist/bigint/maxBy.mjs +34 -0
- package/dist/bigint/median.d.mts +22 -0
- package/dist/bigint/median.d.ts +22 -0
- package/dist/bigint/median.js +28 -0
- package/dist/bigint/median.mjs +28 -0
- package/dist/bigint/medianBy.d.mts +21 -0
- package/dist/bigint/medianBy.d.ts +21 -0
- package/dist/bigint/medianBy.js +24 -0
- package/dist/bigint/medianBy.mjs +24 -0
- package/dist/bigint/min.d.mts +18 -0
- package/dist/bigint/min.d.ts +18 -0
- package/dist/bigint/min.js +23 -0
- package/dist/bigint/min.mjs +23 -0
- package/dist/bigint/minBy.d.mts +21 -0
- package/dist/bigint/minBy.d.ts +21 -0
- package/dist/bigint/minBy.js +34 -0
- package/dist/bigint/minBy.mjs +34 -0
- package/dist/bigint/percentile.d.mts +23 -0
- package/dist/bigint/percentile.d.ts +23 -0
- package/dist/bigint/percentile.js +31 -0
- package/dist/bigint/percentile.mjs +31 -0
- package/dist/bigint/range.d.mts +45 -0
- package/dist/bigint/range.d.ts +45 -0
- package/dist/bigint/range.js +24 -0
- package/dist/bigint/range.mjs +24 -0
- package/dist/bigint/rangeRight.d.mts +43 -0
- package/dist/bigint/rangeRight.d.ts +43 -0
- package/dist/bigint/rangeRight.js +25 -0
- package/dist/bigint/rangeRight.mjs +25 -0
- package/dist/bigint/sum.d.mts +18 -0
- package/dist/bigint/sum.d.ts +18 -0
- package/dist/bigint/sum.js +22 -0
- package/dist/bigint/sum.mjs +22 -0
- package/dist/bigint/sumBy.d.mts +20 -0
- package/dist/bigint/sumBy.d.ts +20 -0
- package/dist/bigint/sumBy.js +24 -0
- package/dist/bigint/sumBy.mjs +24 -0
- package/dist/browser.global.js +6 -3
- package/dist/compat/_internal/normalizeZero.js +13 -0
- package/dist/compat/_internal/normalizeZero.mjs +13 -0
- package/dist/compat/_internal/toKey.js +1 -1
- package/dist/compat/_internal/toKey.mjs +1 -1
- package/dist/compat/_internal/unicodeSize.js +45 -0
- package/dist/compat/_internal/unicodeSize.mjs +45 -0
- package/dist/compat/array/chunk.js +1 -0
- package/dist/compat/array/chunk.mjs +1 -0
- package/dist/compat/array/difference.js +2 -1
- package/dist/compat/array/difference.mjs +2 -1
- package/dist/compat/array/differenceBy.js +3 -2
- package/dist/compat/array/differenceBy.mjs +3 -2
- package/dist/compat/array/drop.d.mts +1 -1
- package/dist/compat/array/drop.d.ts +1 -1
- package/dist/compat/array/dropRight.d.mts +2 -3
- package/dist/compat/array/dropRight.d.ts +2 -3
- package/dist/compat/array/dropRight.js +4 -4
- package/dist/compat/array/dropRight.mjs +4 -4
- package/dist/compat/array/every.js +9 -9
- package/dist/compat/array/every.mjs +9 -9
- package/dist/compat/array/fill.js +8 -2
- package/dist/compat/array/fill.mjs +8 -2
- package/dist/compat/array/find.js +14 -13
- package/dist/compat/array/find.mjs +14 -13
- package/dist/compat/array/findIndex.js +3 -19
- package/dist/compat/array/findIndex.mjs +3 -19
- package/dist/compat/array/findLast.js +3 -3
- package/dist/compat/array/findLast.mjs +3 -3
- package/dist/compat/array/flatMap.js +3 -8
- package/dist/compat/array/flatMap.mjs +3 -7
- package/dist/compat/array/flatMapDepth.js +1 -1
- package/dist/compat/array/flatMapDepth.mjs +1 -1
- package/dist/compat/array/forEach.js +1 -1
- package/dist/compat/array/forEach.mjs +1 -1
- package/dist/compat/array/includes.js +13 -13
- package/dist/compat/array/includes.mjs +13 -13
- package/dist/compat/array/indexOf.js +2 -1
- package/dist/compat/array/indexOf.mjs +2 -1
- package/dist/compat/array/intersection.js +3 -2
- package/dist/compat/array/intersection.mjs +3 -2
- package/dist/compat/array/intersectionBy.js +7 -11
- package/dist/compat/array/intersectionBy.mjs +7 -11
- package/dist/compat/array/intersectionWith.js +6 -18
- package/dist/compat/array/intersectionWith.mjs +6 -18
- package/dist/compat/array/last.js +1 -1
- package/dist/compat/array/last.mjs +1 -1
- package/dist/compat/array/lastIndexOf.js +3 -1
- package/dist/compat/array/lastIndexOf.mjs +3 -1
- package/dist/compat/array/map.js +3 -3
- package/dist/compat/array/map.mjs +3 -3
- package/dist/compat/array/orderBy.js +8 -6
- package/dist/compat/array/orderBy.mjs +8 -6
- package/dist/compat/array/partition.js +6 -6
- package/dist/compat/array/partition.mjs +6 -6
- package/dist/compat/array/pull.js +1 -1
- package/dist/compat/array/pull.mjs +1 -1
- package/dist/compat/array/pullAll.js +2 -0
- package/dist/compat/array/pullAll.mjs +2 -0
- package/dist/compat/array/remove.js +8 -4
- package/dist/compat/array/remove.mjs +8 -4
- package/dist/compat/array/reverse.js +1 -1
- package/dist/compat/array/reverse.mjs +1 -1
- package/dist/compat/array/sampleSize.js +2 -1
- package/dist/compat/array/sampleSize.mjs +2 -1
- package/dist/compat/array/size.js +2 -1
- package/dist/compat/array/size.mjs +2 -1
- package/dist/compat/array/some.js +2 -1
- package/dist/compat/array/some.mjs +2 -1
- package/dist/compat/array/takeRightWhile.js +2 -2
- package/dist/compat/array/takeRightWhile.mjs +2 -2
- package/dist/compat/array/takeWhile.js +2 -2
- package/dist/compat/array/takeWhile.mjs +2 -2
- package/dist/compat/array/unionBy.js +2 -1
- package/dist/compat/array/unionBy.mjs +2 -1
- package/dist/compat/array/uniqBy.js +4 -3
- package/dist/compat/array/uniqBy.mjs +4 -3
- package/dist/compat/array/unzip.d.mts +3 -0
- package/dist/compat/array/unzip.d.ts +3 -0
- package/dist/compat/array/unzip.js +3 -0
- package/dist/compat/array/unzip.mjs +3 -0
- package/dist/compat/array/unzipWith.js +1 -1
- package/dist/compat/array/unzipWith.mjs +1 -1
- package/dist/compat/array/zipObject.js +2 -0
- package/dist/compat/array/zipObject.mjs +2 -0
- package/dist/compat/compat.d.mts +3 -3
- package/dist/compat/compat.d.ts +3 -3
- package/dist/compat/compat.js +8 -4
- package/dist/compat/compat.mjs +8 -4
- package/dist/compat/function/curry.d.mts +1 -1
- package/dist/compat/function/curry.d.ts +1 -1
- package/dist/compat/function/debounce.js +1 -1
- package/dist/compat/function/debounce.mjs +1 -1
- package/dist/compat/function/flowRight.d.mts +1 -1
- package/dist/compat/function/flowRight.d.ts +1 -1
- package/dist/compat/function/partial.d.mts +1 -1
- package/dist/compat/function/partial.d.ts +1 -1
- package/dist/compat/function/rest.d.mts +1 -1
- package/dist/compat/function/rest.d.ts +1 -1
- package/dist/compat/function/rest.js +1 -1
- package/dist/compat/function/rest.mjs +1 -1
- package/dist/compat/index.d.mts +3 -3
- package/dist/compat/index.d.ts +3 -3
- package/dist/compat/index.js +6 -4
- package/dist/compat/index.mjs +5 -5
- package/dist/compat/math/maxBy.js +1 -1
- package/dist/compat/math/maxBy.mjs +1 -1
- package/dist/compat/math/meanBy.d.mts +4 -0
- package/dist/compat/math/meanBy.d.ts +4 -0
- package/dist/compat/math/meanBy.js +8 -3
- package/dist/compat/math/meanBy.mjs +8 -3
- package/dist/compat/math/minBy.js +1 -1
- package/dist/compat/math/minBy.mjs +1 -1
- package/dist/compat/object/cloneDeep.d.mts +5 -5
- package/dist/compat/object/cloneDeep.d.ts +5 -5
- package/dist/compat/object/cloneDeep.js +5 -5
- package/dist/compat/object/cloneDeep.mjs +5 -5
- package/dist/compat/object/cloneDeepWith.js +3 -1
- package/dist/compat/object/cloneDeepWith.mjs +3 -1
- package/dist/compat/object/cloneWith.d.mts +1 -1
- package/dist/compat/object/cloneWith.d.ts +1 -1
- package/dist/compat/object/cloneWith.js +1 -1
- package/dist/compat/object/cloneWith.mjs +1 -1
- package/dist/compat/object/entries.d.mts +1 -0
- package/dist/compat/object/entries.d.ts +1 -0
- package/dist/compat/object/entries.js +1 -0
- package/dist/compat/object/entries.mjs +1 -0
- package/dist/compat/object/entriesIn.d.mts +1 -0
- package/dist/compat/object/entriesIn.d.ts +1 -0
- package/dist/compat/object/entriesIn.js +1 -0
- package/dist/compat/object/entriesIn.mjs +1 -0
- package/dist/compat/object/omit.js +5 -5
- package/dist/compat/object/omit.mjs +5 -5
- package/dist/compat/object/transform.js +1 -1
- package/dist/compat/object/transform.mjs +1 -1
- package/dist/compat/object/updateWith.js +2 -2
- package/dist/compat/object/updateWith.mjs +2 -2
- package/dist/compat/predicate/isMatchWith.js +14 -5
- package/dist/compat/predicate/isMatchWith.mjs +14 -5
- package/dist/compat/string/template.js +2 -1
- package/dist/compat/string/template.mjs +2 -1
- package/dist/compat/string/words.js +17 -13
- package/dist/compat/string/words.mjs +17 -13
- package/dist/compat/util/iteratee.js +1 -3
- package/dist/compat/util/iteratee.mjs +1 -3
- package/dist/compat/util/toArray.d.mts +5 -5
- package/dist/compat/util/toArray.d.ts +5 -5
- package/dist/compat/util/toArray.js +9 -5
- package/dist/compat/util/toArray.mjs +9 -5
- package/dist/compat/util/toPath.js +11 -3
- package/dist/compat/util/toPath.mjs +11 -3
- package/dist/compat/util/toString.js +4 -1
- package/dist/compat/util/toString.mjs +4 -1
- package/dist/fp/array/at.d.mts +1 -1
- package/dist/fp/array/at.d.ts +1 -1
- package/dist/fp/array/orderBy.d.mts +1 -1
- package/dist/fp/array/orderBy.d.ts +1 -1
- package/dist/fp/array/sortBy.d.mts +1 -1
- package/dist/fp/array/sortBy.d.ts +1 -1
- package/dist/fp/array/unzip.d.mts +3 -0
- package/dist/fp/array/unzip.d.ts +3 -0
- package/dist/fp/array/unzip.js +3 -0
- package/dist/fp/array/unzip.mjs +3 -0
- package/dist/fp/iterator/chunk.d.mts +19 -0
- package/dist/fp/iterator/chunk.d.ts +19 -0
- package/dist/fp/iterator/chunk.js +24 -0
- package/dist/fp/iterator/chunk.mjs +24 -0
- package/dist/fp/iterator/count.d.mts +20 -0
- package/dist/fp/iterator/count.d.ts +20 -0
- package/dist/fp/iterator/count.js +25 -0
- package/dist/fp/iterator/count.mjs +25 -0
- package/dist/fp/iterator/drop.d.mts +20 -0
- package/dist/fp/iterator/drop.d.ts +20 -0
- package/dist/fp/iterator/drop.js +24 -0
- package/dist/fp/iterator/drop.mjs +24 -0
- package/dist/fp/iterator/dropWhile.d.mts +18 -0
- package/dist/fp/iterator/dropWhile.d.ts +18 -0
- package/dist/fp/iterator/dropWhile.js +23 -0
- package/dist/fp/iterator/dropWhile.mjs +23 -0
- package/dist/fp/iterator/every.d.mts +20 -0
- package/dist/fp/iterator/every.d.ts +20 -0
- package/dist/fp/iterator/every.js +24 -0
- package/dist/fp/iterator/every.mjs +24 -0
- package/dist/fp/iterator/filter.d.mts +37 -0
- package/dist/fp/iterator/filter.d.ts +37 -0
- package/dist/fp/iterator/filter.js +8 -0
- package/dist/fp/iterator/filter.mjs +8 -0
- package/dist/fp/iterator/find.d.mts +20 -0
- package/dist/fp/iterator/find.d.ts +20 -0
- package/dist/fp/iterator/find.js +24 -0
- package/dist/fp/iterator/find.mjs +24 -0
- package/dist/fp/iterator/flatMap.d.mts +20 -0
- package/dist/fp/iterator/flatMap.d.ts +20 -0
- package/dist/fp/iterator/flatMap.js +24 -0
- package/dist/fp/iterator/flatMap.mjs +24 -0
- package/dist/fp/iterator/forEach.d.mts +22 -0
- package/dist/fp/iterator/forEach.d.ts +22 -0
- package/dist/fp/iterator/forEach.js +26 -0
- package/dist/fp/iterator/forEach.mjs +26 -0
- package/dist/fp/iterator/head.d.mts +19 -0
- package/dist/fp/iterator/head.d.ts +19 -0
- package/dist/fp/iterator/head.js +24 -0
- package/dist/fp/iterator/head.mjs +24 -0
- package/dist/fp/iterator/index.d.mts +21 -0
- package/dist/fp/iterator/index.d.ts +21 -0
- package/dist/fp/iterator/index.js +41 -0
- package/dist/fp/iterator/index.mjs +21 -0
- package/dist/fp/iterator/map.d.mts +20 -0
- package/dist/fp/iterator/map.d.ts +20 -0
- package/dist/fp/iterator/map.js +24 -0
- package/dist/fp/iterator/map.mjs +24 -0
- package/dist/fp/iterator/partition.d.mts +22 -0
- package/dist/fp/iterator/partition.d.ts +22 -0
- package/dist/fp/iterator/partition.js +27 -0
- package/dist/fp/iterator/partition.mjs +27 -0
- package/dist/fp/iterator/reduce.d.mts +24 -0
- package/dist/fp/iterator/reduce.d.ts +24 -0
- package/dist/fp/iterator/reduce.js +28 -0
- package/dist/fp/iterator/reduce.mjs +28 -0
- package/dist/fp/iterator/scan.d.mts +21 -0
- package/dist/fp/iterator/scan.d.ts +21 -0
- package/dist/fp/iterator/scan.js +26 -0
- package/dist/fp/iterator/scan.mjs +26 -0
- package/dist/fp/iterator/some.d.mts +20 -0
- package/dist/fp/iterator/some.d.ts +20 -0
- package/dist/fp/iterator/some.js +24 -0
- package/dist/fp/iterator/some.mjs +24 -0
- package/dist/fp/iterator/take.d.mts +21 -0
- package/dist/fp/iterator/take.d.ts +21 -0
- package/dist/fp/iterator/take.js +25 -0
- package/dist/fp/iterator/take.mjs +25 -0
- package/dist/fp/iterator/takeWhile.d.mts +19 -0
- package/dist/fp/iterator/takeWhile.d.ts +19 -0
- package/dist/fp/iterator/takeWhile.js +24 -0
- package/dist/fp/iterator/takeWhile.mjs +24 -0
- package/dist/fp/iterator/toArray.d.mts +21 -0
- package/dist/fp/iterator/toArray.d.ts +21 -0
- package/dist/fp/iterator/toArray.js +25 -0
- package/dist/fp/iterator/toArray.mjs +25 -0
- package/dist/fp/iterator/uniqBy.d.mts +20 -0
- package/dist/fp/iterator/uniqBy.d.ts +20 -0
- package/dist/fp/iterator/uniqBy.js +25 -0
- package/dist/fp/iterator/uniqBy.mjs +25 -0
- package/dist/fp/iterator/zip.d.mts +20 -0
- package/dist/fp/iterator/zip.d.ts +20 -0
- package/dist/fp/iterator/zip.js +25 -0
- package/dist/fp/iterator/zip.mjs +25 -0
- package/dist/function/memoize.d.mts +3 -2
- package/dist/function/memoize.d.ts +3 -2
- package/dist/function/memoize.js +3 -2
- package/dist/function/memoize.mjs +3 -2
- package/dist/function/partial.d.mts +2 -2
- package/dist/function/partial.d.ts +2 -2
- package/dist/function/partialRight.d.mts +5 -5
- package/dist/function/partialRight.d.ts +5 -5
- package/dist/function/rest.d.mts +1 -1
- package/dist/function/rest.d.ts +1 -1
- package/dist/function/rest.js +1 -1
- package/dist/function/rest.mjs +1 -1
- package/dist/function/retry.d.mts +7 -4
- package/dist/function/retry.d.ts +7 -4
- package/dist/function/retry.js +4 -2
- package/dist/function/retry.mjs +1 -1
- package/dist/index.d.mts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +18 -4
- package/dist/index.mjs +12 -5
- package/dist/iterator/_internal/iterator.js +74 -0
- package/dist/iterator/_internal/iterator.mjs +74 -0
- package/dist/iterator/chunk.d.mts +21 -0
- package/dist/iterator/chunk.d.ts +21 -0
- package/dist/iterator/chunk.js +40 -0
- package/dist/iterator/chunk.mjs +40 -0
- package/dist/iterator/count.d.mts +18 -0
- package/dist/iterator/count.d.ts +18 -0
- package/dist/iterator/count.js +26 -0
- package/dist/iterator/count.mjs +26 -0
- package/dist/iterator/dropWhile.d.mts +20 -0
- package/dist/iterator/dropWhile.d.ts +20 -0
- package/dist/iterator/dropWhile.js +52 -0
- package/dist/iterator/dropWhile.mjs +52 -0
- package/dist/iterator/head.d.mts +21 -0
- package/dist/iterator/head.d.ts +21 -0
- package/dist/iterator/head.js +26 -0
- package/dist/iterator/head.mjs +26 -0
- package/dist/iterator/index.d.mts +12 -0
- package/dist/iterator/index.d.ts +12 -0
- package/dist/iterator/index.js +23 -0
- package/dist/iterator/index.mjs +12 -0
- package/dist/iterator/iterate.d.mts +20 -0
- package/dist/iterator/iterate.d.ts +20 -0
- package/dist/iterator/iterate.js +32 -0
- package/dist/iterator/iterate.mjs +32 -0
- package/dist/iterator/partition.d.mts +18 -0
- package/dist/iterator/partition.d.ts +18 -0
- package/dist/iterator/partition.js +36 -0
- package/dist/iterator/partition.mjs +36 -0
- package/dist/iterator/range.d.mts +42 -0
- package/dist/iterator/range.d.ts +42 -0
- package/dist/iterator/range.js +25 -0
- package/dist/iterator/range.mjs +25 -0
- package/dist/iterator/scan.d.mts +23 -0
- package/dist/iterator/scan.d.ts +23 -0
- package/dist/iterator/scan.js +47 -0
- package/dist/iterator/scan.mjs +47 -0
- package/dist/iterator/takeWhile.d.mts +20 -0
- package/dist/iterator/takeWhile.d.ts +20 -0
- package/dist/iterator/takeWhile.js +34 -0
- package/dist/iterator/takeWhile.mjs +34 -0
- package/dist/iterator/uniqBy.d.mts +22 -0
- package/dist/iterator/uniqBy.d.ts +22 -0
- package/dist/iterator/uniqBy.js +43 -0
- package/dist/iterator/uniqBy.mjs +43 -0
- package/dist/iterator/zip.d.mts +23 -0
- package/dist/iterator/zip.d.ts +23 -0
- package/dist/iterator/zip.js +45 -0
- package/dist/iterator/zip.mjs +45 -0
- package/dist/object/cloneDeepWith.d.mts +3 -1
- package/dist/object/cloneDeepWith.d.ts +3 -1
- package/dist/object/cloneDeepWith.js +3 -1
- package/dist/object/cloneDeepWith.mjs +3 -1
- package/dist/object/deepFreeze.d.mts +20 -0
- package/dist/object/deepFreeze.d.ts +20 -0
- package/dist/object/deepFreeze.js +29 -0
- package/dist/object/deepFreeze.mjs +29 -0
- package/dist/object/flattenObject.d.mts +16 -1
- package/dist/object/flattenObject.d.ts +16 -1
- package/dist/object/flattenObject.js +15 -6
- package/dist/object/flattenObject.mjs +15 -6
- package/dist/object/index.d.mts +7 -1
- package/dist/object/index.d.ts +7 -1
- package/dist/object/index.js +12 -0
- package/dist/object/index.mjs +7 -1
- package/dist/object/mapKeysAsync.d.mts +25 -0
- package/dist/object/mapKeysAsync.d.ts +25 -0
- package/dist/object/mapKeysAsync.js +32 -0
- package/dist/object/mapKeysAsync.mjs +32 -0
- package/dist/object/mapValuesAsync.d.mts +26 -0
- package/dist/object/mapValuesAsync.d.ts +26 -0
- package/dist/object/mapValuesAsync.js +32 -0
- package/dist/object/mapValuesAsync.mjs +32 -0
- package/dist/object/merge.js +2 -4
- package/dist/object/merge.mjs +1 -3
- package/dist/object/mergeWith.js +4 -4
- package/dist/object/mergeWith.mjs +4 -4
- package/dist/object/toCamelCaseKeys.d.mts +2 -6
- package/dist/object/toCamelCaseKeys.d.ts +2 -6
- package/dist/object/toConstantCaseKeys.d.mts +52 -0
- package/dist/object/toConstantCaseKeys.d.ts +52 -0
- package/dist/object/toConstantCaseKeys.js +66 -0
- package/dist/object/toConstantCaseKeys.mjs +66 -0
- package/dist/object/toKebabCaseKeys.d.mts +52 -0
- package/dist/object/toKebabCaseKeys.d.ts +52 -0
- package/dist/object/toKebabCaseKeys.js +66 -0
- package/dist/object/toKebabCaseKeys.mjs +66 -0
- package/dist/object/toMerged.js +4 -4
- package/dist/object/toMerged.mjs +4 -4
- package/dist/object/toPascalCaseKeys.d.mts +52 -0
- package/dist/object/toPascalCaseKeys.d.ts +52 -0
- package/dist/object/toPascalCaseKeys.js +66 -0
- package/dist/object/toPascalCaseKeys.mjs +66 -0
- package/dist/object/toSnakeCaseKeys.d.mts +2 -3
- package/dist/object/toSnakeCaseKeys.d.ts +2 -3
- package/dist/promise/index.d.mts +2 -1
- package/dist/promise/index.d.ts +2 -1
- package/dist/promise/index.js +2 -0
- package/dist/promise/index.mjs +2 -1
- package/dist/promise/limitAsync.d.mts +35 -0
- package/dist/promise/limitAsync.d.ts +35 -0
- package/dist/promise/limitAsync.js +46 -0
- package/dist/promise/limitAsync.mjs +46 -0
- package/dist/string/dedent.d.mts +37 -0
- package/dist/string/dedent.d.ts +37 -0
- package/dist/string/dedent.js +38 -0
- package/dist/string/dedent.mjs +38 -0
- package/dist/string/index.d.mts +2 -1
- package/dist/string/index.d.ts +2 -1
- package/dist/string/index.js +5 -3
- package/dist/string/index.mjs +5 -4
- package/dist/types/ToCamelCaseKeys.d.mts +24 -0
- package/dist/types/ToCamelCaseKeys.d.ts +24 -0
- package/dist/types/ToConstantCaseKeys.d.mts +21 -0
- package/dist/types/ToConstantCaseKeys.d.ts +21 -0
- package/dist/types/ToKebabCaseKeys.d.mts +23 -0
- package/dist/types/ToKebabCaseKeys.d.ts +23 -0
- package/dist/types/ToPascalCaseKeys.d.mts +24 -0
- package/dist/types/ToPascalCaseKeys.d.ts +24 -0
- package/dist/types/ToSnakeCaseKeys.d.mts +21 -0
- package/dist/types/ToSnakeCaseKeys.d.ts +21 -0
- package/dist/types/index.d.mts +6 -1
- package/dist/types/index.d.ts +6 -1
- package/fp/iterator.d.ts +1 -0
- package/fp/iterator.js +1 -0
- package/iterator.d.ts +1 -0
- package/iterator.js +1 -0
- package/package.json +70 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/fp/iterator/zip.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a function that lazily pairs the elements of the piped iterator with
|
|
4
|
+
* those of `other`, for use with {@link pipe}. Iteration stops as soon as either
|
|
5
|
+
* iterator is exhausted.
|
|
6
|
+
*
|
|
7
|
+
* @template T - The type of elements produced by the piped iterator.
|
|
8
|
+
* @template U - The type of elements produced by `other`.
|
|
9
|
+
* @param other - The iterator to pair with the piped one.
|
|
10
|
+
* @returns A function mapping an `Iterator<T>` to a lazy `IteratorObject<[T, U]>`.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* import { pipe } from 'es-toolkit/fp';
|
|
14
|
+
* import { zip, toArray } from 'es-toolkit/fp/iterator';
|
|
15
|
+
*
|
|
16
|
+
* pipe([1, 2, 3].values(), zip(['a', 'b'].values()), toArray()); // => [[1, 'a'], [2, 'b']]
|
|
17
|
+
*/
|
|
18
|
+
declare function zip<T, U>(other: Iterator<U>): (source: Iterator<T>) => IteratorObject<[T, U], undefined>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { zip };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const require_zip = require("../../iterator/zip.js");
|
|
2
|
+
//#region src/fp/iterator/zip.ts
|
|
3
|
+
/**
|
|
4
|
+
* Creates a function that lazily pairs the elements of the piped iterator with
|
|
5
|
+
* those of `other`, for use with {@link pipe}. Iteration stops as soon as either
|
|
6
|
+
* iterator is exhausted.
|
|
7
|
+
*
|
|
8
|
+
* @template T - The type of elements produced by the piped iterator.
|
|
9
|
+
* @template U - The type of elements produced by `other`.
|
|
10
|
+
* @param other - The iterator to pair with the piped one.
|
|
11
|
+
* @returns A function mapping an `Iterator<T>` to a lazy `IteratorObject<[T, U]>`.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { pipe } from 'es-toolkit/fp';
|
|
15
|
+
* import { zip, toArray } from 'es-toolkit/fp/iterator';
|
|
16
|
+
*
|
|
17
|
+
* pipe([1, 2, 3].values(), zip(['a', 'b'].values()), toArray()); // => [[1, 'a'], [2, 'b']]
|
|
18
|
+
*/
|
|
19
|
+
function zip(other) {
|
|
20
|
+
return function zipInIterator(source) {
|
|
21
|
+
return require_zip.zip(source, other);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
exports.zip = zip;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { zip as zip$1 } from "../../iterator/zip.mjs";
|
|
2
|
+
//#region src/fp/iterator/zip.ts
|
|
3
|
+
/**
|
|
4
|
+
* Creates a function that lazily pairs the elements of the piped iterator with
|
|
5
|
+
* those of `other`, for use with {@link pipe}. Iteration stops as soon as either
|
|
6
|
+
* iterator is exhausted.
|
|
7
|
+
*
|
|
8
|
+
* @template T - The type of elements produced by the piped iterator.
|
|
9
|
+
* @template U - The type of elements produced by `other`.
|
|
10
|
+
* @param other - The iterator to pair with the piped one.
|
|
11
|
+
* @returns A function mapping an `Iterator<T>` to a lazy `IteratorObject<[T, U]>`.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { pipe } from 'es-toolkit/fp';
|
|
15
|
+
* import { zip, toArray } from 'es-toolkit/fp/iterator';
|
|
16
|
+
*
|
|
17
|
+
* pipe([1, 2, 3].values(), zip(['a', 'b'].values()), toArray()); // => [[1, 'a'], [2, 'b']]
|
|
18
|
+
*/
|
|
19
|
+
function zip(other) {
|
|
20
|
+
return function zipInIterator(source) {
|
|
21
|
+
return zip$1(source, other);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { zip };
|
|
@@ -67,8 +67,9 @@
|
|
|
67
67
|
* }
|
|
68
68
|
* const customCache = new CustomCache<string, number>();
|
|
69
69
|
* const memoizedSumWithCustomCache = memoize(sum, { cache: customCache });
|
|
70
|
-
*
|
|
71
|
-
* console.log(memoizedSumWithCustomCache(
|
|
70
|
+
* const arr = [1, 2];
|
|
71
|
+
* console.log(memoizedSumWithCustomCache(arr)); // 3
|
|
72
|
+
* console.log(memoizedSumWithCustomCache(arr)); // 3 (cached result)
|
|
72
73
|
* console.log(memoizedSumWithCustomCache.cache.size); // 1
|
|
73
74
|
*/
|
|
74
75
|
declare function memoize<F extends (...args: any) => any>(fn: F, options?: {
|
|
@@ -67,8 +67,9 @@
|
|
|
67
67
|
* }
|
|
68
68
|
* const customCache = new CustomCache<string, number>();
|
|
69
69
|
* const memoizedSumWithCustomCache = memoize(sum, { cache: customCache });
|
|
70
|
-
*
|
|
71
|
-
* console.log(memoizedSumWithCustomCache(
|
|
70
|
+
* const arr = [1, 2];
|
|
71
|
+
* console.log(memoizedSumWithCustomCache(arr)); // 3
|
|
72
|
+
* console.log(memoizedSumWithCustomCache(arr)); // 3 (cached result)
|
|
72
73
|
* console.log(memoizedSumWithCustomCache.cache.size); // 1
|
|
73
74
|
*/
|
|
74
75
|
declare function memoize<F extends (...args: any) => any>(fn: F, options?: {
|
package/dist/function/memoize.js
CHANGED
|
@@ -67,8 +67,9 @@
|
|
|
67
67
|
* }
|
|
68
68
|
* const customCache = new CustomCache<string, number>();
|
|
69
69
|
* const memoizedSumWithCustomCache = memoize(sum, { cache: customCache });
|
|
70
|
-
*
|
|
71
|
-
* console.log(memoizedSumWithCustomCache(
|
|
70
|
+
* const arr = [1, 2];
|
|
71
|
+
* console.log(memoizedSumWithCustomCache(arr)); // 3
|
|
72
|
+
* console.log(memoizedSumWithCustomCache(arr)); // 3 (cached result)
|
|
72
73
|
* console.log(memoizedSumWithCustomCache.cache.size); // 1
|
|
73
74
|
*/
|
|
74
75
|
function memoize(fn, options = {}) {
|
|
@@ -67,8 +67,9 @@
|
|
|
67
67
|
* }
|
|
68
68
|
* const customCache = new CustomCache<string, number>();
|
|
69
69
|
* const memoizedSumWithCustomCache = memoize(sum, { cache: customCache });
|
|
70
|
-
*
|
|
71
|
-
* console.log(memoizedSumWithCustomCache(
|
|
70
|
+
* const arr = [1, 2];
|
|
71
|
+
* console.log(memoizedSumWithCustomCache(arr)); // 3
|
|
72
|
+
* console.log(memoizedSumWithCustomCache(arr)); // 3 (cached result)
|
|
72
73
|
* console.log(memoizedSumWithCustomCache.cache.size); // 1
|
|
73
74
|
*/
|
|
74
75
|
function memoize(fn, options = {}) {
|
|
@@ -330,7 +330,7 @@ declare function partial<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3,
|
|
|
330
330
|
* @returns A new function that takes the first and third arguments and returns the result of the original function.
|
|
331
331
|
*
|
|
332
332
|
* @example
|
|
333
|
-
* const multiply = (x: number, y: number, z: number
|
|
333
|
+
* const multiply = (x: number, y: number, z: number) => x * y * z;
|
|
334
334
|
* const multiplyWithPlaceholder = partial(multiply, partial.placeholder, 2, 3);
|
|
335
335
|
* console.log(multiplyWithPlaceholder(4)); // => 24
|
|
336
336
|
*/
|
|
@@ -540,7 +540,7 @@ declare function partial<TS extends any[], T1, R>(func: (arg1: T1, ...args: TS)
|
|
|
540
540
|
*
|
|
541
541
|
* @example
|
|
542
542
|
* const greet = (greeting: string, name: string, punctuation: string) => `${greeting}, ${name}${punctuation}`;
|
|
543
|
-
* const greetWithHello = partial(greet, 'Hello', '!');
|
|
543
|
+
* const greetWithHello = partial(greet, 'Hello', partial.placeholder, '!');
|
|
544
544
|
* console.log(greetWithHello('John')); // => 'Hello, John!'
|
|
545
545
|
*/
|
|
546
546
|
declare function partial<TS extends any[], T1, T2, R>(func: (arg1: T1, arg2: T2, ...args: TS) => R, t1: T1, arg2: T2): (...args: TS) => R;
|
|
@@ -330,7 +330,7 @@ declare function partial<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3,
|
|
|
330
330
|
* @returns A new function that takes the first and third arguments and returns the result of the original function.
|
|
331
331
|
*
|
|
332
332
|
* @example
|
|
333
|
-
* const multiply = (x: number, y: number, z: number
|
|
333
|
+
* const multiply = (x: number, y: number, z: number) => x * y * z;
|
|
334
334
|
* const multiplyWithPlaceholder = partial(multiply, partial.placeholder, 2, 3);
|
|
335
335
|
* console.log(multiplyWithPlaceholder(4)); // => 24
|
|
336
336
|
*/
|
|
@@ -540,7 +540,7 @@ declare function partial<TS extends any[], T1, R>(func: (arg1: T1, ...args: TS)
|
|
|
540
540
|
*
|
|
541
541
|
* @example
|
|
542
542
|
* const greet = (greeting: string, name: string, punctuation: string) => `${greeting}, ${name}${punctuation}`;
|
|
543
|
-
* const greetWithHello = partial(greet, 'Hello', '!');
|
|
543
|
+
* const greetWithHello = partial(greet, 'Hello', partial.placeholder, '!');
|
|
544
544
|
* console.log(greetWithHello('John')); // => 'Hello, John!'
|
|
545
545
|
*/
|
|
546
546
|
declare function partial<TS extends any[], T1, T2, R>(func: (arg1: T1, arg2: T2, ...args: TS) => R, t1: T1, arg2: T2): (...args: TS) => R;
|
|
@@ -203,7 +203,7 @@ declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3
|
|
|
203
203
|
* @returns Returns the new partially applied function.
|
|
204
204
|
* @example
|
|
205
205
|
* const createUser = (name: string, age: number, country: string) => `${name}, ${age} years old from ${country}`;
|
|
206
|
-
* const createUserFromUSA = partialRight(createUser, 'USA'
|
|
206
|
+
* const createUserFromUSA = partialRight(createUser, 'USA');
|
|
207
207
|
* console.log(createUserFromUSA('John', 30)); // => 'John, 30 years old from USA'
|
|
208
208
|
*/
|
|
209
209
|
declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg2: T2, arg3: Placeholder): (arg1: T1, arg3: T3) => R;
|
|
@@ -225,7 +225,7 @@ declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3
|
|
|
225
225
|
* @returns Returns the new partially applied function.
|
|
226
226
|
* @example
|
|
227
227
|
* const logMessage = (level: string, message: string, timestamp: string) => `[${level}] ${message} at ${timestamp}`;
|
|
228
|
-
* const logError = partialRight(logMessage, 'ERROR', '2023-10-01');
|
|
228
|
+
* const logError = partialRight(logMessage, 'ERROR', partialRight.placeholder, '2023-10-01');
|
|
229
229
|
* console.log(logError('Something went wrong!')); // => '[ERROR] Something went wrong! at 2023-10-01'
|
|
230
230
|
*/
|
|
231
231
|
declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg1: T1, arg2: T2, arg3: Placeholder): (arg3: T3) => R;
|
|
@@ -288,7 +288,7 @@ declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3
|
|
|
288
288
|
* @returns Returns the new partially applied function.
|
|
289
289
|
* @example
|
|
290
290
|
* const createProfile = (name: string, age: number, country: string) => `${name}, ${age} from ${country}`;
|
|
291
|
-
* const createProfileFromCanada = partialRight(createProfile, '
|
|
291
|
+
* const createProfileFromCanada = partialRight(createProfile, 'John', partialRight.placeholder, 'Canada');
|
|
292
292
|
* console.log(createProfileFromCanada(30)); // => 'John, 30 from Canada'
|
|
293
293
|
*/
|
|
294
294
|
declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg2: T2, arg3: T3): (arg1: T1) => R;
|
|
@@ -615,9 +615,9 @@ declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3
|
|
|
615
615
|
* @param args The arguments to be partially applied.
|
|
616
616
|
* @returns Returns the new partially applied function.
|
|
617
617
|
* @example
|
|
618
|
-
* const log = (...messages: string[]) =>
|
|
618
|
+
* const log = (...messages: string[]) => messages.join(' ');
|
|
619
619
|
* const logError = partialRight(log, 'Error:');
|
|
620
|
-
* logError('Something went wrong!'); // => '
|
|
620
|
+
* logError('Something went wrong!'); // => 'Something went wrong! Error:'
|
|
621
621
|
*/
|
|
622
622
|
declare function partialRight(func: (...args: any[]) => any, ...args: any[]): (...args: any[]) => any;
|
|
623
623
|
declare namespace partialRight {
|
|
@@ -203,7 +203,7 @@ declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3
|
|
|
203
203
|
* @returns Returns the new partially applied function.
|
|
204
204
|
* @example
|
|
205
205
|
* const createUser = (name: string, age: number, country: string) => `${name}, ${age} years old from ${country}`;
|
|
206
|
-
* const createUserFromUSA = partialRight(createUser, 'USA'
|
|
206
|
+
* const createUserFromUSA = partialRight(createUser, 'USA');
|
|
207
207
|
* console.log(createUserFromUSA('John', 30)); // => 'John, 30 years old from USA'
|
|
208
208
|
*/
|
|
209
209
|
declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg2: T2, arg3: Placeholder): (arg1: T1, arg3: T3) => R;
|
|
@@ -225,7 +225,7 @@ declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3
|
|
|
225
225
|
* @returns Returns the new partially applied function.
|
|
226
226
|
* @example
|
|
227
227
|
* const logMessage = (level: string, message: string, timestamp: string) => `[${level}] ${message} at ${timestamp}`;
|
|
228
|
-
* const logError = partialRight(logMessage, 'ERROR', '2023-10-01');
|
|
228
|
+
* const logError = partialRight(logMessage, 'ERROR', partialRight.placeholder, '2023-10-01');
|
|
229
229
|
* console.log(logError('Something went wrong!')); // => '[ERROR] Something went wrong! at 2023-10-01'
|
|
230
230
|
*/
|
|
231
231
|
declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg1: T1, arg2: T2, arg3: Placeholder): (arg3: T3) => R;
|
|
@@ -288,7 +288,7 @@ declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3
|
|
|
288
288
|
* @returns Returns the new partially applied function.
|
|
289
289
|
* @example
|
|
290
290
|
* const createProfile = (name: string, age: number, country: string) => `${name}, ${age} from ${country}`;
|
|
291
|
-
* const createProfileFromCanada = partialRight(createProfile, '
|
|
291
|
+
* const createProfileFromCanada = partialRight(createProfile, 'John', partialRight.placeholder, 'Canada');
|
|
292
292
|
* console.log(createProfileFromCanada(30)); // => 'John, 30 from Canada'
|
|
293
293
|
*/
|
|
294
294
|
declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg2: T2, arg3: T3): (arg1: T1) => R;
|
|
@@ -615,9 +615,9 @@ declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3
|
|
|
615
615
|
* @param args The arguments to be partially applied.
|
|
616
616
|
* @returns Returns the new partially applied function.
|
|
617
617
|
* @example
|
|
618
|
-
* const log = (...messages: string[]) =>
|
|
618
|
+
* const log = (...messages: string[]) => messages.join(' ');
|
|
619
619
|
* const logError = partialRight(log, 'Error:');
|
|
620
|
-
* logError('Something went wrong!'); // => '
|
|
620
|
+
* logError('Something went wrong!'); // => 'Something went wrong! Error:'
|
|
621
621
|
*/
|
|
622
622
|
declare function partialRight(func: (...args: any[]) => any, ...args: any[]): (...args: any[]) => any;
|
|
623
623
|
declare namespace partialRight {
|
package/dist/function/rest.d.mts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* // Using start index 1
|
|
26
26
|
* const transformedFnWithStart = rest(fn, 1);
|
|
27
|
-
* console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4]]
|
|
27
|
+
* console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4], undefined]
|
|
28
28
|
*
|
|
29
29
|
* // With fewer arguments than the start index
|
|
30
30
|
* console.log(transformedFn(1)); // [1, undefined, []]
|
package/dist/function/rest.d.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* // Using start index 1
|
|
26
26
|
* const transformedFnWithStart = rest(fn, 1);
|
|
27
|
-
* console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4]]
|
|
27
|
+
* console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4], undefined]
|
|
28
28
|
*
|
|
29
29
|
* // With fewer arguments than the start index
|
|
30
30
|
* console.log(transformedFn(1)); // [1, undefined, []]
|
package/dist/function/rest.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* // Using start index 1
|
|
26
26
|
* const transformedFnWithStart = rest(fn, 1);
|
|
27
|
-
* console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4]]
|
|
27
|
+
* console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4], undefined]
|
|
28
28
|
*
|
|
29
29
|
* // With fewer arguments than the start index
|
|
30
30
|
* console.log(transformedFn(1)); // [1, undefined, []]
|
package/dist/function/rest.mjs
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* // Using start index 1
|
|
26
26
|
* const transformedFnWithStart = rest(fn, 1);
|
|
27
|
-
* console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4]]
|
|
27
|
+
* console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4], undefined]
|
|
28
28
|
*
|
|
29
29
|
* // With fewer arguments than the start index
|
|
30
30
|
* console.log(transformedFn(1)); // [1, undefined, []]
|
|
@@ -6,9 +6,9 @@ interface RetryOptions {
|
|
|
6
6
|
*
|
|
7
7
|
* @default 0
|
|
8
8
|
* @example
|
|
9
|
-
* delay: (attempts) =>
|
|
9
|
+
* delay: (attempts, error) => error.status === 429 ? 10000 : attempts * 50
|
|
10
10
|
*/
|
|
11
|
-
delay?: number | ((attempts: number) => number);
|
|
11
|
+
delay?: number | ((attempts: number, error: unknown) => number);
|
|
12
12
|
/**
|
|
13
13
|
* The number of retries to attempt.
|
|
14
14
|
* @default Number.POSITIVE_INFINITY
|
|
@@ -62,7 +62,7 @@ declare function retry<T>(func: () => Promise<T>, retries: number): Promise<T>;
|
|
|
62
62
|
* @template T
|
|
63
63
|
* @param func - The function to retry. It should return a promise.
|
|
64
64
|
* @param options - Options to configure the retry behavior.
|
|
65
|
-
* @param [options.delay=0] - Delay(milliseconds) between retries.
|
|
65
|
+
* @param [options.delay=0] - Delay(milliseconds) between retries. A number or a function that receives the attempt number and the error object.
|
|
66
66
|
* @param [options.retries=Infinity] - The number of retries to attempt.
|
|
67
67
|
* @param [options.signal] - An AbortSignal to cancel the retry operation.
|
|
68
68
|
* @param [options.shouldRetry] - A function that determines whether to retry.
|
|
@@ -77,7 +77,10 @@ declare function retry<T>(func: () => Promise<T>, retries: number): Promise<T>;
|
|
|
77
77
|
* retry(() => fetchData(), { delay: 1000, retries: 5 });
|
|
78
78
|
*
|
|
79
79
|
* // Retry a function with a delay increasing linearly by 50ms per attempt
|
|
80
|
-
* retry(() => fetchData(), { delay: (attempts) =>
|
|
80
|
+
* retry(() => fetchData(), { delay: (attempts) => attempts * 50, retries: 5 });
|
|
81
|
+
*
|
|
82
|
+
* // Retry a function with an error-aware delay (e.g., respect Retry-After headers)
|
|
83
|
+
* retry(() => fetchData(), { delay: (_attempts, error) => error.status === 429 ? 10000 : 1000, retries: 3 });
|
|
81
84
|
*
|
|
82
85
|
* @example
|
|
83
86
|
* // Retry a function with exponential backoff + jitter (max delay 10 seconds)
|
package/dist/function/retry.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ interface RetryOptions {
|
|
|
6
6
|
*
|
|
7
7
|
* @default 0
|
|
8
8
|
* @example
|
|
9
|
-
* delay: (attempts) =>
|
|
9
|
+
* delay: (attempts, error) => error.status === 429 ? 10000 : attempts * 50
|
|
10
10
|
*/
|
|
11
|
-
delay?: number | ((attempts: number) => number);
|
|
11
|
+
delay?: number | ((attempts: number, error: unknown) => number);
|
|
12
12
|
/**
|
|
13
13
|
* The number of retries to attempt.
|
|
14
14
|
* @default Number.POSITIVE_INFINITY
|
|
@@ -62,7 +62,7 @@ declare function retry<T>(func: () => Promise<T>, retries: number): Promise<T>;
|
|
|
62
62
|
* @template T
|
|
63
63
|
* @param func - The function to retry. It should return a promise.
|
|
64
64
|
* @param options - Options to configure the retry behavior.
|
|
65
|
-
* @param [options.delay=0] - Delay(milliseconds) between retries.
|
|
65
|
+
* @param [options.delay=0] - Delay(milliseconds) between retries. A number or a function that receives the attempt number and the error object.
|
|
66
66
|
* @param [options.retries=Infinity] - The number of retries to attempt.
|
|
67
67
|
* @param [options.signal] - An AbortSignal to cancel the retry operation.
|
|
68
68
|
* @param [options.shouldRetry] - A function that determines whether to retry.
|
|
@@ -77,7 +77,10 @@ declare function retry<T>(func: () => Promise<T>, retries: number): Promise<T>;
|
|
|
77
77
|
* retry(() => fetchData(), { delay: 1000, retries: 5 });
|
|
78
78
|
*
|
|
79
79
|
* // Retry a function with a delay increasing linearly by 50ms per attempt
|
|
80
|
-
* retry(() => fetchData(), { delay: (attempts) =>
|
|
80
|
+
* retry(() => fetchData(), { delay: (attempts) => attempts * 50, retries: 5 });
|
|
81
|
+
*
|
|
82
|
+
* // Retry a function with an error-aware delay (e.g., respect Retry-After headers)
|
|
83
|
+
* retry(() => fetchData(), { delay: (_attempts, error) => error.status === 429 ? 10000 : 1000, retries: 3 });
|
|
81
84
|
*
|
|
82
85
|
* @example
|
|
83
86
|
* // Retry a function with exponential backoff + jitter (max delay 10 seconds)
|
package/dist/function/retry.js
CHANGED
|
@@ -35,8 +35,10 @@ async function retry(func, _options) {
|
|
|
35
35
|
} catch (err) {
|
|
36
36
|
error = err;
|
|
37
37
|
if (!shouldRetry(err, attempts)) throw err;
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
if (attempts < retries) {
|
|
39
|
+
const currentDelay = typeof delay$1 === "function" ? delay$1(attempts, error) : delay$1;
|
|
40
|
+
await require_delay.delay(currentDelay);
|
|
41
|
+
}
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
throw error;
|
package/dist/function/retry.mjs
CHANGED
|
@@ -35,7 +35,7 @@ async function retry(func, _options) {
|
|
|
35
35
|
} catch (err) {
|
|
36
36
|
error = err;
|
|
37
37
|
if (!shouldRetry(err, attempts)) throw err;
|
|
38
|
-
await delay(typeof delay$1 === "function" ? delay$1(attempts) : delay$1);
|
|
38
|
+
if (attempts < retries) await delay(typeof delay$1 === "function" ? delay$1(attempts, error) : delay$1);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
throw error;
|
package/dist/index.d.mts
CHANGED
|
@@ -31,7 +31,7 @@ import { isSubset } from "./array/isSubset.mjs";
|
|
|
31
31
|
import { isSubsetWith } from "./array/isSubsetWith.mjs";
|
|
32
32
|
import { keyBy } from "./array/keyBy.mjs";
|
|
33
33
|
import { last } from "./array/last.mjs";
|
|
34
|
-
import { limitAsync } from "./
|
|
34
|
+
import { limitAsync } from "./promise/limitAsync.mjs";
|
|
35
35
|
import { mapAsync } from "./array/mapAsync.mjs";
|
|
36
36
|
import { maxBy } from "./array/maxBy.mjs";
|
|
37
37
|
import { minBy } from "./array/minBy.mjs";
|
|
@@ -108,11 +108,14 @@ import { sumBy } from "./math/sumBy.mjs";
|
|
|
108
108
|
import { clone } from "./object/clone.mjs";
|
|
109
109
|
import { cloneDeep } from "./object/cloneDeep.mjs";
|
|
110
110
|
import { cloneDeepWith } from "./object/cloneDeepWith.mjs";
|
|
111
|
+
import { deepFreeze } from "./object/deepFreeze.mjs";
|
|
111
112
|
import { findKey } from "./object/findKey.mjs";
|
|
112
113
|
import { flattenObject } from "./object/flattenObject.mjs";
|
|
113
114
|
import { invert } from "./object/invert.mjs";
|
|
114
115
|
import { mapKeys } from "./object/mapKeys.mjs";
|
|
116
|
+
import { mapKeysAsync } from "./object/mapKeysAsync.mjs";
|
|
115
117
|
import { mapValues } from "./object/mapValues.mjs";
|
|
118
|
+
import { mapValuesAsync } from "./object/mapValuesAsync.mjs";
|
|
116
119
|
import { merge } from "./object/merge.mjs";
|
|
117
120
|
import { mergeWith } from "./object/mergeWith.mjs";
|
|
118
121
|
import { omit } from "./object/omit.mjs";
|
|
@@ -121,7 +124,10 @@ import { pick } from "./object/pick.mjs";
|
|
|
121
124
|
import { pickBy } from "./object/pickBy.mjs";
|
|
122
125
|
import { sortKeys } from "./object/sortKeys.mjs";
|
|
123
126
|
import { toCamelCaseKeys } from "./object/toCamelCaseKeys.mjs";
|
|
127
|
+
import { toConstantCaseKeys } from "./object/toConstantCaseKeys.mjs";
|
|
128
|
+
import { toKebabCaseKeys } from "./object/toKebabCaseKeys.mjs";
|
|
124
129
|
import { toMerged } from "./object/toMerged.mjs";
|
|
130
|
+
import { toPascalCaseKeys } from "./object/toPascalCaseKeys.mjs";
|
|
125
131
|
import { toSnakeCaseKeys } from "./object/toSnakeCaseKeys.mjs";
|
|
126
132
|
import { isArrayBuffer } from "./predicate/isArrayBuffer.mjs";
|
|
127
133
|
import { isBlob } from "./predicate/isBlob.mjs";
|
|
@@ -165,6 +171,7 @@ import { camelCase } from "./string/camelCase.mjs";
|
|
|
165
171
|
import { capitalize } from "./string/capitalize.mjs";
|
|
166
172
|
import { constantCase } from "./string/constantCase.mjs";
|
|
167
173
|
import { deburr } from "./string/deburr.mjs";
|
|
174
|
+
import { dedent } from "./string/dedent.mjs";
|
|
168
175
|
import { escape } from "./string/escape.mjs";
|
|
169
176
|
import { escapeRegExp } from "./string/escapeRegExp.mjs";
|
|
170
177
|
import { kebabCase } from "./string/kebabCase.mjs";
|
|
@@ -185,4 +192,4 @@ import { words } from "./string/words.mjs";
|
|
|
185
192
|
import { attempt } from "./util/attempt.mjs";
|
|
186
193
|
import { attemptAsync } from "./util/attemptAsync.mjs";
|
|
187
194
|
import { invariant } from "./util/invariant.mjs";
|
|
188
|
-
export { AbortError, DebounceOptions, DebouncedFunction, MemoizeCache, Mutex, Semaphore, ThrottleOptions, ThrottledFunction, TimeoutError, after, allKeyed, ary, invariant as assert, asyncNoop, at, attempt, attemptAsync, before, camelCase, capitalize, cartesianProduct, chunk, chunkBy, clamp, clone, cloneDeep, cloneDeepWith, combinations, compact, constantCase, countBy, curry, curryRight, debounce, deburr, delay, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, escape, escapeRegExp, fill, filterAsync, findKey, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, flattenObject, flow, flowRight, forEachAsync, forEachRight, groupBy, head, identity, inRange, initial, intersection, intersectionBy, intersectionWith, invariant, invert, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFunction, isIterable, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNil, isNode, isNotNil, isNull, isNumber, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSubset, isSubsetWith, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, kebabCase, keyBy, last, limitAsync, lowerCase, lowerFirst, mapAsync, mapKeys, mapValues, maxBy, mean, meanBy, median, medianBy, memoize, merge, mergeWith, minBy, negate, noop, omit, omitBy, once, orderBy, pad, partial, partialRight, partition, pascalCase, percentile, pick, pickBy, pull, pullAt, random, randomInt, range, rangeRight, reduceAsync, remove, rest, retry, reverseString, round, sample, sampleSize, shuffle, snakeCase, sortBy, sortKeys, spread, startCase, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, throttle, timeout, toCamelCaseKeys, toFilled, toMerged, toSnakeCaseKeys, trim, trimEnd, trimStart, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, upperCase, upperFirst, windowed, withTimeout, without, words, xor, xorBy, xorWith, zip, zipObject, zipWith };
|
|
195
|
+
export { AbortError, DebounceOptions, DebouncedFunction, MemoizeCache, Mutex, Semaphore, ThrottleOptions, ThrottledFunction, TimeoutError, after, allKeyed, ary, invariant as assert, asyncNoop, at, attempt, attemptAsync, before, camelCase, capitalize, cartesianProduct, chunk, chunkBy, clamp, clone, cloneDeep, cloneDeepWith, combinations, compact, constantCase, countBy, curry, curryRight, debounce, deburr, dedent, deepFreeze, delay, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, escape, escapeRegExp, fill, filterAsync, findKey, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, flattenObject, flow, flowRight, forEachAsync, forEachRight, groupBy, head, identity, inRange, initial, intersection, intersectionBy, intersectionWith, invariant, invert, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFunction, isIterable, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNil, isNode, isNotNil, isNull, isNumber, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSubset, isSubsetWith, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, kebabCase, keyBy, last, limitAsync, lowerCase, lowerFirst, mapAsync, mapKeys, mapKeysAsync, mapValues, mapValuesAsync, maxBy, mean, meanBy, median, medianBy, memoize, merge, mergeWith, minBy, negate, noop, omit, omitBy, once, orderBy, pad, partial, partialRight, partition, pascalCase, percentile, pick, pickBy, pull, pullAt, random, randomInt, range, rangeRight, reduceAsync, remove, rest, retry, reverseString, round, sample, sampleSize, shuffle, snakeCase, sortBy, sortKeys, spread, startCase, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, throttle, timeout, toCamelCaseKeys, toConstantCaseKeys, toFilled, toKebabCaseKeys, toMerged, toPascalCaseKeys, toSnakeCaseKeys, trim, trimEnd, trimStart, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, upperCase, upperFirst, windowed, withTimeout, without, words, xor, xorBy, xorWith, zip, zipObject, zipWith };
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ import { isSubset } from "./array/isSubset.js";
|
|
|
31
31
|
import { isSubsetWith } from "./array/isSubsetWith.js";
|
|
32
32
|
import { keyBy } from "./array/keyBy.js";
|
|
33
33
|
import { last } from "./array/last.js";
|
|
34
|
-
import { limitAsync } from "./
|
|
34
|
+
import { limitAsync } from "./promise/limitAsync.js";
|
|
35
35
|
import { mapAsync } from "./array/mapAsync.js";
|
|
36
36
|
import { maxBy } from "./array/maxBy.js";
|
|
37
37
|
import { minBy } from "./array/minBy.js";
|
|
@@ -108,11 +108,14 @@ import { sumBy } from "./math/sumBy.js";
|
|
|
108
108
|
import { clone } from "./object/clone.js";
|
|
109
109
|
import { cloneDeep } from "./object/cloneDeep.js";
|
|
110
110
|
import { cloneDeepWith } from "./object/cloneDeepWith.js";
|
|
111
|
+
import { deepFreeze } from "./object/deepFreeze.js";
|
|
111
112
|
import { findKey } from "./object/findKey.js";
|
|
112
113
|
import { flattenObject } from "./object/flattenObject.js";
|
|
113
114
|
import { invert } from "./object/invert.js";
|
|
114
115
|
import { mapKeys } from "./object/mapKeys.js";
|
|
116
|
+
import { mapKeysAsync } from "./object/mapKeysAsync.js";
|
|
115
117
|
import { mapValues } from "./object/mapValues.js";
|
|
118
|
+
import { mapValuesAsync } from "./object/mapValuesAsync.js";
|
|
116
119
|
import { merge } from "./object/merge.js";
|
|
117
120
|
import { mergeWith } from "./object/mergeWith.js";
|
|
118
121
|
import { omit } from "./object/omit.js";
|
|
@@ -121,7 +124,10 @@ import { pick } from "./object/pick.js";
|
|
|
121
124
|
import { pickBy } from "./object/pickBy.js";
|
|
122
125
|
import { sortKeys } from "./object/sortKeys.js";
|
|
123
126
|
import { toCamelCaseKeys } from "./object/toCamelCaseKeys.js";
|
|
127
|
+
import { toConstantCaseKeys } from "./object/toConstantCaseKeys.js";
|
|
128
|
+
import { toKebabCaseKeys } from "./object/toKebabCaseKeys.js";
|
|
124
129
|
import { toMerged } from "./object/toMerged.js";
|
|
130
|
+
import { toPascalCaseKeys } from "./object/toPascalCaseKeys.js";
|
|
125
131
|
import { toSnakeCaseKeys } from "./object/toSnakeCaseKeys.js";
|
|
126
132
|
import { isArrayBuffer } from "./predicate/isArrayBuffer.js";
|
|
127
133
|
import { isBlob } from "./predicate/isBlob.js";
|
|
@@ -165,6 +171,7 @@ import { camelCase } from "./string/camelCase.js";
|
|
|
165
171
|
import { capitalize } from "./string/capitalize.js";
|
|
166
172
|
import { constantCase } from "./string/constantCase.js";
|
|
167
173
|
import { deburr } from "./string/deburr.js";
|
|
174
|
+
import { dedent } from "./string/dedent.js";
|
|
168
175
|
import { escape } from "./string/escape.js";
|
|
169
176
|
import { escapeRegExp } from "./string/escapeRegExp.js";
|
|
170
177
|
import { kebabCase } from "./string/kebabCase.js";
|
|
@@ -185,4 +192,4 @@ import { words } from "./string/words.js";
|
|
|
185
192
|
import { attempt } from "./util/attempt.js";
|
|
186
193
|
import { attemptAsync } from "./util/attemptAsync.js";
|
|
187
194
|
import { invariant } from "./util/invariant.js";
|
|
188
|
-
export { AbortError, DebounceOptions, DebouncedFunction, MemoizeCache, Mutex, Semaphore, ThrottleOptions, ThrottledFunction, TimeoutError, after, allKeyed, ary, invariant as assert, asyncNoop, at, attempt, attemptAsync, before, camelCase, capitalize, cartesianProduct, chunk, chunkBy, clamp, clone, cloneDeep, cloneDeepWith, combinations, compact, constantCase, countBy, curry, curryRight, debounce, deburr, delay, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, escape, escapeRegExp, fill, filterAsync, findKey, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, flattenObject, flow, flowRight, forEachAsync, forEachRight, groupBy, head, identity, inRange, initial, intersection, intersectionBy, intersectionWith, invariant, invert, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFunction, isIterable, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNil, isNode, isNotNil, isNull, isNumber, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSubset, isSubsetWith, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, kebabCase, keyBy, last, limitAsync, lowerCase, lowerFirst, mapAsync, mapKeys, mapValues, maxBy, mean, meanBy, median, medianBy, memoize, merge, mergeWith, minBy, negate, noop, omit, omitBy, once, orderBy, pad, partial, partialRight, partition, pascalCase, percentile, pick, pickBy, pull, pullAt, random, randomInt, range, rangeRight, reduceAsync, remove, rest, retry, reverseString, round, sample, sampleSize, shuffle, snakeCase, sortBy, sortKeys, spread, startCase, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, throttle, timeout, toCamelCaseKeys, toFilled, toMerged, toSnakeCaseKeys, trim, trimEnd, trimStart, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, upperCase, upperFirst, windowed, withTimeout, without, words, xor, xorBy, xorWith, zip, zipObject, zipWith };
|
|
195
|
+
export { AbortError, DebounceOptions, DebouncedFunction, MemoizeCache, Mutex, Semaphore, ThrottleOptions, ThrottledFunction, TimeoutError, after, allKeyed, ary, invariant as assert, asyncNoop, at, attempt, attemptAsync, before, camelCase, capitalize, cartesianProduct, chunk, chunkBy, clamp, clone, cloneDeep, cloneDeepWith, combinations, compact, constantCase, countBy, curry, curryRight, debounce, deburr, dedent, deepFreeze, delay, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, escape, escapeRegExp, fill, filterAsync, findKey, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, flattenObject, flow, flowRight, forEachAsync, forEachRight, groupBy, head, identity, inRange, initial, intersection, intersectionBy, intersectionWith, invariant, invert, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFunction, isIterable, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNil, isNode, isNotNil, isNull, isNumber, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSubset, isSubsetWith, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, kebabCase, keyBy, last, limitAsync, lowerCase, lowerFirst, mapAsync, mapKeys, mapKeysAsync, mapValues, mapValuesAsync, maxBy, mean, meanBy, median, medianBy, memoize, merge, mergeWith, minBy, negate, noop, omit, omitBy, once, orderBy, pad, partial, partialRight, partition, pascalCase, percentile, pick, pickBy, pull, pullAt, random, randomInt, range, rangeRight, reduceAsync, remove, rest, retry, reverseString, round, sample, sampleSize, shuffle, snakeCase, sortBy, sortKeys, spread, startCase, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, throttle, timeout, toCamelCaseKeys, toConstantCaseKeys, toFilled, toKebabCaseKeys, toMerged, toPascalCaseKeys, toSnakeCaseKeys, trim, trimEnd, trimStart, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, upperCase, upperFirst, windowed, withTimeout, without, words, xor, xorBy, xorWith, zip, zipObject, zipWith };
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const require_dropRightWhile = require("./array/dropRightWhile.js");
|
|
|
15
15
|
const require_dropWhile = require("./array/dropWhile.js");
|
|
16
16
|
const require_fill = require("./array/fill.js");
|
|
17
17
|
const require_semaphore = require("./promise/semaphore.js");
|
|
18
|
-
const require_limitAsync = require("./
|
|
18
|
+
const require_limitAsync = require("./promise/limitAsync.js");
|
|
19
19
|
const require_filterAsync = require("./array/filterAsync.js");
|
|
20
20
|
const require_flatten = require("./array/flatten.js");
|
|
21
21
|
const require_flatMap = require("./array/flatMap.js");
|
|
@@ -117,12 +117,15 @@ const require_clone = require("./object/clone.js");
|
|
|
117
117
|
const require_isBuffer = require("./predicate/isBuffer.js");
|
|
118
118
|
const require_cloneDeepWith = require("./object/cloneDeepWith.js");
|
|
119
119
|
const require_cloneDeep = require("./object/cloneDeep.js");
|
|
120
|
+
const require_deepFreeze = require("./object/deepFreeze.js");
|
|
120
121
|
const require_findKey = require("./object/findKey.js");
|
|
121
122
|
const require_isPlainObject = require("./predicate/isPlainObject.js");
|
|
122
123
|
const require_flattenObject = require("./object/flattenObject.js");
|
|
123
124
|
const require_invert = require("./object/invert.js");
|
|
124
125
|
const require_mapKeys = require("./object/mapKeys.js");
|
|
126
|
+
const require_mapKeysAsync = require("./object/mapKeysAsync.js");
|
|
125
127
|
const require_mapValues = require("./object/mapValues.js");
|
|
128
|
+
const require_mapValuesAsync = require("./object/mapValuesAsync.js");
|
|
126
129
|
const require_merge = require("./object/merge.js");
|
|
127
130
|
const require_mergeWith = require("./object/mergeWith.js");
|
|
128
131
|
const require_omit = require("./object/omit.js");
|
|
@@ -134,7 +137,13 @@ const require_capitalize = require("./string/capitalize.js");
|
|
|
134
137
|
const require_words = require("./string/words.js");
|
|
135
138
|
const require_camelCase = require("./string/camelCase.js");
|
|
136
139
|
const require_toCamelCaseKeys = require("./object/toCamelCaseKeys.js");
|
|
140
|
+
const require_constantCase = require("./string/constantCase.js");
|
|
141
|
+
const require_toConstantCaseKeys = require("./object/toConstantCaseKeys.js");
|
|
142
|
+
const require_kebabCase = require("./string/kebabCase.js");
|
|
143
|
+
const require_toKebabCaseKeys = require("./object/toKebabCaseKeys.js");
|
|
137
144
|
const require_toMerged = require("./object/toMerged.js");
|
|
145
|
+
const require_pascalCase = require("./string/pascalCase.js");
|
|
146
|
+
const require_toPascalCaseKeys = require("./object/toPascalCaseKeys.js");
|
|
138
147
|
const require_snakeCase = require("./string/snakeCase.js");
|
|
139
148
|
const require_toSnakeCaseKeys = require("./object/toSnakeCaseKeys.js");
|
|
140
149
|
require("./object/index.js");
|
|
@@ -173,15 +182,13 @@ const require_mutex = require("./promise/mutex.js");
|
|
|
173
182
|
const require_timeout = require("./promise/timeout.js");
|
|
174
183
|
const require_withTimeout = require("./promise/withTimeout.js");
|
|
175
184
|
require("./promise/index.js");
|
|
176
|
-
const require_constantCase = require("./string/constantCase.js");
|
|
177
185
|
const require_deburr = require("./string/deburr.js");
|
|
186
|
+
const require_dedent = require("./string/dedent.js");
|
|
178
187
|
const require_escape = require("./string/escape.js");
|
|
179
188
|
const require_escapeRegExp = require("./string/escapeRegExp.js");
|
|
180
|
-
const require_kebabCase = require("./string/kebabCase.js");
|
|
181
189
|
const require_lowerCase = require("./string/lowerCase.js");
|
|
182
190
|
const require_lowerFirst = require("./string/lowerFirst.js");
|
|
183
191
|
const require_pad = require("./string/pad.js");
|
|
184
|
-
const require_pascalCase = require("./string/pascalCase.js");
|
|
185
192
|
const require_reverseString = require("./string/reverseString.js");
|
|
186
193
|
const require_startCase = require("./string/startCase.js");
|
|
187
194
|
const require_trimEnd = require("./string/trimEnd.js");
|
|
@@ -225,6 +232,8 @@ exports.curry = require_curry.curry;
|
|
|
225
232
|
exports.curryRight = require_curryRight.curryRight;
|
|
226
233
|
exports.debounce = require_debounce.debounce;
|
|
227
234
|
exports.deburr = require_deburr.deburr;
|
|
235
|
+
exports.dedent = require_dedent.dedent;
|
|
236
|
+
exports.deepFreeze = require_deepFreeze.deepFreeze;
|
|
228
237
|
exports.delay = require_delay.delay;
|
|
229
238
|
exports.difference = require_difference.difference;
|
|
230
239
|
exports.differenceBy = require_differenceBy.differenceBy;
|
|
@@ -303,7 +312,9 @@ exports.lowerCase = require_lowerCase.lowerCase;
|
|
|
303
312
|
exports.lowerFirst = require_lowerFirst.lowerFirst;
|
|
304
313
|
exports.mapAsync = require_mapAsync.mapAsync;
|
|
305
314
|
exports.mapKeys = require_mapKeys.mapKeys;
|
|
315
|
+
exports.mapKeysAsync = require_mapKeysAsync.mapKeysAsync;
|
|
306
316
|
exports.mapValues = require_mapValues.mapValues;
|
|
317
|
+
exports.mapValuesAsync = require_mapValuesAsync.mapValuesAsync;
|
|
307
318
|
exports.maxBy = require_maxBy.maxBy;
|
|
308
319
|
exports.mean = require_mean.mean;
|
|
309
320
|
exports.meanBy = require_meanBy.meanBy;
|
|
@@ -357,8 +368,11 @@ exports.takeWhile = require_takeWhile.takeWhile;
|
|
|
357
368
|
exports.throttle = require_throttle.throttle;
|
|
358
369
|
exports.timeout = require_timeout.timeout;
|
|
359
370
|
exports.toCamelCaseKeys = require_toCamelCaseKeys.toCamelCaseKeys;
|
|
371
|
+
exports.toConstantCaseKeys = require_toConstantCaseKeys.toConstantCaseKeys;
|
|
360
372
|
exports.toFilled = require_toFilled.toFilled;
|
|
373
|
+
exports.toKebabCaseKeys = require_toKebabCaseKeys.toKebabCaseKeys;
|
|
361
374
|
exports.toMerged = require_toMerged.toMerged;
|
|
375
|
+
exports.toPascalCaseKeys = require_toPascalCaseKeys.toPascalCaseKeys;
|
|
362
376
|
exports.toSnakeCaseKeys = require_toSnakeCaseKeys.toSnakeCaseKeys;
|
|
363
377
|
exports.trim = require_trim.trim;
|
|
364
378
|
exports.trimEnd = require_trimEnd.trimEnd;
|