@vielzeug/arsenal 2.1.0 → 26.10.0
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/README.md +5 -18
- package/dist/_common/_lruMap.cjs +1 -1
- package/dist/_common/_lruMap.cjs.map +1 -1
- package/dist/_common/_lruMap.js +1 -17
- package/dist/_common/_lruMap.js.map +1 -1
- package/dist/_common/_selectorSet.cjs +1 -1
- package/dist/_common/_selectorSet.cjs.map +1 -1
- package/dist/_common/_selectorSet.js +1 -15
- package/dist/_common/_selectorSet.js.map +1 -1
- package/dist/_common/unsafePaths.cjs +1 -1
- package/dist/_common/unsafePaths.cjs.map +1 -1
- package/dist/_common/unsafePaths.js +1 -12
- package/dist/_common/unsafePaths.js.map +1 -1
- package/dist/_dev.cjs +1 -1
- package/dist/_dev.cjs.map +1 -1
- package/dist/_dev.js +1 -5
- package/dist/_dev.js.map +1 -1
- package/dist/array/chunk.cjs +1 -1
- package/dist/array/chunk.cjs.map +1 -1
- package/dist/array/chunk.d.ts +1 -1
- package/dist/array/chunk.d.ts.map +1 -1
- package/dist/array/chunk.js +1 -9
- package/dist/array/chunk.js.map +1 -1
- package/dist/array/compact.cjs +1 -1
- package/dist/array/compact.cjs.map +1 -1
- package/dist/array/compact.d.ts +1 -1
- package/dist/array/compact.d.ts.map +1 -1
- package/dist/array/compact.js +1 -7
- package/dist/array/compact.js.map +1 -1
- package/dist/array/compare.cjs +1 -1
- package/dist/array/compare.cjs.map +1 -1
- package/dist/array/compare.js +1 -18
- package/dist/array/compare.js.map +1 -1
- package/dist/array/compareBy.cjs +1 -1
- package/dist/array/compareBy.cjs.map +1 -1
- package/dist/array/compareBy.js +1 -15
- package/dist/array/compareBy.js.map +1 -1
- package/dist/array/contains.cjs +1 -1
- package/dist/array/contains.cjs.map +1 -1
- package/dist/array/contains.d.ts +1 -1
- package/dist/array/contains.d.ts.map +1 -1
- package/dist/array/contains.js +1 -8
- package/dist/array/contains.js.map +1 -1
- package/dist/array/countBy.cjs +1 -1
- package/dist/array/countBy.cjs.map +1 -1
- package/dist/array/countBy.d.ts +1 -1
- package/dist/array/countBy.d.ts.map +1 -1
- package/dist/array/countBy.js +1 -13
- package/dist/array/countBy.js.map +1 -1
- package/dist/array/difference.cjs +1 -1
- package/dist/array/difference.cjs.map +1 -1
- package/dist/array/difference.d.ts +4 -2
- package/dist/array/difference.d.ts.map +1 -1
- package/dist/array/difference.js +1 -13
- package/dist/array/difference.js.map +1 -1
- package/dist/array/drop.cjs +1 -1
- package/dist/array/drop.cjs.map +1 -1
- package/dist/array/drop.d.ts +1 -1
- package/dist/array/drop.d.ts.map +1 -1
- package/dist/array/drop.js +1 -8
- package/dist/array/drop.js.map +1 -1
- package/dist/array/dropLast.cjs +1 -1
- package/dist/array/dropLast.cjs.map +1 -1
- package/dist/array/dropLast.d.ts +1 -1
- package/dist/array/dropLast.d.ts.map +1 -1
- package/dist/array/dropLast.js +1 -8
- package/dist/array/dropLast.js.map +1 -1
- package/dist/array/filterMap.cjs +1 -1
- package/dist/array/filterMap.cjs.map +1 -1
- package/dist/array/filterMap.d.ts +3 -1
- package/dist/array/filterMap.d.ts.map +1 -1
- package/dist/array/filterMap.js +1 -12
- package/dist/array/filterMap.js.map +1 -1
- package/dist/array/first.cjs +1 -1
- package/dist/array/first.cjs.map +1 -1
- package/dist/array/first.d.ts +1 -1
- package/dist/array/first.d.ts.map +1 -1
- package/dist/array/first.js +1 -7
- package/dist/array/first.js.map +1 -1
- package/dist/array/groupBy.cjs +1 -1
- package/dist/array/groupBy.cjs.map +1 -1
- package/dist/array/groupBy.d.ts +1 -1
- package/dist/array/groupBy.d.ts.map +1 -1
- package/dist/array/groupBy.js +1 -13
- package/dist/array/groupBy.js.map +1 -1
- package/dist/array/index.cjs +1 -1
- package/dist/array/index.d.ts +0 -1
- package/dist/array/index.d.ts.map +1 -1
- package/dist/array/index.js +1 -29
- package/dist/array/indexBy.cjs +1 -1
- package/dist/array/indexBy.cjs.map +1 -1
- package/dist/array/indexBy.d.ts +1 -1
- package/dist/array/indexBy.d.ts.map +1 -1
- package/dist/array/indexBy.js +1 -13
- package/dist/array/indexBy.js.map +1 -1
- package/dist/array/intersection.cjs +1 -1
- package/dist/array/intersection.cjs.map +1 -1
- package/dist/array/intersection.d.ts +4 -2
- package/dist/array/intersection.d.ts.map +1 -1
- package/dist/array/intersection.js +1 -13
- package/dist/array/intersection.js.map +1 -1
- package/dist/array/last.cjs +1 -1
- package/dist/array/last.cjs.map +1 -1
- package/dist/array/last.d.ts +1 -1
- package/dist/array/last.d.ts.map +1 -1
- package/dist/array/last.js +1 -7
- package/dist/array/last.js.map +1 -1
- package/dist/array/partition.cjs +1 -1
- package/dist/array/partition.cjs.map +1 -1
- package/dist/array/partition.d.ts +3 -1
- package/dist/array/partition.d.ts.map +1 -1
- package/dist/array/partition.js +1 -9
- package/dist/array/partition.js.map +1 -1
- package/dist/array/replace.cjs +1 -1
- package/dist/array/replace.cjs.map +1 -1
- package/dist/array/replace.d.ts +2 -15
- package/dist/array/replace.d.ts.map +1 -1
- package/dist/array/replace.js +1 -12
- package/dist/array/replace.js.map +1 -1
- package/dist/array/rotate.cjs +1 -1
- package/dist/array/rotate.cjs.map +1 -1
- package/dist/array/rotate.d.ts +5 -17
- package/dist/array/rotate.d.ts.map +1 -1
- package/dist/array/rotate.js +1 -9
- package/dist/array/rotate.js.map +1 -1
- package/dist/array/search.cjs +1 -1
- package/dist/array/search.cjs.map +1 -1
- package/dist/array/search.js +1 -29
- package/dist/array/search.js.map +1 -1
- package/dist/array/sort.cjs +1 -1
- package/dist/array/sort.cjs.map +1 -1
- package/dist/array/sort.d.ts +2 -2
- package/dist/array/sort.d.ts.map +1 -1
- package/dist/array/sort.js +1 -14
- package/dist/array/sort.js.map +1 -1
- package/dist/array/take.cjs +1 -1
- package/dist/array/take.cjs.map +1 -1
- package/dist/array/take.d.ts +1 -1
- package/dist/array/take.d.ts.map +1 -1
- package/dist/array/take.js +1 -8
- package/dist/array/take.js.map +1 -1
- package/dist/array/takeLast.cjs +1 -1
- package/dist/array/takeLast.cjs.map +1 -1
- package/dist/array/takeLast.d.ts +1 -1
- package/dist/array/takeLast.d.ts.map +1 -1
- package/dist/array/takeLast.js +1 -8
- package/dist/array/takeLast.js.map +1 -1
- package/dist/array/toggle.cjs +1 -1
- package/dist/array/toggle.cjs.map +1 -1
- package/dist/array/toggle.d.ts +1 -1
- package/dist/array/toggle.d.ts.map +1 -1
- package/dist/array/toggle.js +1 -8
- package/dist/array/toggle.js.map +1 -1
- package/dist/array/union.cjs +1 -1
- package/dist/array/union.cjs.map +1 -1
- package/dist/array/union.d.ts +4 -2
- package/dist/array/union.d.ts.map +1 -1
- package/dist/array/union.js +1 -8
- package/dist/array/union.js.map +1 -1
- package/dist/array/uniq.cjs +1 -1
- package/dist/array/uniq.cjs.map +1 -1
- package/dist/array/uniq.d.ts +1 -1
- package/dist/array/uniq.d.ts.map +1 -1
- package/dist/array/uniq.js +1 -8
- package/dist/array/uniq.js.map +1 -1
- package/dist/array/unzip.cjs +1 -1
- package/dist/array/unzip.cjs.map +1 -1
- package/dist/array/unzip.js +1 -10
- package/dist/array/unzip.js.map +1 -1
- package/dist/array/zip.cjs +1 -1
- package/dist/array/zip.cjs.map +1 -1
- package/dist/array/zip.d.ts +1 -1
- package/dist/array/zip.d.ts.map +1 -1
- package/dist/array/zip.js +1 -10
- package/dist/array/zip.js.map +1 -1
- package/dist/arsenal.cjs +1 -1
- package/dist/arsenal.cjs.map +1 -1
- package/dist/arsenal.iife.js +1 -1
- package/dist/arsenal.iife.js.map +1 -1
- package/dist/arsenal.js +1 -1
- package/dist/arsenal.js.map +1 -1
- package/dist/async/abortError.cjs +1 -1
- package/dist/async/abortError.cjs.map +1 -1
- package/dist/async/abortError.d.ts +3 -2
- package/dist/async/abortError.d.ts.map +1 -1
- package/dist/async/abortError.js +1 -7
- package/dist/async/abortError.js.map +1 -1
- package/dist/async/abortable.cjs +1 -1
- package/dist/async/abortable.cjs.map +1 -1
- package/dist/async/abortable.js +1 -11
- package/dist/async/abortable.js.map +1 -1
- package/dist/async/attempt.cjs +1 -1
- package/dist/async/attempt.cjs.map +1 -1
- package/dist/async/attempt.js +1 -23
- package/dist/async/attempt.js.map +1 -1
- package/dist/async/backoff.cjs +1 -1
- package/dist/async/backoff.cjs.map +1 -1
- package/dist/async/backoff.js +1 -7
- package/dist/async/backoff.js.map +1 -1
- package/dist/async/index.js +1 -10
- package/dist/async/parallel.cjs +1 -1
- package/dist/async/parallel.cjs.map +1 -1
- package/dist/async/parallel.js +1 -24
- package/dist/async/parallel.js.map +1 -1
- package/dist/async/retry.cjs +1 -1
- package/dist/async/retry.cjs.map +1 -1
- package/dist/async/retry.d.ts +4 -6
- package/dist/async/retry.d.ts.map +1 -1
- package/dist/async/retry.js +1 -24
- package/dist/async/retry.js.map +1 -1
- package/dist/async/sleep.cjs +1 -1
- package/dist/async/sleep.cjs.map +1 -1
- package/dist/async/sleep.js +1 -15
- package/dist/async/sleep.js.map +1 -1
- package/dist/async/taskPool.cjs +1 -1
- package/dist/async/taskPool.cjs.map +1 -1
- package/dist/async/taskPool.js +1 -50
- package/dist/async/taskPool.js.map +1 -1
- package/dist/async/waitFor.cjs +1 -1
- package/dist/async/waitFor.cjs.map +1 -1
- package/dist/async/waitFor.js +1 -12
- package/dist/async/waitFor.js.map +1 -1
- package/dist/cache/cache.cjs +1 -1
- package/dist/cache/cache.cjs.map +1 -1
- package/dist/cache/cache.d.ts +1 -0
- package/dist/cache/cache.d.ts.map +1 -1
- package/dist/cache/cache.js +1 -58
- package/dist/cache/cache.js.map +1 -1
- package/dist/cache/index.js +1 -3
- package/dist/cache/memo.cjs +1 -1
- package/dist/cache/memo.cjs.map +1 -1
- package/dist/cache/memo.js +1 -37
- package/dist/cache/memo.js.map +1 -1
- package/dist/encoding/base64url.cjs +2 -0
- package/dist/encoding/base64url.cjs.map +1 -0
- package/dist/encoding/base64url.d.ts +9 -0
- package/dist/encoding/base64url.d.ts.map +1 -0
- package/dist/encoding/base64url.js +2 -0
- package/dist/encoding/base64url.js.map +1 -0
- package/dist/encoding/index.cjs +1 -0
- package/dist/encoding/index.d.ts +2 -0
- package/dist/encoding/index.d.ts.map +1 -0
- package/dist/encoding/index.js +1 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.js +1 -9
- package/dist/errors.js.map +1 -1
- package/dist/function/assert.cjs +1 -1
- package/dist/function/assert.cjs.map +1 -1
- package/dist/function/assert.d.ts +1 -1
- package/dist/function/assert.js +1 -7
- package/dist/function/assert.js.map +1 -1
- package/dist/function/debounce.cjs +1 -1
- package/dist/function/debounce.cjs.map +1 -1
- package/dist/function/debounce.js +1 -26
- package/dist/function/debounce.js.map +1 -1
- package/dist/function/index.cjs +1 -1
- package/dist/function/index.d.ts +1 -0
- package/dist/function/index.d.ts.map +1 -1
- package/dist/function/index.js +1 -8
- package/dist/function/once.cjs +1 -1
- package/dist/function/once.cjs.map +1 -1
- package/dist/function/once.js +1 -10
- package/dist/function/once.js.map +1 -1
- package/dist/function/pipe.cjs +1 -1
- package/dist/function/pipe.cjs.map +1 -1
- package/dist/function/pipe.js +1 -9
- package/dist/function/pipe.js.map +1 -1
- package/dist/function/runAll.cjs +1 -1
- package/dist/function/runAll.cjs.map +1 -1
- package/dist/function/runAll.js +1 -18
- package/dist/function/runAll.js.map +1 -1
- package/dist/function/tap.cjs +1 -1
- package/dist/function/tap.cjs.map +1 -1
- package/dist/function/tap.js +1 -7
- package/dist/function/tap.js.map +1 -1
- package/dist/function/tapper.cjs +2 -0
- package/dist/function/tapper.cjs.map +1 -0
- package/dist/function/tapper.d.ts +27 -0
- package/dist/function/tapper.d.ts.map +1 -0
- package/dist/function/tapper.js +2 -0
- package/dist/function/tapper.js.map +1 -0
- package/dist/function/throttle.cjs +1 -1
- package/dist/function/throttle.cjs.map +1 -1
- package/dist/function/throttle.js +1 -35
- package/dist/function/throttle.js.map +1 -1
- package/dist/guards/combinators.cjs +1 -1
- package/dist/guards/combinators.cjs.map +1 -1
- package/dist/guards/combinators.js +1 -16
- package/dist/guards/combinators.js.map +1 -1
- package/dist/guards/index.cjs +1 -1
- package/dist/guards/index.js +1 -17
- package/dist/guards/isAbortError.cjs +1 -1
- package/dist/guards/isAbortError.cjs.map +1 -1
- package/dist/guards/isAbortError.js +1 -7
- package/dist/guards/isAbortError.js.map +1 -1
- package/dist/guards/isDate.cjs +1 -1
- package/dist/guards/isDate.cjs.map +1 -1
- package/dist/guards/isDate.js +1 -7
- package/dist/guards/isDate.js.map +1 -1
- package/dist/guards/isDefined.cjs +1 -1
- package/dist/guards/isDefined.cjs.map +1 -1
- package/dist/guards/isDefined.js +1 -7
- package/dist/guards/isDefined.js.map +1 -1
- package/dist/guards/isEmpty.cjs +1 -1
- package/dist/guards/isEmpty.cjs.map +1 -1
- package/dist/guards/isEmpty.d.ts.map +1 -1
- package/dist/guards/isEmpty.js +1 -9
- package/dist/guards/isEmpty.js.map +1 -1
- package/dist/guards/isEqual.cjs +1 -1
- package/dist/guards/isEqual.cjs.map +1 -1
- package/dist/guards/isEqual.js +1 -33
- package/dist/guards/isEqual.js.map +1 -1
- package/dist/guards/isError.cjs +1 -1
- package/dist/guards/isError.cjs.map +1 -1
- package/dist/guards/isError.js +1 -7
- package/dist/guards/isError.js.map +1 -1
- package/dist/guards/isFunction.cjs +1 -1
- package/dist/guards/isFunction.cjs.map +1 -1
- package/dist/guards/isFunction.d.ts +1 -1
- package/dist/guards/isFunction.d.ts.map +1 -1
- package/dist/guards/isFunction.js +1 -7
- package/dist/guards/isFunction.js.map +1 -1
- package/dist/guards/isMatch.cjs +1 -1
- package/dist/guards/isMatch.cjs.map +1 -1
- package/dist/guards/isMatch.js +1 -22
- package/dist/guards/isMatch.js.map +1 -1
- package/dist/guards/isNil.cjs +1 -1
- package/dist/guards/isNil.cjs.map +1 -1
- package/dist/guards/isNil.js +1 -7
- package/dist/guards/isNil.js.map +1 -1
- package/dist/guards/isNumber.cjs +1 -1
- package/dist/guards/isNumber.cjs.map +1 -1
- package/dist/guards/isNumber.js +1 -7
- package/dist/guards/isNumber.js.map +1 -1
- package/dist/guards/isPlainObject.cjs +1 -1
- package/dist/guards/isPlainObject.cjs.map +1 -1
- package/dist/guards/isPlainObject.js +1 -9
- package/dist/guards/isPlainObject.js.map +1 -1
- package/dist/guards/isPrimitive.cjs +1 -1
- package/dist/guards/isPrimitive.cjs.map +1 -1
- package/dist/guards/isPrimitive.d.ts +4 -17
- package/dist/guards/isPrimitive.d.ts.map +1 -1
- package/dist/guards/isPrimitive.js +1 -8
- package/dist/guards/isPrimitive.js.map +1 -1
- package/dist/guards/isPromise.cjs +1 -1
- package/dist/guards/isPromise.cjs.map +1 -1
- package/dist/guards/isPromise.js +1 -7
- package/dist/guards/isPromise.js.map +1 -1
- package/dist/guards/isRegex.cjs +1 -1
- package/dist/guards/isRegex.cjs.map +1 -1
- package/dist/guards/isRegex.js +1 -7
- package/dist/guards/isRegex.js.map +1 -1
- package/dist/guards/shallowEqual.cjs +1 -1
- package/dist/guards/shallowEqual.cjs.map +1 -1
- package/dist/guards/shallowEqual.js +1 -19
- package/dist/guards/shallowEqual.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -30
- package/dist/math/allocate.cjs +1 -1
- package/dist/math/allocate.cjs.map +1 -1
- package/dist/math/allocate.js +1 -18
- package/dist/math/allocate.js.map +1 -1
- package/dist/math/average.cjs +1 -1
- package/dist/math/average.cjs.map +1 -1
- package/dist/math/average.d.ts +3 -2
- package/dist/math/average.d.ts.map +1 -1
- package/dist/math/average.js +1 -13
- package/dist/math/average.js.map +1 -1
- package/dist/math/clamp.cjs +1 -1
- package/dist/math/clamp.cjs.map +1 -1
- package/dist/math/clamp.js +1 -7
- package/dist/math/clamp.js.map +1 -1
- package/dist/math/gcd.cjs +1 -1
- package/dist/math/gcd.cjs.map +1 -1
- package/dist/math/gcd.d.ts.map +1 -1
- package/dist/math/gcd.js +1 -12
- package/dist/math/gcd.js.map +1 -1
- package/dist/math/index.cjs +1 -1
- package/dist/math/index.d.ts +0 -1
- package/dist/math/index.d.ts.map +1 -1
- package/dist/math/index.js +1 -17
- package/dist/math/lcm.cjs +1 -1
- package/dist/math/lcm.cjs.map +1 -1
- package/dist/math/lcm.d.ts.map +1 -1
- package/dist/math/lcm.js +1 -8
- package/dist/math/lcm.js.map +1 -1
- package/dist/math/lerp.cjs +1 -1
- package/dist/math/lerp.cjs.map +1 -1
- package/dist/math/lerp.js +1 -7
- package/dist/math/lerp.js.map +1 -1
- package/dist/math/linspace.cjs +1 -1
- package/dist/math/linspace.cjs.map +1 -1
- package/dist/math/linspace.d.ts.map +1 -1
- package/dist/math/linspace.js +1 -10
- package/dist/math/linspace.js.map +1 -1
- package/dist/math/median.cjs +1 -1
- package/dist/math/median.cjs.map +1 -1
- package/dist/math/median.d.ts +1 -1
- package/dist/math/median.d.ts.map +1 -1
- package/dist/math/median.js +1 -11
- package/dist/math/median.js.map +1 -1
- package/dist/math/mod.cjs +1 -1
- package/dist/math/mod.cjs.map +1 -1
- package/dist/math/mod.js +1 -8
- package/dist/math/mod.js.map +1 -1
- package/dist/math/normalize.cjs +1 -1
- package/dist/math/normalize.cjs.map +1 -1
- package/dist/math/normalize.js +1 -8
- package/dist/math/normalize.js.map +1 -1
- package/dist/math/range.cjs +1 -1
- package/dist/math/range.cjs.map +1 -1
- package/dist/math/range.js +1 -25
- package/dist/math/range.js.map +1 -1
- package/dist/math/round.cjs +1 -1
- package/dist/math/round.cjs.map +1 -1
- package/dist/math/round.js +1 -9
- package/dist/math/round.js.map +1 -1
- package/dist/math/standardDeviation.cjs +1 -1
- package/dist/math/standardDeviation.cjs.map +1 -1
- package/dist/math/standardDeviation.d.ts +1 -1
- package/dist/math/standardDeviation.d.ts.map +1 -1
- package/dist/math/standardDeviation.js +1 -8
- package/dist/math/standardDeviation.js.map +1 -1
- package/dist/math/sum.cjs +1 -1
- package/dist/math/sum.cjs.map +1 -1
- package/dist/math/sum.d.ts +1 -1
- package/dist/math/sum.d.ts.map +1 -1
- package/dist/math/sum.js +1 -11
- package/dist/math/sum.js.map +1 -1
- package/dist/math/variance.cjs +1 -1
- package/dist/math/variance.cjs.map +1 -1
- package/dist/math/variance.d.ts +1 -1
- package/dist/math/variance.d.ts.map +1 -1
- package/dist/math/variance.js +1 -10
- package/dist/math/variance.js.map +1 -1
- package/dist/object/defaults.cjs +1 -1
- package/dist/object/defaults.cjs.map +1 -1
- package/dist/object/defaults.js +1 -11
- package/dist/object/defaults.js.map +1 -1
- package/dist/object/diff.cjs +1 -1
- package/dist/object/diff.cjs.map +1 -1
- package/dist/object/diff.d.ts +1 -1
- package/dist/object/diff.d.ts.map +1 -1
- package/dist/object/diff.js +1 -26
- package/dist/object/diff.js.map +1 -1
- package/dist/object/filterValues.cjs +1 -1
- package/dist/object/filterValues.cjs.map +1 -1
- package/dist/object/filterValues.js +1 -10
- package/dist/object/filterValues.js.map +1 -1
- package/dist/object/flattenPaths.cjs +1 -1
- package/dist/object/flattenPaths.cjs.map +1 -1
- package/dist/object/flattenPaths.js +1 -30
- package/dist/object/flattenPaths.js.map +1 -1
- package/dist/object/getPath.cjs +1 -1
- package/dist/object/getPath.cjs.map +1 -1
- package/dist/object/getPath.js +1 -25
- package/dist/object/getPath.js.map +1 -1
- package/dist/object/hash.cjs +1 -1
- package/dist/object/hash.cjs.map +1 -1
- package/dist/object/hash.js +1 -27
- package/dist/object/hash.js.map +1 -1
- package/dist/object/index.js +1 -15
- package/dist/object/invert.cjs +1 -1
- package/dist/object/invert.cjs.map +1 -1
- package/dist/object/invert.js +1 -10
- package/dist/object/invert.js.map +1 -1
- package/dist/object/mapKeys.cjs +1 -1
- package/dist/object/mapKeys.cjs.map +1 -1
- package/dist/object/mapKeys.js +1 -14
- package/dist/object/mapKeys.js.map +1 -1
- package/dist/object/mapValues.cjs +1 -1
- package/dist/object/mapValues.cjs.map +1 -1
- package/dist/object/mapValues.js +1 -10
- package/dist/object/mapValues.js.map +1 -1
- package/dist/object/merge.cjs +1 -1
- package/dist/object/merge.cjs.map +1 -1
- package/dist/object/merge.js +1 -25
- package/dist/object/merge.js.map +1 -1
- package/dist/object/omit.cjs +1 -1
- package/dist/object/omit.cjs.map +1 -1
- package/dist/object/omit.js +1 -10
- package/dist/object/omit.js.map +1 -1
- package/dist/object/pick.cjs +1 -1
- package/dist/object/pick.cjs.map +1 -1
- package/dist/object/pick.js +1 -10
- package/dist/object/pick.js.map +1 -1
- package/dist/object/prune.cjs +1 -1
- package/dist/object/prune.cjs.map +1 -1
- package/dist/object/prune.d.ts.map +1 -1
- package/dist/object/prune.js +1 -34
- package/dist/object/prune.js.map +1 -1
- package/dist/object/tryParseJson.cjs +1 -1
- package/dist/object/tryParseJson.cjs.map +1 -1
- package/dist/object/tryParseJson.js +1 -17
- package/dist/object/tryParseJson.js.map +1 -1
- package/dist/random/_index.cjs +1 -1
- package/dist/random/_index.cjs.map +1 -1
- package/dist/random/_index.d.ts +1 -1
- package/dist/random/_index.d.ts.map +1 -1
- package/dist/random/_index.js +1 -9
- package/dist/random/_index.js.map +1 -1
- package/dist/random/draw.cjs +1 -1
- package/dist/random/draw.cjs.map +1 -1
- package/dist/random/draw.js +1 -20
- package/dist/random/draw.js.map +1 -1
- package/dist/random/index.cjs +1 -1
- package/dist/random/index.d.ts +0 -1
- package/dist/random/index.d.ts.map +1 -1
- package/dist/random/index.js +1 -5
- package/dist/random/random.cjs +1 -1
- package/dist/random/random.cjs.map +1 -1
- package/dist/random/random.js +1 -9
- package/dist/random/random.js.map +1 -1
- package/dist/random/shuffle.cjs +1 -1
- package/dist/random/shuffle.cjs.map +1 -1
- package/dist/random/shuffle.js +1 -13
- package/dist/random/shuffle.js.map +1 -1
- package/dist/random/source.cjs +2 -0
- package/dist/random/source.cjs.map +1 -0
- package/dist/random/source.d.ts +2 -0
- package/dist/random/source.d.ts.map +1 -1
- package/dist/random/source.js +2 -0
- package/dist/random/source.js.map +1 -0
- package/dist/string/_caseUtils.cjs +1 -1
- package/dist/string/_caseUtils.cjs.map +1 -1
- package/dist/string/_caseUtils.js +1 -12
- package/dist/string/_caseUtils.js.map +1 -1
- package/dist/string/camelCase.cjs +1 -1
- package/dist/string/camelCase.cjs.map +1 -1
- package/dist/string/camelCase.js +1 -8
- package/dist/string/camelCase.js.map +1 -1
- package/dist/string/escape.cjs +1 -1
- package/dist/string/escape.cjs.map +1 -1
- package/dist/string/escape.js +1 -14
- package/dist/string/escape.js.map +1 -1
- package/dist/string/index.cjs +1 -1
- package/dist/string/index.d.ts +1 -1
- package/dist/string/index.d.ts.map +1 -1
- package/dist/string/index.js +1 -12
- package/dist/string/kebabCase.cjs +1 -1
- package/dist/string/kebabCase.cjs.map +1 -1
- package/dist/string/kebabCase.js +1 -8
- package/dist/string/kebabCase.js.map +1 -1
- package/dist/string/padCenter.cjs +2 -0
- package/dist/string/padCenter.cjs.map +1 -0
- package/dist/string/padCenter.d.ts +3 -0
- package/dist/string/padCenter.d.ts.map +1 -0
- package/dist/string/padCenter.js +2 -0
- package/dist/string/padCenter.js.map +1 -0
- package/dist/string/pascalCase.cjs +1 -1
- package/dist/string/pascalCase.cjs.map +1 -1
- package/dist/string/pascalCase.js +1 -8
- package/dist/string/pascalCase.js.map +1 -1
- package/dist/string/similarity.cjs +1 -1
- package/dist/string/similarity.cjs.map +1 -1
- package/dist/string/similarity.js +1 -22
- package/dist/string/similarity.js.map +1 -1
- package/dist/string/snakeCase.cjs +1 -1
- package/dist/string/snakeCase.cjs.map +1 -1
- package/dist/string/snakeCase.js +1 -8
- package/dist/string/snakeCase.js.map +1 -1
- package/dist/string/titleCase.cjs +1 -1
- package/dist/string/titleCase.cjs.map +1 -1
- package/dist/string/titleCase.js +1 -8
- package/dist/string/titleCase.js.map +1 -1
- package/dist/string/truncate.cjs +1 -1
- package/dist/string/truncate.cjs.map +1 -1
- package/dist/string/truncate.js +1 -15
- package/dist/string/truncate.js.map +1 -1
- package/dist/string/unescape.cjs +1 -1
- package/dist/string/unescape.cjs.map +1 -1
- package/dist/string/unescape.js +1 -14
- package/dist/string/unescape.js.map +1 -1
- package/dist/string/words.cjs +1 -1
- package/dist/string/words.cjs.map +1 -1
- package/dist/string/words.js +1 -9
- package/dist/string/words.js.map +1 -1
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +16 -8
- package/dist/array/flatten.cjs +0 -2
- package/dist/array/flatten.cjs.map +0 -1
- package/dist/array/flatten.d.ts +0 -5
- package/dist/array/flatten.d.ts.map +0 -1
- package/dist/array/flatten.js +0 -11
- package/dist/array/flatten.js.map +0 -1
- package/dist/math/percent.cjs +0 -2
- package/dist/math/percent.cjs.map +0 -1
- package/dist/math/percent.d.ts +0 -19
- package/dist/math/percent.d.ts.map +0 -1
- package/dist/math/percent.js +0 -8
- package/dist/math/percent.js.map +0 -1
- package/dist/random/uuid.cjs +0 -2
- package/dist/random/uuid.cjs.map +0 -1
- package/dist/random/uuid.d.ts +0 -12
- package/dist/random/uuid.d.ts.map +0 -1
- package/dist/random/uuid.js +0 -8
- package/dist/random/uuid.js.map +0 -1
- package/dist/string/pad.cjs +0 -2
- package/dist/string/pad.cjs.map +0 -1
- package/dist/string/pad.d.ts +0 -5
- package/dist/string/pad.d.ts.map +0 -1
- package/dist/string/pad.js +0 -10
- package/dist/string/pad.js.map +0 -1
package/dist/array/difference.js
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
//#region src/array/difference.ts
|
|
3
|
-
function t(t, n, r) {
|
|
4
|
-
if (!r) {
|
|
5
|
-
let e = new Set(n);
|
|
6
|
-
return t.filter((t) => !e.has(t));
|
|
7
|
-
}
|
|
8
|
-
let i = e(n, r);
|
|
9
|
-
return t.filter((e) => !i.has(r(e)));
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { t as difference };
|
|
13
|
-
|
|
1
|
+
import{toSelectorSet as e}from"../_common/_selectorSet.js";function difference(t,n,r){if(!r){let e=new Set(n);return t.filter(t=>!e.has(t))}let i=e(n,r);return t.filter(e=>!i.has(r(e)))}export{difference};
|
|
14
2
|
//# sourceMappingURL=difference.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"difference.js","names":[],"sources":["../../src/array/difference.ts"],"sourcesContent":["import { toSelectorSet } from '../_common/_selectorSet';\nimport type { Primitive } from '../types';\n\n/**\n * Returns elements that are in source but not in other.\n */\nexport function difference<T>(source: T[], other: T[], selector?: (item: T) => Primitive): T[] {\n if (!selector) {\n const deny = new Set(other);\n\n return source.filter((item) => !deny.has(item));\n }\n\n const deny = toSelectorSet(other, selector);\n\n return source.filter((item) => !deny.has(selector(item)));\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"difference.js","names":[],"sources":["../../src/array/difference.ts"],"sourcesContent":["import { toSelectorSet } from '../_common/_selectorSet';\nimport type { Primitive } from '../types';\n\n/**\n * Returns elements that are in `source` but not in `other`.\n *\n * Allocates a `Set` from `other` for O(1) membership checks, plus a new array for the result.\n */\nexport function difference<T>(source: readonly T[], other: readonly T[], selector?: (item: T) => Primitive): T[] {\n if (!selector) {\n const deny = new Set(other);\n\n return source.filter((item) => !deny.has(item));\n }\n\n const deny = toSelectorSet(other, selector);\n\n return source.filter((item) => !deny.has(selector(item)));\n}\n"],"mappings":"2DAQA,SAAgB,WAAc,EAAsB,EAAqB,EAAwC,CAC/G,GAAI,CAAC,EAAU,CACb,IAAM,EAAO,IAAI,IAAI,CAAK,EAE1B,OAAO,EAAO,OAAQ,GAAS,CAAC,EAAK,IAAI,CAAI,CAAC,CAChD,CAEA,IAAM,EAAO,EAAc,EAAO,CAAQ,EAE1C,OAAO,EAAO,OAAQ,GAAS,CAAC,EAAK,IAAI,EAAS,CAAI,CAAC,CAAC,CAC1D"}
|
package/dist/array/drop.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
function drop(e,t=1){let n=Math.max(0,Math.floor(t));return e.slice(n)}exports.drop=drop;
|
|
2
2
|
//# sourceMappingURL=drop.cjs.map
|
package/dist/array/drop.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drop.cjs","names":[],"sources":["../../src/array/drop.ts"],"sourcesContent":["/**\n * Drops the first n elements from an array.\n */\nexport function drop<T>(array: T[], n = 1): T[] {\n const count = Math.max(0, Math.floor(n));\n\n return array.slice(count);\n}\n"],"mappings":"AAGA,SAAgB,
|
|
1
|
+
{"version":3,"file":"drop.cjs","names":[],"sources":["../../src/array/drop.ts"],"sourcesContent":["/**\n * Drops the first n elements from an array.\n */\nexport function drop<T>(array: readonly T[], n = 1): T[] {\n const count = Math.max(0, Math.floor(n));\n\n return array.slice(count);\n}\n"],"mappings":"AAGA,SAAgB,KAAQ,EAAqB,EAAI,EAAQ,CACvD,IAAM,EAAQ,KAAK,IAAI,EAAG,KAAK,MAAM,CAAC,CAAC,EAEvC,OAAO,EAAM,MAAM,CAAK,CAC1B"}
|
package/dist/array/drop.d.ts
CHANGED
package/dist/array/drop.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drop.d.ts","sourceRoot":"","sources":["../../src/array/drop.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,SAAI,GAAG,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"drop.d.ts","sourceRoot":"","sources":["../../src/array/drop.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,SAAI,GAAG,CAAC,EAAE,CAIvD"}
|
package/dist/array/drop.js
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
function e(e, t = 1) {
|
|
3
|
-
let n = Math.max(0, Math.floor(t));
|
|
4
|
-
return e.slice(n);
|
|
5
|
-
}
|
|
6
|
-
//#endregion
|
|
7
|
-
export { e as drop };
|
|
8
|
-
|
|
1
|
+
function drop(e,t=1){let n=Math.max(0,Math.floor(t));return e.slice(n)}export{drop};
|
|
9
2
|
//# sourceMappingURL=drop.js.map
|
package/dist/array/drop.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drop.js","names":[],"sources":["../../src/array/drop.ts"],"sourcesContent":["/**\n * Drops the first n elements from an array.\n */\nexport function drop<T>(array: T[], n = 1): T[] {\n const count = Math.max(0, Math.floor(n));\n\n return array.slice(count);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drop.js","names":[],"sources":["../../src/array/drop.ts"],"sourcesContent":["/**\n * Drops the first n elements from an array.\n */\nexport function drop<T>(array: readonly T[], n = 1): T[] {\n const count = Math.max(0, Math.floor(n));\n\n return array.slice(count);\n}\n"],"mappings":"AAGA,SAAgB,KAAQ,EAAqB,EAAI,EAAQ,CACvD,IAAM,EAAQ,KAAK,IAAI,EAAG,KAAK,MAAM,CAAC,CAAC,EAEvC,OAAO,EAAM,MAAM,CAAK,CAC1B"}
|
package/dist/array/dropLast.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
function dropLast(e,t=1){let n=Math.max(0,Math.floor(t));return n===0?[...e]:e.slice(0,Math.max(0,e.length-n))}exports.dropLast=dropLast;
|
|
2
2
|
//# sourceMappingURL=dropLast.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropLast.cjs","names":[],"sources":["../../src/array/dropLast.ts"],"sourcesContent":["/**\n * Drops the last n elements from an array.\n */\nexport function dropLast<T>(array: T[], n = 1): T[] {\n const count = Math.max(0, Math.floor(n));\n\n if (count === 0) return [...array];\n\n return array.slice(0, Math.max(0, array.length - count));\n}\n"],"mappings":"AAGA,SAAgB,
|
|
1
|
+
{"version":3,"file":"dropLast.cjs","names":[],"sources":["../../src/array/dropLast.ts"],"sourcesContent":["/**\n * Drops the last n elements from an array.\n */\nexport function dropLast<T>(array: readonly T[], n = 1): T[] {\n const count = Math.max(0, Math.floor(n));\n\n if (count === 0) return [...array];\n\n return array.slice(0, Math.max(0, array.length - count));\n}\n"],"mappings":"AAGA,SAAgB,SAAY,EAAqB,EAAI,EAAQ,CAC3D,IAAM,EAAQ,KAAK,IAAI,EAAG,KAAK,MAAM,CAAC,CAAC,EAIvC,OAFI,IAAU,EAAU,CAAC,GAAG,CAAK,EAE1B,EAAM,MAAM,EAAG,KAAK,IAAI,EAAG,EAAM,OAAS,CAAK,CAAC,CACzD"}
|
package/dist/array/dropLast.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropLast.d.ts","sourceRoot":"","sources":["../../src/array/dropLast.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,SAAI,GAAG,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"dropLast.d.ts","sourceRoot":"","sources":["../../src/array/dropLast.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,SAAI,GAAG,CAAC,EAAE,CAM3D"}
|
package/dist/array/dropLast.js
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
function e(e, t = 1) {
|
|
3
|
-
let n = Math.max(0, Math.floor(t));
|
|
4
|
-
return n === 0 ? [...e] : e.slice(0, Math.max(0, e.length - n));
|
|
5
|
-
}
|
|
6
|
-
//#endregion
|
|
7
|
-
export { e as dropLast };
|
|
8
|
-
|
|
1
|
+
function dropLast(e,t=1){let n=Math.max(0,Math.floor(t));return n===0?[...e]:e.slice(0,Math.max(0,e.length-n))}export{dropLast};
|
|
9
2
|
//# sourceMappingURL=dropLast.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropLast.js","names":[],"sources":["../../src/array/dropLast.ts"],"sourcesContent":["/**\n * Drops the last n elements from an array.\n */\nexport function dropLast<T>(array: T[], n = 1): T[] {\n const count = Math.max(0, Math.floor(n));\n\n if (count === 0) return [...array];\n\n return array.slice(0, Math.max(0, array.length - count));\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dropLast.js","names":[],"sources":["../../src/array/dropLast.ts"],"sourcesContent":["/**\n * Drops the last n elements from an array.\n */\nexport function dropLast<T>(array: readonly T[], n = 1): T[] {\n const count = Math.max(0, Math.floor(n));\n\n if (count === 0) return [...array];\n\n return array.slice(0, Math.max(0, array.length - count));\n}\n"],"mappings":"AAGA,SAAgB,SAAY,EAAqB,EAAI,EAAQ,CAC3D,IAAM,EAAQ,KAAK,IAAI,EAAG,KAAK,MAAM,CAAC,CAAC,EAIvC,OAFI,IAAU,EAAU,CAAC,GAAG,CAAK,EAE1B,EAAM,MAAM,EAAG,KAAK,IAAI,EAAG,EAAM,OAAS,CAAK,CAAC,CACzD"}
|
package/dist/array/filterMap.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
function filterMap(e,t){let n=[];for(let r=0;r<e.length;r++){let i=t(e[r],r,e);i!==void 0&&n.push(i)}return n}exports.filterMap=filterMap;
|
|
2
2
|
//# sourceMappingURL=filterMap.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterMap.cjs","names":[],"sources":["../../src/array/filterMap.ts"],"sourcesContent":["/**\n * Maps and filters in one pass. Returning `undefined` drops an item.\n */\nexport function filterMap<T, R>(array: T[]
|
|
1
|
+
{"version":3,"file":"filterMap.cjs","names":[],"sources":["../../src/array/filterMap.ts"],"sourcesContent":["/**\n * Maps and filters in one pass. Returning `undefined` drops an item.\n *\n * Allocates a new array for the result.\n */\nexport function filterMap<T, R>(\n array: readonly T[],\n callback: (item: T, index: number, array: readonly T[]) => R | undefined,\n): R[] {\n const result: R[] = [];\n\n for (let index = 0; index < array.length; index++) {\n const value = callback(array[index], index, array);\n\n if (value !== undefined) {\n result.push(value);\n }\n }\n\n return result;\n}\n"],"mappings":"AAKA,SAAgB,UACd,EACA,EACK,CACL,IAAM,EAAc,CAAC,EAErB,IAAK,IAAI,EAAQ,EAAG,EAAQ,EAAM,OAAQ,IAAS,CACjD,IAAM,EAAQ,EAAS,EAAM,GAAQ,EAAO,CAAK,EAE7C,IAAU,IAAA,IACZ,EAAO,KAAK,CAAK,CAErB,CAEA,OAAO,CACT"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Maps and filters in one pass. Returning `undefined` drops an item.
|
|
3
|
+
*
|
|
4
|
+
* Allocates a new array for the result.
|
|
3
5
|
*/
|
|
4
|
-
export declare function filterMap<T, R>(array: T[], callback: (item: T, index: number, array: T[]) => R | undefined): R[];
|
|
6
|
+
export declare function filterMap<T, R>(array: readonly T[], callback: (item: T, index: number, array: readonly T[]) => R | undefined): R[];
|
|
5
7
|
//# sourceMappingURL=filterMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterMap.d.ts","sourceRoot":"","sources":["../../src/array/filterMap.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"filterMap.d.ts","sourceRoot":"","sources":["../../src/array/filterMap.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,SAAS,GACvE,CAAC,EAAE,CAYL"}
|
package/dist/array/filterMap.js
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
function e(e, t) {
|
|
3
|
-
let n = [];
|
|
4
|
-
for (let r = 0; r < e.length; r++) {
|
|
5
|
-
let i = t(e[r], r, e);
|
|
6
|
-
i !== void 0 && n.push(i);
|
|
7
|
-
}
|
|
8
|
-
return n;
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
export { e as filterMap };
|
|
12
|
-
|
|
1
|
+
function filterMap(e,t){let n=[];for(let r=0;r<e.length;r++){let i=t(e[r],r,e);i!==void 0&&n.push(i)}return n}export{filterMap};
|
|
13
2
|
//# sourceMappingURL=filterMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterMap.js","names":[],"sources":["../../src/array/filterMap.ts"],"sourcesContent":["/**\n * Maps and filters in one pass. Returning `undefined` drops an item.\n */\nexport function filterMap<T, R>(array: T[]
|
|
1
|
+
{"version":3,"file":"filterMap.js","names":[],"sources":["../../src/array/filterMap.ts"],"sourcesContent":["/**\n * Maps and filters in one pass. Returning `undefined` drops an item.\n *\n * Allocates a new array for the result.\n */\nexport function filterMap<T, R>(\n array: readonly T[],\n callback: (item: T, index: number, array: readonly T[]) => R | undefined,\n): R[] {\n const result: R[] = [];\n\n for (let index = 0; index < array.length; index++) {\n const value = callback(array[index], index, array);\n\n if (value !== undefined) {\n result.push(value);\n }\n }\n\n return result;\n}\n"],"mappings":"AAKA,SAAgB,UACd,EACA,EACK,CACL,IAAM,EAAc,CAAC,EAErB,IAAK,IAAI,EAAQ,EAAG,EAAQ,EAAM,OAAQ,IAAS,CACjD,IAAM,EAAQ,EAAS,EAAM,GAAQ,EAAO,CAAK,EAE7C,IAAU,IAAA,IACZ,EAAO,KAAK,CAAK,CAErB,CAEA,OAAO,CACT"}
|
package/dist/array/first.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
function first(e,t){return e.length>0?e[0]:t}exports.first=first;
|
|
2
2
|
//# sourceMappingURL=first.cjs.map
|
package/dist/array/first.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"first.cjs","names":[],"sources":["../../src/array/first.ts"],"sourcesContent":["/**\n * Returns the first element or fallback when array is empty.\n */\nexport function first<T>(array: T[], fallback?: T): T | undefined {\n return array.length > 0 ? array[0] : fallback;\n}\n"],"mappings":"AAGA,SAAgB,
|
|
1
|
+
{"version":3,"file":"first.cjs","names":[],"sources":["../../src/array/first.ts"],"sourcesContent":["/**\n * Returns the first element or fallback when array is empty.\n */\nexport function first<T>(array: readonly T[], fallback?: T): T | undefined {\n return array.length > 0 ? array[0] : fallback;\n}\n"],"mappings":"AAGA,SAAgB,MAAS,EAAqB,EAA6B,CACzE,OAAO,EAAM,OAAS,EAAI,EAAM,GAAK,CACvC"}
|
package/dist/array/first.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the first element or fallback when array is empty.
|
|
3
3
|
*/
|
|
4
|
-
export declare function first<T>(array: T[], fallback?: T): T | undefined;
|
|
4
|
+
export declare function first<T>(array: readonly T[], fallback?: T): T | undefined;
|
|
5
5
|
//# sourceMappingURL=first.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"first.d.ts","sourceRoot":"","sources":["../../src/array/first.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"first.d.ts","sourceRoot":"","sources":["../../src/array/first.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS,CAEzE"}
|
package/dist/array/first.js
CHANGED
package/dist/array/first.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"first.js","names":[],"sources":["../../src/array/first.ts"],"sourcesContent":["/**\n * Returns the first element or fallback when array is empty.\n */\nexport function first<T>(array: T[], fallback?: T): T | undefined {\n return array.length > 0 ? array[0] : fallback;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"first.js","names":[],"sources":["../../src/array/first.ts"],"sourcesContent":["/**\n * Returns the first element or fallback when array is empty.\n */\nexport function first<T>(array: readonly T[], fallback?: T): T | undefined {\n return array.length > 0 ? array[0] : fallback;\n}\n"],"mappings":"AAGA,SAAgB,MAAS,EAAqB,EAA6B,CACzE,OAAO,EAAM,OAAS,EAAI,EAAM,GAAK,CACvC"}
|
package/dist/array/groupBy.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../_common/unsafePaths.cjs");function
|
|
1
|
+
const e=require("../_common/unsafePaths.cjs");function groupBy(t,n){let r={};for(let i of t){let t=n(i),a=t==null?`_`:String(t);e.isUnsafeKey(a)||(r[a]||(r[a]=[]),r[a].push(i))}return r}exports.groupBy=groupBy;
|
|
2
2
|
//# sourceMappingURL=groupBy.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groupBy.cjs","names":[],"sources":["../../src/array/groupBy.ts"],"sourcesContent":["import { isUnsafeKey } from '../_common/unsafePaths';\nimport type { Primitive } from '../types';\n\n/**\n * Groups elements by a selector function. Dangerous keys (`__proto__`, `constructor`,\n * `prototype`) are skipped.\n */\nexport function groupBy<T>(array: T[], selector: (item: T) => Primitive): Record<string, T[]> {\n const result: Record<string, T[]> = {};\n\n for (const item of array) {\n const rawKey = selector(item);\n const key = rawKey === undefined || rawKey === null ? '_' : String(rawKey);\n\n if (isUnsafeKey(key)) continue;\n\n if (!result[key]) {\n result[key] = [];\n }\n\n result[key].push(item);\n }\n\n return result;\n}\n"],"mappings":"8CAOA,SAAgB,
|
|
1
|
+
{"version":3,"file":"groupBy.cjs","names":[],"sources":["../../src/array/groupBy.ts"],"sourcesContent":["import { isUnsafeKey } from '../_common/unsafePaths';\nimport type { Primitive } from '../types';\n\n/**\n * Groups elements by a selector function. Dangerous keys (`__proto__`, `constructor`,\n * `prototype`) are skipped.\n */\nexport function groupBy<T>(array: readonly T[], selector: (item: T) => Primitive): Record<string, T[]> {\n const result: Record<string, T[]> = {};\n\n for (const item of array) {\n const rawKey = selector(item);\n const key = rawKey === undefined || rawKey === null ? '_' : String(rawKey);\n\n if (isUnsafeKey(key)) continue;\n\n if (!result[key]) {\n result[key] = [];\n }\n\n result[key].push(item);\n }\n\n return result;\n}\n"],"mappings":"8CAOA,SAAgB,QAAW,EAAqB,EAAuD,CACrG,IAAM,EAA8B,CAAC,EAErC,IAAK,IAAM,KAAQ,EAAO,CACxB,IAAM,EAAS,EAAS,CAAI,EACtB,EAAM,GAAmC,KAAO,IAAM,OAAO,CAAM,EAErE,EAAA,YAAY,CAAG,IAEd,EAAO,KACV,EAAO,GAAO,CAAC,GAGjB,EAAO,EAAI,CAAC,KAAK,CAAI,EACvB,CAEA,OAAO,CACT"}
|
package/dist/array/groupBy.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import type { Primitive } from '../types';
|
|
|
3
3
|
* Groups elements by a selector function. Dangerous keys (`__proto__`, `constructor`,
|
|
4
4
|
* `prototype`) are skipped.
|
|
5
5
|
*/
|
|
6
|
-
export declare function groupBy<T>(array: T[], selector: (item: T) => Primitive): Record<string, T[]>;
|
|
6
|
+
export declare function groupBy<T>(array: readonly T[], selector: (item: T) => Primitive): Record<string, T[]>;
|
|
7
7
|
//# sourceMappingURL=groupBy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groupBy.d.ts","sourceRoot":"","sources":["../../src/array/groupBy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"groupBy.d.ts","sourceRoot":"","sources":["../../src/array/groupBy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAiBrG"}
|
package/dist/array/groupBy.js
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
//#region src/array/groupBy.ts
|
|
3
|
-
function t(t, n) {
|
|
4
|
-
let r = {};
|
|
5
|
-
for (let i of t) {
|
|
6
|
-
let t = n(i), a = t == null ? "_" : String(t);
|
|
7
|
-
e(a) || (r[a] || (r[a] = []), r[a].push(i));
|
|
8
|
-
}
|
|
9
|
-
return r;
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { t as groupBy };
|
|
13
|
-
|
|
1
|
+
import{isUnsafeKey as e}from"../_common/unsafePaths.js";function groupBy(t,n){let r={};for(let i of t){let t=n(i),a=t==null?`_`:String(t);e(a)||(r[a]||(r[a]=[]),r[a].push(i))}return r}export{groupBy};
|
|
14
2
|
//# sourceMappingURL=groupBy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groupBy.js","names":[],"sources":["../../src/array/groupBy.ts"],"sourcesContent":["import { isUnsafeKey } from '../_common/unsafePaths';\nimport type { Primitive } from '../types';\n\n/**\n * Groups elements by a selector function. Dangerous keys (`__proto__`, `constructor`,\n * `prototype`) are skipped.\n */\nexport function groupBy<T>(array: T[], selector: (item: T) => Primitive): Record<string, T[]> {\n const result: Record<string, T[]> = {};\n\n for (const item of array) {\n const rawKey = selector(item);\n const key = rawKey === undefined || rawKey === null ? '_' : String(rawKey);\n\n if (isUnsafeKey(key)) continue;\n\n if (!result[key]) {\n result[key] = [];\n }\n\n result[key].push(item);\n }\n\n return result;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"groupBy.js","names":[],"sources":["../../src/array/groupBy.ts"],"sourcesContent":["import { isUnsafeKey } from '../_common/unsafePaths';\nimport type { Primitive } from '../types';\n\n/**\n * Groups elements by a selector function. Dangerous keys (`__proto__`, `constructor`,\n * `prototype`) are skipped.\n */\nexport function groupBy<T>(array: readonly T[], selector: (item: T) => Primitive): Record<string, T[]> {\n const result: Record<string, T[]> = {};\n\n for (const item of array) {\n const rawKey = selector(item);\n const key = rawKey === undefined || rawKey === null ? '_' : String(rawKey);\n\n if (isUnsafeKey(key)) continue;\n\n if (!result[key]) {\n result[key] = [];\n }\n\n result[key].push(item);\n }\n\n return result;\n}\n"],"mappings":"wDAOA,SAAgB,QAAW,EAAqB,EAAuD,CACrG,IAAM,EAA8B,CAAC,EAErC,IAAK,IAAM,KAAQ,EAAO,CACxB,IAAM,EAAS,EAAS,CAAI,EACtB,EAAM,GAAmC,KAAO,IAAM,OAAO,CAAM,EAErE,EAAY,CAAG,IAEd,EAAO,KACV,EAAO,GAAO,CAAC,GAGjB,EAAO,EAAI,CAAC,KAAK,CAAI,EACvB,CAEA,OAAO,CACT"}
|
package/dist/array/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./chunk.cjs"),t=require("./compact.cjs"),n=require("./compare.cjs"),r=require("./compareBy.cjs"),i=require("./contains.cjs"),a=require("./countBy.cjs"),o=require("./difference.cjs"),s=require("./drop.cjs"),c=require("./dropLast.cjs"),l=require("./filterMap.cjs"),u=require("./first.cjs"),d=require("./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./chunk.cjs"),t=require("./compact.cjs"),n=require("./compare.cjs"),r=require("./compareBy.cjs"),i=require("./contains.cjs"),a=require("./countBy.cjs"),o=require("./difference.cjs"),s=require("./drop.cjs"),c=require("./dropLast.cjs"),l=require("./filterMap.cjs"),u=require("./first.cjs"),d=require("./groupBy.cjs"),f=require("./indexBy.cjs"),p=require("./intersection.cjs"),m=require("./last.cjs"),h=require("./partition.cjs"),g=require("./replace.cjs"),_=require("./rotate.cjs"),v=require("./search.cjs"),y=require("./sort.cjs"),b=require("./take.cjs"),x=require("./takeLast.cjs"),S=require("./toggle.cjs"),C=require("./union.cjs"),w=require("./uniq.cjs"),T=require("./unzip.cjs"),E=require("./zip.cjs");exports.chunk=e.chunk,exports.compact=t.compact,exports.compare=n.compare,exports.compareBy=r.compareBy,exports.contains=i.contains,exports.countBy=a.countBy,exports.difference=o.difference,exports.drop=s.drop,exports.dropLast=c.dropLast,exports.filterMap=l.filterMap,exports.first=u.first,exports.fuzzyFilter=v.fuzzyFilter,exports.fuzzyScore=v.fuzzyScore,exports.groupBy=d.groupBy,exports.indexBy=f.indexBy,exports.intersection=p.intersection,exports.last=m.last,exports.partition=h.partition,exports.replace=g.replace,exports.rotate=_.rotate,exports.sort=y.sort,exports.take=b.take,exports.takeLast=x.takeLast,exports.toggle=S.toggle,exports.union=C.union,exports.uniq=w.uniq,exports.unzip=T.unzip,exports.zip=E.zip;
|
package/dist/array/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/array/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/array/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
|
package/dist/array/index.js
CHANGED
|
@@ -1,29 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { compact as t } from "./compact.js";
|
|
3
|
-
import { compare as n } from "./compare.js";
|
|
4
|
-
import { compareBy as r } from "./compareBy.js";
|
|
5
|
-
import { contains as i } from "./contains.js";
|
|
6
|
-
import { countBy as a } from "./countBy.js";
|
|
7
|
-
import { difference as o } from "./difference.js";
|
|
8
|
-
import { drop as s } from "./drop.js";
|
|
9
|
-
import { dropLast as c } from "./dropLast.js";
|
|
10
|
-
import { filterMap as l } from "./filterMap.js";
|
|
11
|
-
import { first as u } from "./first.js";
|
|
12
|
-
import { flatten as d } from "./flatten.js";
|
|
13
|
-
import { groupBy as f } from "./groupBy.js";
|
|
14
|
-
import { indexBy as p } from "./indexBy.js";
|
|
15
|
-
import { intersection as m } from "./intersection.js";
|
|
16
|
-
import { last as h } from "./last.js";
|
|
17
|
-
import { partition as g } from "./partition.js";
|
|
18
|
-
import { replace as _ } from "./replace.js";
|
|
19
|
-
import { rotate as v } from "./rotate.js";
|
|
20
|
-
import { fuzzyFilter as y, fuzzyScore as b } from "./search.js";
|
|
21
|
-
import { sort as x } from "./sort.js";
|
|
22
|
-
import { take as S } from "./take.js";
|
|
23
|
-
import { takeLast as C } from "./takeLast.js";
|
|
24
|
-
import { toggle as w } from "./toggle.js";
|
|
25
|
-
import { union as T } from "./union.js";
|
|
26
|
-
import { uniq as E } from "./uniq.js";
|
|
27
|
-
import { unzip as D } from "./unzip.js";
|
|
28
|
-
import { zip as O } from "./zip.js";
|
|
29
|
-
export { e as chunk, t as compact, n as compare, r as compareBy, i as contains, a as countBy, o as difference, s as drop, c as dropLast, l as filterMap, u as first, d as flatten, y as fuzzyFilter, b as fuzzyScore, f as groupBy, p as indexBy, m as intersection, h as last, g as partition, _ as replace, v as rotate, x as sort, S as take, C as takeLast, w as toggle, T as union, E as uniq, D as unzip, O as zip };
|
|
1
|
+
import{chunk as e}from"./chunk.js";import{compact as t}from"./compact.js";import{compare as n}from"./compare.js";import{compareBy as r}from"./compareBy.js";import{contains as i}from"./contains.js";import{countBy as a}from"./countBy.js";import{difference as o}from"./difference.js";import{drop as s}from"./drop.js";import{dropLast as c}from"./dropLast.js";import{filterMap as l}from"./filterMap.js";import{first as u}from"./first.js";import{groupBy as d}from"./groupBy.js";import{indexBy as f}from"./indexBy.js";import{intersection as p}from"./intersection.js";import{last as m}from"./last.js";import{partition as h}from"./partition.js";import{replace as g}from"./replace.js";import{rotate as _}from"./rotate.js";import{fuzzyFilter as v,fuzzyScore as y}from"./search.js";import{sort as b}from"./sort.js";import{take as x}from"./take.js";import{takeLast as S}from"./takeLast.js";import{toggle as C}from"./toggle.js";import{union as w}from"./union.js";import{uniq as T}from"./uniq.js";import{unzip as E}from"./unzip.js";import{zip as D}from"./zip.js";export{e as chunk,t as compact,n as compare,r as compareBy,i as contains,a as countBy,o as difference,s as drop,c as dropLast,l as filterMap,u as first,v as fuzzyFilter,y as fuzzyScore,d as groupBy,f as indexBy,p as intersection,m as last,h as partition,g as replace,_ as rotate,b as sort,x as take,S as takeLast,C as toggle,w as union,T as uniq,E as unzip,D as zip};
|
package/dist/array/indexBy.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../_common/unsafePaths.cjs");function
|
|
1
|
+
const e=require("../_common/unsafePaths.cjs");function indexBy(t,n){let r={};for(let i of t){let t=String(n(i));e.isUnsafeKey(t)||(r[t]=i)}return r}exports.indexBy=indexBy;
|
|
2
2
|
//# sourceMappingURL=indexBy.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexBy.cjs","names":[],"sources":["../../src/array/indexBy.ts"],"sourcesContent":["import { isUnsafeKey } from '../_common/unsafePaths';\nimport type { Primitive } from '../types';\n\n/**\n * Creates an object keyed by selector result. Last item wins on collisions. Dangerous keys\n * (`__proto__`, `constructor`, `prototype`) are skipped.\n */\nexport function indexBy<T>(array: T[], selector: (item: T) => Primitive): Record<string, T> {\n const result: Record<string, T> = {};\n\n for (const item of array) {\n const key = String(selector(item));\n\n if (isUnsafeKey(key)) continue;\n\n result[key] = item;\n }\n\n return result;\n}\n"],"mappings":"8CAOA,SAAgB,
|
|
1
|
+
{"version":3,"file":"indexBy.cjs","names":[],"sources":["../../src/array/indexBy.ts"],"sourcesContent":["import { isUnsafeKey } from '../_common/unsafePaths';\nimport type { Primitive } from '../types';\n\n/**\n * Creates an object keyed by selector result. Last item wins on collisions. Dangerous keys\n * (`__proto__`, `constructor`, `prototype`) are skipped.\n */\nexport function indexBy<T>(array: readonly T[], selector: (item: T) => Primitive): Record<string, T> {\n const result: Record<string, T> = {};\n\n for (const item of array) {\n const key = String(selector(item));\n\n if (isUnsafeKey(key)) continue;\n\n result[key] = item;\n }\n\n return result;\n}\n"],"mappings":"8CAOA,SAAgB,QAAW,EAAqB,EAAqD,CACnG,IAAM,EAA4B,CAAC,EAEnC,IAAK,IAAM,KAAQ,EAAO,CACxB,IAAM,EAAM,OAAO,EAAS,CAAI,CAAC,EAE7B,EAAA,YAAY,CAAG,IAEnB,EAAO,GAAO,EAChB,CAEA,OAAO,CACT"}
|
package/dist/array/indexBy.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import type { Primitive } from '../types';
|
|
|
3
3
|
* Creates an object keyed by selector result. Last item wins on collisions. Dangerous keys
|
|
4
4
|
* (`__proto__`, `constructor`, `prototype`) are skipped.
|
|
5
5
|
*/
|
|
6
|
-
export declare function indexBy<T>(array: T[], selector: (item: T) => Primitive): Record<string, T>;
|
|
6
|
+
export declare function indexBy<T>(array: readonly T[], selector: (item: T) => Primitive): Record<string, T>;
|
|
7
7
|
//# sourceMappingURL=indexBy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexBy.d.ts","sourceRoot":"","sources":["../../src/array/indexBy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"indexBy.d.ts","sourceRoot":"","sources":["../../src/array/indexBy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAYnG"}
|
package/dist/array/indexBy.js
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
//#region src/array/indexBy.ts
|
|
3
|
-
function t(t, n) {
|
|
4
|
-
let r = {};
|
|
5
|
-
for (let i of t) {
|
|
6
|
-
let t = String(n(i));
|
|
7
|
-
e(t) || (r[t] = i);
|
|
8
|
-
}
|
|
9
|
-
return r;
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { t as indexBy };
|
|
13
|
-
|
|
1
|
+
import{isUnsafeKey as e}from"../_common/unsafePaths.js";function indexBy(t,n){let r={};for(let i of t){let t=String(n(i));e(t)||(r[t]=i)}return r}export{indexBy};
|
|
14
2
|
//# sourceMappingURL=indexBy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexBy.js","names":[],"sources":["../../src/array/indexBy.ts"],"sourcesContent":["import { isUnsafeKey } from '../_common/unsafePaths';\nimport type { Primitive } from '../types';\n\n/**\n * Creates an object keyed by selector result. Last item wins on collisions. Dangerous keys\n * (`__proto__`, `constructor`, `prototype`) are skipped.\n */\nexport function indexBy<T>(array: T[], selector: (item: T) => Primitive): Record<string, T> {\n const result: Record<string, T> = {};\n\n for (const item of array) {\n const key = String(selector(item));\n\n if (isUnsafeKey(key)) continue;\n\n result[key] = item;\n }\n\n return result;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"indexBy.js","names":[],"sources":["../../src/array/indexBy.ts"],"sourcesContent":["import { isUnsafeKey } from '../_common/unsafePaths';\nimport type { Primitive } from '../types';\n\n/**\n * Creates an object keyed by selector result. Last item wins on collisions. Dangerous keys\n * (`__proto__`, `constructor`, `prototype`) are skipped.\n */\nexport function indexBy<T>(array: readonly T[], selector: (item: T) => Primitive): Record<string, T> {\n const result: Record<string, T> = {};\n\n for (const item of array) {\n const key = String(selector(item));\n\n if (isUnsafeKey(key)) continue;\n\n result[key] = item;\n }\n\n return result;\n}\n"],"mappings":"wDAOA,SAAgB,QAAW,EAAqB,EAAqD,CACnG,IAAM,EAA4B,CAAC,EAEnC,IAAK,IAAM,KAAQ,EAAO,CACxB,IAAM,EAAM,OAAO,EAAS,CAAI,CAAC,EAE7B,EAAY,CAAG,IAEnB,EAAO,GAAO,EAChB,CAEA,OAAO,CACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../_common/_selectorSet.cjs");function
|
|
1
|
+
const e=require("../_common/_selectorSet.cjs");function intersection(t,n,r){if(!r){let e=new Set(n);return t.filter(t=>e.has(t))}let i=e.toSelectorSet(n,r);return t.filter(e=>i.has(r(e)))}exports.intersection=intersection;
|
|
2
2
|
//# sourceMappingURL=intersection.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intersection.cjs","names":[],"sources":["../../src/array/intersection.ts"],"sourcesContent":["import { toSelectorSet } from '../_common/_selectorSet';\nimport type { Primitive } from '../types';\n\n/**\n * Returns elements that are present in both
|
|
1
|
+
{"version":3,"file":"intersection.cjs","names":[],"sources":["../../src/array/intersection.ts"],"sourcesContent":["import { toSelectorSet } from '../_common/_selectorSet';\nimport type { Primitive } from '../types';\n\n/**\n * Returns elements that are present in both `source` and `other`.\n *\n * Allocates a `Set` from `other` for O(1) membership checks, plus a new array for the result.\n */\nexport function intersection<T>(source: readonly T[], other: readonly T[], selector?: (item: T) => Primitive): T[] {\n if (!selector) {\n const allow = new Set(other);\n\n return source.filter((item) => allow.has(item));\n }\n\n const allow = toSelectorSet(other, selector);\n\n return source.filter((item) => allow.has(selector(item)));\n}\n"],"mappings":"+CAQA,SAAgB,aAAgB,EAAsB,EAAqB,EAAwC,CACjH,GAAI,CAAC,EAAU,CACb,IAAM,EAAQ,IAAI,IAAI,CAAK,EAE3B,OAAO,EAAO,OAAQ,GAAS,EAAM,IAAI,CAAI,CAAC,CAChD,CAEA,IAAM,EAAQ,EAAA,cAAc,EAAO,CAAQ,EAE3C,OAAO,EAAO,OAAQ,GAAS,EAAM,IAAI,EAAS,CAAI,CAAC,CAAC,CAC1D"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Primitive } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
* Returns elements that are present in both
|
|
3
|
+
* Returns elements that are present in both `source` and `other`.
|
|
4
|
+
*
|
|
5
|
+
* Allocates a `Set` from `other` for O(1) membership checks, plus a new array for the result.
|
|
4
6
|
*/
|
|
5
|
-
export declare function intersection<T>(source: T[], other: T[], selector?: (item: T) => Primitive): T[];
|
|
7
|
+
export declare function intersection<T>(source: readonly T[], other: readonly T[], selector?: (item: T) => Primitive): T[];
|
|
6
8
|
//# sourceMappingURL=intersection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intersection.d.ts","sourceRoot":"","sources":["../../src/array/intersection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C
|
|
1
|
+
{"version":3,"file":"intersection.d.ts","sourceRoot":"","sources":["../../src/array/intersection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,GAAG,CAAC,EAAE,CAUjH"}
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
//#region src/array/intersection.ts
|
|
3
|
-
function t(t, n, r) {
|
|
4
|
-
if (!r) {
|
|
5
|
-
let e = new Set(n);
|
|
6
|
-
return t.filter((t) => e.has(t));
|
|
7
|
-
}
|
|
8
|
-
let i = e(n, r);
|
|
9
|
-
return t.filter((e) => i.has(r(e)));
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { t as intersection };
|
|
13
|
-
|
|
1
|
+
import{toSelectorSet as e}from"../_common/_selectorSet.js";function intersection(t,n,r){if(!r){let e=new Set(n);return t.filter(t=>e.has(t))}let i=e(n,r);return t.filter(e=>i.has(r(e)))}export{intersection};
|
|
14
2
|
//# sourceMappingURL=intersection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intersection.js","names":[],"sources":["../../src/array/intersection.ts"],"sourcesContent":["import { toSelectorSet } from '../_common/_selectorSet';\nimport type { Primitive } from '../types';\n\n/**\n * Returns elements that are present in both
|
|
1
|
+
{"version":3,"file":"intersection.js","names":[],"sources":["../../src/array/intersection.ts"],"sourcesContent":["import { toSelectorSet } from '../_common/_selectorSet';\nimport type { Primitive } from '../types';\n\n/**\n * Returns elements that are present in both `source` and `other`.\n *\n * Allocates a `Set` from `other` for O(1) membership checks, plus a new array for the result.\n */\nexport function intersection<T>(source: readonly T[], other: readonly T[], selector?: (item: T) => Primitive): T[] {\n if (!selector) {\n const allow = new Set(other);\n\n return source.filter((item) => allow.has(item));\n }\n\n const allow = toSelectorSet(other, selector);\n\n return source.filter((item) => allow.has(selector(item)));\n}\n"],"mappings":"2DAQA,SAAgB,aAAgB,EAAsB,EAAqB,EAAwC,CACjH,GAAI,CAAC,EAAU,CACb,IAAM,EAAQ,IAAI,IAAI,CAAK,EAE3B,OAAO,EAAO,OAAQ,GAAS,EAAM,IAAI,CAAI,CAAC,CAChD,CAEA,IAAM,EAAQ,EAAc,EAAO,CAAQ,EAE3C,OAAO,EAAO,OAAQ,GAAS,EAAM,IAAI,EAAS,CAAI,CAAC,CAAC,CAC1D"}
|
package/dist/array/last.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
function last(e,t){return e.length>0?e[e.length-1]:t}exports.last=last;
|
|
2
2
|
//# sourceMappingURL=last.cjs.map
|
package/dist/array/last.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"last.cjs","names":[],"sources":["../../src/array/last.ts"],"sourcesContent":["/**\n * Returns the last element or fallback when array is empty.\n */\nexport function last<T>(array: T[], fallback?: T): T | undefined {\n return array.length > 0 ? array[array.length - 1] : fallback;\n}\n"],"mappings":"AAGA,SAAgB,
|
|
1
|
+
{"version":3,"file":"last.cjs","names":[],"sources":["../../src/array/last.ts"],"sourcesContent":["/**\n * Returns the last element or fallback when array is empty.\n */\nexport function last<T>(array: readonly T[], fallback?: T): T | undefined {\n return array.length > 0 ? array[array.length - 1] : fallback;\n}\n"],"mappings":"AAGA,SAAgB,KAAQ,EAAqB,EAA6B,CACxE,OAAO,EAAM,OAAS,EAAI,EAAM,EAAM,OAAS,GAAK,CACtD"}
|
package/dist/array/last.d.ts
CHANGED
package/dist/array/last.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"last.d.ts","sourceRoot":"","sources":["../../src/array/last.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"last.d.ts","sourceRoot":"","sources":["../../src/array/last.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS,CAExE"}
|
package/dist/array/last.js
CHANGED
package/dist/array/last.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"last.js","names":[],"sources":["../../src/array/last.ts"],"sourcesContent":["/**\n * Returns the last element or fallback when array is empty.\n */\nexport function last<T>(array: T[], fallback?: T): T | undefined {\n return array.length > 0 ? array[array.length - 1] : fallback;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"last.js","names":[],"sources":["../../src/array/last.ts"],"sourcesContent":["/**\n * Returns the last element or fallback when array is empty.\n */\nexport function last<T>(array: readonly T[], fallback?: T): T | undefined {\n return array.length > 0 ? array[array.length - 1] : fallback;\n}\n"],"mappings":"AAGA,SAAgB,KAAQ,EAAqB,EAA6B,CACxE,OAAO,EAAM,OAAS,EAAI,EAAM,EAAM,OAAS,GAAK,CACtD"}
|
package/dist/array/partition.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
function partition(e,t){let n=[],r=[];for(let i=0;i<e.length;i++)t(e[i],i,e)?n.push(e[i]):r.push(e[i]);return[n,r]}exports.partition=partition;
|
|
2
2
|
//# sourceMappingURL=partition.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partition.cjs","names":[],"sources":["../../src/array/partition.ts"],"sourcesContent":["/**\n * Splits an array into values that match and do not match the predicate.\n */\nexport function partition<T>(array: T[]
|
|
1
|
+
{"version":3,"file":"partition.cjs","names":[],"sources":["../../src/array/partition.ts"],"sourcesContent":["/**\n * Splits an array into values that match and do not match the predicate.\n *\n * Allocates two new arrays for the accepted and rejected partitions.\n */\nexport function partition<T>(\n array: readonly T[],\n predicate: (item: T, index: number, array: readonly T[]) => boolean,\n): [T[], T[]] {\n const accepted: T[] = [];\n const rejected: T[] = [];\n\n for (let index = 0; index < array.length; index++) {\n if (predicate(array[index], index, array)) {\n accepted.push(array[index]);\n } else {\n rejected.push(array[index]);\n }\n }\n\n return [accepted, rejected];\n}\n"],"mappings":"AAKA,SAAgB,UACd,EACA,EACY,CACZ,IAAM,EAAgB,CAAC,EACjB,EAAgB,CAAC,EAEvB,IAAK,IAAI,EAAQ,EAAG,EAAQ,EAAM,OAAQ,IACpC,EAAU,EAAM,GAAQ,EAAO,CAAK,EACtC,EAAS,KAAK,EAAM,EAAM,EAE1B,EAAS,KAAK,EAAM,EAAM,EAI9B,MAAO,CAAC,EAAU,CAAQ,CAC5B"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Splits an array into values that match and do not match the predicate.
|
|
3
|
+
*
|
|
4
|
+
* Allocates two new arrays for the accepted and rejected partitions.
|
|
3
5
|
*/
|
|
4
|
-
export declare function partition<T>(array: T[], predicate: (item: T, index: number, array: T[]) => boolean): [T[], T[]];
|
|
6
|
+
export declare function partition<T>(array: readonly T[], predicate: (item: T, index: number, array: readonly T[]) => boolean): [T[], T[]];
|
|
5
7
|
//# sourceMappingURL=partition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partition.d.ts","sourceRoot":"","sources":["../../src/array/partition.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"partition.d.ts","sourceRoot":"","sources":["../../src/array/partition.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,KAAK,OAAO,GAClE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAaZ"}
|
package/dist/array/partition.js
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
function e(e, t) {
|
|
3
|
-
let n = [], r = [];
|
|
4
|
-
for (let i = 0; i < e.length; i++) t(e[i], i, e) ? n.push(e[i]) : r.push(e[i]);
|
|
5
|
-
return [n, r];
|
|
6
|
-
}
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as partition };
|
|
9
|
-
|
|
1
|
+
function partition(e,t){let n=[],r=[];for(let i=0;i<e.length;i++)t(e[i],i,e)?n.push(e[i]):r.push(e[i]);return[n,r]}export{partition};
|
|
10
2
|
//# sourceMappingURL=partition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partition.js","names":[],"sources":["../../src/array/partition.ts"],"sourcesContent":["/**\n * Splits an array into values that match and do not match the predicate.\n */\nexport function partition<T>(array: T[]
|
|
1
|
+
{"version":3,"file":"partition.js","names":[],"sources":["../../src/array/partition.ts"],"sourcesContent":["/**\n * Splits an array into values that match and do not match the predicate.\n *\n * Allocates two new arrays for the accepted and rejected partitions.\n */\nexport function partition<T>(\n array: readonly T[],\n predicate: (item: T, index: number, array: readonly T[]) => boolean,\n): [T[], T[]] {\n const accepted: T[] = [];\n const rejected: T[] = [];\n\n for (let index = 0; index < array.length; index++) {\n if (predicate(array[index], index, array)) {\n accepted.push(array[index]);\n } else {\n rejected.push(array[index]);\n }\n }\n\n return [accepted, rejected];\n}\n"],"mappings":"AAKA,SAAgB,UACd,EACA,EACY,CACZ,IAAM,EAAgB,CAAC,EACjB,EAAgB,CAAC,EAEvB,IAAK,IAAI,EAAQ,EAAG,EAAQ,EAAM,OAAQ,IACpC,EAAU,EAAM,GAAQ,EAAO,CAAK,EACtC,EAAS,KAAK,EAAM,EAAM,EAE1B,EAAS,KAAK,EAAM,EAAM,EAI9B,MAAO,CAAC,EAAU,CAAQ,CAC5B"}
|
package/dist/array/replace.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
function replace(e,t,n){let r=e.findIndex(t);return r===-1?e:[...e.slice(0,r),n,...e.slice(r+1)]}exports.replace=replace;
|
|
2
2
|
//# sourceMappingURL=replace.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replace.cjs","names":[],"sources":["../../src/array/replace.ts"],"sourcesContent":["import type { Predicate } from '../types';\n\n
|
|
1
|
+
{"version":3,"file":"replace.cjs","names":[],"sources":["../../src/array/replace.ts"],"sourcesContent":["import type { Predicate } from '../types';\n\n/** Replaces the first matching item without mutating the input. */\nexport function replace<T>(array: T[], predicate: Predicate<T>, value: T): T[];\nexport function replace<T>(array: readonly T[], predicate: Predicate<T>, value: T): readonly T[];\nexport function replace<T>(array: readonly T[], predicate: Predicate<T>, value: T): readonly T[] {\n const index = array.findIndex(predicate);\n\n if (index === -1) return array;\n\n return [...array.slice(0, index), value, ...array.slice(index + 1)];\n}\n"],"mappings":"AAKA,SAAgB,QAAW,EAAqB,EAAyB,EAAwB,CAC/F,IAAM,EAAQ,EAAM,UAAU,CAAS,EAIvC,OAFI,IAAU,GAAW,EAElB,CAAC,GAAG,EAAM,MAAM,EAAG,CAAK,EAAG,EAAO,GAAG,EAAM,MAAM,EAAQ,CAAC,CAAC,CACpE"}
|
package/dist/array/replace.d.ts
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import type { Predicate } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Replaces the first element in an array that satisfies the provided predicate
|
|
4
|
-
* function with a new value.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```ts
|
|
8
|
-
* replace([1, 2, 3], (n) => n === 2, 4) // [1, 4, 3]
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* @param array - The array to search.
|
|
12
|
-
* @param predicate - A function to test each element of the array.
|
|
13
|
-
* @param value - The new value to replace the found element.
|
|
14
|
-
*
|
|
15
|
-
* @return A new array with the replaced value.
|
|
16
|
-
*/
|
|
2
|
+
/** Replaces the first matching item without mutating the input. */
|
|
17
3
|
export declare function replace<T>(array: T[], predicate: Predicate<T>, value: T): T[];
|
|
4
|
+
export declare function replace<T>(array: readonly T[], predicate: Predicate<T>, value: T): readonly T[];
|
|
18
5
|
//# sourceMappingURL=replace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replace.d.ts","sourceRoot":"","sources":["../../src/array/replace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C
|
|
1
|
+
{"version":3,"file":"replace.d.ts","sourceRoot":"","sources":["../../src/array/replace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,mEAAmE;AACnE,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;AAC/E,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC"}
|