@vinicunca/perkakas 1.13.2 → 1.15.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/dist/add-prop.cjs +2 -1
- package/dist/add-prop.cjs.map +1 -0
- package/dist/add-prop.js +1 -1
- package/dist/add-prop.js.map +1 -1
- package/dist/add.cjs +2 -1
- package/dist/add.cjs.map +1 -0
- package/dist/add.js +1 -1
- package/dist/add.js.map +1 -1
- package/dist/all-pass.cjs +2 -1
- package/dist/all-pass.cjs.map +1 -0
- package/dist/all-pass.js +1 -1
- package/dist/all-pass.js.map +1 -1
- package/dist/any-pass.cjs +2 -1
- package/dist/any-pass.cjs.map +1 -0
- package/dist/any-pass.js +1 -1
- package/dist/any-pass.js.map +1 -1
- package/dist/binary-search-cutoff-index-CLFtXYPc.cjs +2 -0
- package/dist/binary-search-cutoff-index-CLFtXYPc.cjs.map +1 -0
- package/dist/binary-search-cutoff-index-TJlnoie4.js +2 -0
- package/dist/binary-search-cutoff-index-TJlnoie4.js.map +1 -0
- package/dist/capitalize.cjs +2 -1
- package/dist/capitalize.cjs.map +1 -0
- package/dist/capitalize.js +1 -1
- package/dist/capitalize.js.map +1 -1
- package/dist/ceil.cjs +2 -1
- package/dist/ceil.cjs.map +1 -0
- package/dist/ceil.js +1 -1
- package/dist/ceil.js.map +1 -1
- package/dist/chunk.cjs +2 -1
- package/dist/chunk.cjs.map +1 -0
- package/dist/chunk.js +1 -1
- package/dist/chunk.js.map +1 -1
- package/dist/clamp.cjs +2 -1
- package/dist/clamp.cjs.map +1 -0
- package/dist/clamp.js +1 -1
- package/dist/clamp.js.map +1 -1
- package/dist/clone.cjs +2 -1
- package/dist/clone.cjs.map +1 -0
- package/dist/clone.js +1 -1
- package/dist/clone.js.map +1 -1
- package/dist/concat.cjs +2 -1
- package/dist/concat.cjs.map +1 -0
- package/dist/concat.js +1 -1
- package/dist/concat.js.map +1 -1
- package/dist/conditional-3wcaMG9k.cjs +2 -0
- package/dist/conditional-3wcaMG9k.cjs.map +1 -0
- package/dist/conditional-CTEJD5TX.js +2 -0
- package/dist/conditional-CTEJD5TX.js.map +1 -0
- package/dist/conditional.cjs +1 -1
- package/dist/conditional.js +1 -1
- package/dist/constant.cjs +2 -1
- package/dist/constant.cjs.map +1 -0
- package/dist/constant.js.map +1 -1
- package/dist/count-by.cjs +2 -1
- package/dist/count-by.cjs.map +1 -0
- package/dist/count-by.js +1 -1
- package/dist/count-by.js.map +1 -1
- package/dist/curry-from-lazy-BvN_VKlH.cjs +2 -0
- package/dist/curry-from-lazy-BvN_VKlH.cjs.map +1 -0
- package/dist/curry-from-lazy-CtH1dp14.js +2 -0
- package/dist/curry-from-lazy-CtH1dp14.js.map +1 -0
- package/dist/curry-order-rules-BLyCSMdZ.js +2 -0
- package/dist/curry-order-rules-BLyCSMdZ.js.map +1 -0
- package/dist/curry-order-rules-DsJSy3gX.cjs +2 -0
- package/dist/curry-order-rules-DsJSy3gX.cjs.map +1 -0
- package/dist/curry.cjs +2 -1
- package/dist/curry.cjs.map +1 -0
- package/dist/curry.js +2 -1
- package/dist/curry.js.map +1 -0
- package/dist/debounce.cjs +2 -1
- package/dist/debounce.cjs.map +1 -0
- package/dist/debounce.js +1 -1
- package/dist/debounce.js.map +1 -1
- package/dist/default-to.cjs +2 -0
- package/dist/default-to.cjs.map +1 -0
- package/dist/default-to.js +2 -0
- package/dist/default-to.js.map +1 -0
- package/dist/difference-with.cjs +2 -1
- package/dist/difference-with.cjs.map +1 -0
- package/dist/difference-with.js +1 -1
- package/dist/difference-with.js.map +1 -1
- package/dist/difference.cjs +2 -1
- package/dist/difference.cjs.map +1 -0
- package/dist/difference.js +1 -1
- package/dist/difference.js.map +1 -1
- package/dist/divide.cjs +2 -1
- package/dist/divide.cjs.map +1 -0
- package/dist/divide.js +1 -1
- package/dist/divide.js.map +1 -1
- package/dist/do-nothing.cjs +2 -1
- package/dist/do-nothing.cjs.map +1 -0
- package/dist/do-nothing.js.map +1 -1
- package/dist/drop-first-by.cjs +2 -1
- package/dist/drop-first-by.cjs.map +1 -0
- package/dist/drop-first-by.js +1 -1
- package/dist/drop-first-by.js.map +1 -1
- package/dist/drop-last-while.cjs +2 -1
- package/dist/drop-last-while.cjs.map +1 -0
- package/dist/drop-last-while.js +1 -1
- package/dist/drop-last-while.js.map +1 -1
- package/dist/drop-last.cjs +2 -1
- package/dist/drop-last.cjs.map +1 -0
- package/dist/drop-last.js +1 -1
- package/dist/drop-last.js.map +1 -1
- package/dist/drop-while.cjs +2 -1
- package/dist/drop-while.cjs.map +1 -0
- package/dist/drop-while.js +1 -1
- package/dist/drop-while.js.map +1 -1
- package/dist/drop.cjs +2 -1
- package/dist/drop.cjs.map +1 -0
- package/dist/drop.js +1 -1
- package/dist/drop.js.map +1 -1
- package/dist/ends-with.cjs +2 -0
- package/dist/ends-with.cjs.map +1 -0
- package/dist/ends-with.js +2 -0
- package/dist/ends-with.js.map +1 -0
- package/dist/entries.cjs +2 -1
- package/dist/entries.cjs.map +1 -0
- package/dist/entries.js +1 -1
- package/dist/entries.js.map +1 -1
- package/dist/evolve.cjs +2 -1
- package/dist/evolve.cjs.map +1 -0
- package/dist/evolve.js +1 -1
- package/dist/evolve.js.map +1 -1
- package/dist/filter.cjs +2 -1
- package/dist/filter.cjs.map +1 -0
- package/dist/filter.js +1 -1
- package/dist/filter.js.map +1 -1
- package/dist/find-index.cjs +2 -1
- package/dist/find-index.cjs.map +1 -0
- package/dist/find-index.js +1 -1
- package/dist/find-index.js.map +1 -1
- package/dist/find-last-index.cjs +2 -1
- package/dist/find-last-index.cjs.map +1 -0
- package/dist/find-last-index.js +1 -1
- package/dist/find-last-index.js.map +1 -1
- package/dist/find-last.cjs +2 -1
- package/dist/find-last.cjs.map +1 -0
- package/dist/find-last.js +1 -1
- package/dist/find-last.js.map +1 -1
- package/dist/find.cjs +2 -1
- package/dist/find.cjs.map +1 -0
- package/dist/find.js +1 -1
- package/dist/find.js.map +1 -1
- package/dist/first-by.cjs +2 -1
- package/dist/first-by.cjs.map +1 -0
- package/dist/first-by.js +1 -1
- package/dist/first-by.js.map +1 -1
- package/dist/first.cjs +2 -1
- package/dist/first.cjs.map +1 -0
- package/dist/first.js +1 -1
- package/dist/first.js.map +1 -1
- package/dist/flat-map.cjs +2 -1
- package/dist/flat-map.cjs.map +1 -0
- package/dist/flat-map.js +1 -1
- package/dist/flat-map.js.map +1 -1
- package/dist/flat.cjs +2 -1
- package/dist/flat.cjs.map +1 -0
- package/dist/flat.js +1 -1
- package/dist/flat.js.map +1 -1
- package/dist/floor.cjs +2 -1
- package/dist/floor.cjs.map +1 -0
- package/dist/floor.js +1 -1
- package/dist/floor.js.map +1 -1
- package/dist/for-each-obj.cjs +2 -1
- package/dist/for-each-obj.cjs.map +1 -0
- package/dist/for-each-obj.js +1 -1
- package/dist/for-each-obj.js.map +1 -1
- package/dist/for-each.cjs +2 -1
- package/dist/for-each.cjs.map +1 -0
- package/dist/for-each.js +1 -1
- package/dist/for-each.js.map +1 -1
- package/dist/from-entries.cjs +2 -1
- package/dist/from-entries.cjs.map +1 -0
- package/dist/from-entries.js +1 -1
- package/dist/from-entries.js.map +1 -1
- package/dist/from-keys.cjs +2 -1
- package/dist/from-keys.cjs.map +1 -0
- package/dist/from-keys.js +1 -1
- package/dist/from-keys.js.map +1 -1
- package/dist/funnel.cjs +2 -1
- package/dist/funnel.cjs.map +1 -0
- package/dist/funnel.js +1 -1
- package/dist/funnel.js.map +1 -1
- package/dist/group-by-prop.cjs +2 -1
- package/dist/group-by-prop.cjs.map +1 -0
- package/dist/group-by-prop.js +1 -1
- package/dist/group-by-prop.js.map +1 -1
- package/dist/group-by.cjs +2 -1
- package/dist/group-by.cjs.map +1 -0
- package/dist/group-by.js +1 -1
- package/dist/group-by.js.map +1 -1
- package/dist/has-at-least.cjs +2 -1
- package/dist/has-at-least.cjs.map +1 -0
- package/dist/has-at-least.js +2 -1
- package/dist/has-at-least.js.map +1 -0
- package/dist/has-sub-object.cjs +2 -1
- package/dist/has-sub-object.cjs.map +1 -0
- package/dist/has-sub-object.js +1 -1
- package/dist/has-sub-object.js.map +1 -1
- package/dist/heap-C0zPQGC0.cjs +2 -0
- package/dist/heap-C0zPQGC0.cjs.map +1 -0
- package/dist/heap-M6D40vkc.js +2 -0
- package/dist/heap-M6D40vkc.js.map +1 -0
- package/dist/human-readable-file-size.cjs +2 -1
- package/dist/human-readable-file-size.cjs.map +1 -0
- package/dist/identity.cjs +2 -1
- package/dist/identity.cjs.map +1 -0
- package/dist/identity.js +1 -1
- package/dist/identity.js.map +1 -1
- package/dist/index-by.cjs +2 -1
- package/dist/index-by.cjs.map +1 -0
- package/dist/index-by.js +1 -1
- package/dist/index-by.js.map +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +12489 -158
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +12489 -158
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/intersection-with.cjs +2 -1
- package/dist/intersection-with.cjs.map +1 -0
- package/dist/intersection-with.js +1 -1
- package/dist/intersection-with.js.map +1 -1
- package/dist/intersection.cjs +2 -1
- package/dist/intersection.cjs.map +1 -0
- package/dist/intersection.js +1 -1
- package/dist/intersection.js.map +1 -1
- package/dist/invert.cjs +2 -1
- package/dist/invert.cjs.map +1 -0
- package/dist/invert.js +1 -1
- package/dist/invert.js.map +1 -1
- package/dist/is-array.cjs +2 -1
- package/dist/is-array.cjs.map +1 -0
- package/dist/is-array.js.map +1 -1
- package/dist/is-big-int.cjs +2 -1
- package/dist/is-big-int.cjs.map +1 -0
- package/dist/is-big-int.js.map +1 -1
- package/dist/is-boolean.cjs +2 -1
- package/dist/is-boolean.cjs.map +1 -0
- package/dist/is-boolean.js.map +1 -1
- package/dist/is-date.cjs +2 -1
- package/dist/is-date.cjs.map +1 -0
- package/dist/is-date.js.map +1 -1
- package/dist/is-deep-equal.cjs +2 -1
- package/dist/is-deep-equal.cjs.map +1 -0
- package/dist/is-deep-equal.js +1 -1
- package/dist/is-deep-equal.js.map +1 -1
- package/dist/is-defined.cjs +2 -1
- package/dist/is-defined.cjs.map +1 -0
- package/dist/is-defined.js.map +1 -1
- package/dist/is-empty.cjs +2 -1
- package/dist/is-empty.cjs.map +1 -0
- package/dist/is-empty.js +1 -1
- package/dist/is-empty.js.map +1 -1
- package/dist/is-emptyish.cjs +2 -1
- package/dist/is-emptyish.cjs.map +1 -0
- package/dist/is-emptyish.js.map +1 -1
- package/dist/is-error.cjs +2 -1
- package/dist/is-error.cjs.map +1 -0
- package/dist/is-error.js.map +1 -1
- package/dist/is-function.cjs +2 -1
- package/dist/is-function.cjs.map +1 -0
- package/dist/is-function.js.map +1 -1
- package/dist/is-included-in.cjs +2 -1
- package/dist/is-included-in.cjs.map +1 -0
- package/dist/is-included-in.js.map +1 -1
- package/dist/is-non-null.cjs +2 -1
- package/dist/is-non-null.cjs.map +1 -0
- package/dist/is-non-null.js.map +1 -1
- package/dist/is-non-nullish.cjs +2 -1
- package/dist/is-non-nullish.cjs.map +1 -0
- package/dist/is-non-nullish.js.map +1 -1
- package/dist/is-not.cjs +2 -1
- package/dist/is-not.cjs.map +1 -0
- package/dist/is-not.js.map +1 -1
- package/dist/is-nullish.cjs +2 -1
- package/dist/is-nullish.cjs.map +1 -0
- package/dist/is-nullish.js.map +1 -1
- package/dist/is-number.cjs +2 -1
- package/dist/is-number.cjs.map +1 -0
- package/dist/is-number.js.map +1 -1
- package/dist/is-object-type.cjs +2 -1
- package/dist/is-object-type.cjs.map +1 -0
- package/dist/is-object-type.js.map +1 -1
- package/dist/is-plain-object.cjs +2 -1
- package/dist/is-plain-object.cjs.map +1 -0
- package/dist/is-plain-object.js.map +1 -1
- package/dist/is-promise.cjs +2 -1
- package/dist/is-promise.cjs.map +1 -0
- package/dist/is-promise.js.map +1 -1
- package/dist/is-shallow-equal.cjs +2 -1
- package/dist/is-shallow-equal.cjs.map +1 -0
- package/dist/is-shallow-equal.js +1 -1
- package/dist/is-shallow-equal.js.map +1 -1
- package/dist/is-strict-equal.cjs +2 -1
- package/dist/is-strict-equal.cjs.map +1 -0
- package/dist/is-strict-equal.js +1 -1
- package/dist/is-strict-equal.js.map +1 -1
- package/dist/is-string.cjs +2 -1
- package/dist/is-string.cjs.map +1 -0
- package/dist/is-string.js.map +1 -1
- package/dist/is-symbol.cjs +2 -1
- package/dist/is-symbol.cjs.map +1 -0
- package/dist/is-symbol.js.map +1 -1
- package/dist/is-truthy.cjs +2 -1
- package/dist/is-truthy.cjs.map +1 -0
- package/dist/is-truthy.js.map +1 -1
- package/dist/join.cjs +2 -1
- package/dist/join.cjs.map +1 -0
- package/dist/join.js +1 -1
- package/dist/join.js.map +1 -1
- package/dist/key-codes.cjs +2 -1
- package/dist/key-codes.cjs.map +1 -0
- package/dist/keys.cjs +2 -1
- package/dist/keys.cjs.map +1 -0
- package/dist/keys.js +1 -1
- package/dist/keys.js.map +1 -1
- package/dist/last.cjs +2 -1
- package/dist/last.cjs.map +1 -0
- package/dist/last.js +1 -1
- package/dist/last.js.map +1 -1
- package/dist/lazy-data-last-impl-B05ZpguF.cjs +2 -0
- package/dist/lazy-data-last-impl-B05ZpguF.cjs.map +1 -0
- package/dist/lazy-data-last-impl-Vt_M0l7X.js +2 -0
- package/dist/lazy-data-last-impl-Vt_M0l7X.js.map +1 -0
- package/dist/length.cjs +2 -1
- package/dist/length.cjs.map +1 -0
- package/dist/length.js +1 -1
- package/dist/length.js.map +1 -1
- package/dist/map-keys.cjs +2 -1
- package/dist/map-keys.cjs.map +1 -0
- package/dist/map-keys.js +1 -1
- package/dist/map-keys.js.map +1 -1
- package/dist/map-to-obj.cjs +2 -1
- package/dist/map-to-obj.cjs.map +1 -0
- package/dist/map-to-obj.js +1 -1
- package/dist/map-to-obj.js.map +1 -1
- package/dist/map-values.cjs +2 -1
- package/dist/map-values.cjs.map +1 -0
- package/dist/map-values.js +1 -1
- package/dist/map-values.js.map +1 -1
- package/dist/map-with-feedback.cjs +2 -1
- package/dist/map-with-feedback.cjs.map +1 -0
- package/dist/map-with-feedback.js +1 -1
- package/dist/map-with-feedback.js.map +1 -1
- package/dist/map.cjs +2 -1
- package/dist/map.cjs.map +1 -0
- package/dist/map.js +1 -1
- package/dist/map.js.map +1 -1
- package/dist/mean-by.cjs +2 -1
- package/dist/mean-by.cjs.map +1 -0
- package/dist/mean-by.js +1 -1
- package/dist/mean-by.js.map +1 -1
- package/dist/mean.cjs +2 -0
- package/dist/mean.cjs.map +1 -0
- package/dist/mean.js +2 -0
- package/dist/mean.js.map +1 -0
- package/dist/median.cjs +2 -0
- package/dist/median.cjs.map +1 -0
- package/dist/median.js +2 -0
- package/dist/median.js.map +1 -0
- package/dist/merge-all.cjs +2 -1
- package/dist/merge-all.cjs.map +1 -0
- package/dist/merge-all.js.map +1 -1
- package/dist/merge-deep.cjs +2 -1
- package/dist/merge-deep.cjs.map +1 -0
- package/dist/merge-deep.js +1 -1
- package/dist/merge-deep.js.map +1 -1
- package/dist/merge.cjs +2 -1
- package/dist/merge.cjs.map +1 -0
- package/dist/merge.js +1 -1
- package/dist/merge.js.map +1 -1
- package/dist/multiply.cjs +2 -1
- package/dist/multiply.cjs.map +1 -0
- package/dist/multiply.js +1 -1
- package/dist/multiply.js.map +1 -1
- package/dist/nth-by-DhfNV5xd.js +2 -0
- package/dist/nth-by-DhfNV5xd.js.map +1 -0
- package/dist/nth-by-zZ3RM-mR.cjs +2 -0
- package/dist/nth-by-zZ3RM-mR.cjs.map +1 -0
- package/dist/nth-by.cjs +1 -1
- package/dist/nth-by.js +1 -1
- package/dist/obj-of.cjs +2 -1
- package/dist/obj-of.cjs.map +1 -0
- package/dist/obj-of.js +1 -1
- package/dist/obj-of.js.map +1 -1
- package/dist/omit-by.cjs +2 -1
- package/dist/omit-by.cjs.map +1 -0
- package/dist/omit-by.js +1 -1
- package/dist/omit-by.js.map +1 -1
- package/dist/omit.cjs +2 -1
- package/dist/omit.cjs.map +1 -0
- package/dist/omit.js +1 -1
- package/dist/omit.js.map +1 -1
- package/dist/once.cjs +2 -1
- package/dist/once.cjs.map +1 -0
- package/dist/once.js.map +1 -1
- package/dist/only.cjs +2 -1
- package/dist/only.cjs.map +1 -0
- package/dist/only.js +1 -1
- package/dist/only.js.map +1 -1
- package/dist/partial-bind.cjs +2 -0
- package/dist/partial-bind.cjs.map +1 -0
- package/dist/partial-bind.js +2 -0
- package/dist/partial-bind.js.map +1 -0
- package/dist/partial-last-bind.cjs +2 -0
- package/dist/partial-last-bind.cjs.map +1 -0
- package/dist/partial-last-bind.js +2 -0
- package/dist/partial-last-bind.js.map +1 -0
- package/dist/partition.cjs +2 -1
- package/dist/partition.cjs.map +1 -0
- package/dist/partition.js +1 -1
- package/dist/partition.js.map +1 -1
- package/dist/path-or.cjs +2 -1
- package/dist/path-or.cjs.map +1 -0
- package/dist/path-or.js +1 -1
- package/dist/path-or.js.map +1 -1
- package/dist/pick-by.cjs +2 -1
- package/dist/pick-by.cjs.map +1 -0
- package/dist/pick-by.js +1 -1
- package/dist/pick-by.js.map +1 -1
- package/dist/pick.cjs +2 -1
- package/dist/pick.cjs.map +1 -0
- package/dist/pick.js +1 -1
- package/dist/pick.js.map +1 -1
- package/dist/pipe.cjs +2 -1
- package/dist/pipe.cjs.map +1 -0
- package/dist/pipe.js +2 -1
- package/dist/pipe.js.map +1 -0
- package/dist/piped.cjs +2 -1
- package/dist/piped.cjs.map +1 -0
- package/dist/piped.js +1 -1
- package/dist/piped.js.map +1 -1
- package/dist/product.cjs +2 -1
- package/dist/product.cjs.map +1 -0
- package/dist/product.js +1 -1
- package/dist/product.js.map +1 -1
- package/dist/prop.cjs +2 -1
- package/dist/prop.cjs.map +1 -0
- package/dist/prop.js.map +1 -1
- package/dist/pull-object.cjs +2 -1
- package/dist/pull-object.cjs.map +1 -0
- package/dist/pull-object.js +1 -1
- package/dist/pull-object.js.map +1 -1
- package/dist/random-big-int.cjs +2 -0
- package/dist/random-big-int.cjs.map +1 -0
- package/dist/random-big-int.js +2 -0
- package/dist/random-big-int.js.map +1 -0
- package/dist/random-integer.cjs +2 -1
- package/dist/random-integer.cjs.map +1 -0
- package/dist/random-integer.js +1 -1
- package/dist/random-integer.js.map +1 -1
- package/dist/random-string.cjs +2 -1
- package/dist/random-string.cjs.map +1 -0
- package/dist/random-string.js +1 -1
- package/dist/random-string.js.map +1 -1
- package/dist/range.cjs +2 -1
- package/dist/range.cjs.map +1 -0
- package/dist/range.js +1 -1
- package/dist/range.js.map +1 -1
- package/dist/rank-by.cjs +2 -1
- package/dist/rank-by.cjs.map +1 -0
- package/dist/rank-by.js +1 -1
- package/dist/rank-by.js.map +1 -1
- package/dist/reduce.cjs +2 -1
- package/dist/reduce.cjs.map +1 -0
- package/dist/reduce.js +1 -1
- package/dist/reduce.js.map +1 -1
- package/dist/reverse.cjs +2 -1
- package/dist/reverse.cjs.map +1 -0
- package/dist/reverse.js +1 -1
- package/dist/reverse.js.map +1 -1
- package/dist/round.cjs +2 -1
- package/dist/round.cjs.map +1 -0
- package/dist/round.js +1 -1
- package/dist/round.js.map +1 -1
- package/dist/sample.cjs +2 -1
- package/dist/sample.cjs.map +1 -0
- package/dist/sample.js +1 -1
- package/dist/sample.js.map +1 -1
- package/dist/set-path.cjs +2 -1
- package/dist/set-path.cjs.map +1 -0
- package/dist/set-path.js +1 -1
- package/dist/set-path.js.map +1 -1
- package/dist/set.cjs +2 -1
- package/dist/set.cjs.map +1 -0
- package/dist/set.js +1 -1
- package/dist/set.js.map +1 -1
- package/dist/shuffle.cjs +2 -1
- package/dist/shuffle.cjs.map +1 -0
- package/dist/shuffle.js +1 -1
- package/dist/shuffle.js.map +1 -1
- package/dist/sleep.cjs +2 -1
- package/dist/sleep.cjs.map +1 -0
- package/dist/slice-string.cjs +2 -1
- package/dist/slice-string.cjs.map +1 -0
- package/dist/slice-string.js.map +1 -1
- package/dist/slugify.cjs +2 -1
- package/dist/slugify.cjs.map +1 -0
- package/dist/sort-by.cjs +2 -1
- package/dist/sort-by.cjs.map +1 -0
- package/dist/sort-by.js +1 -1
- package/dist/sort-by.js.map +1 -1
- package/dist/sort.cjs +2 -1
- package/dist/sort.cjs.map +1 -0
- package/dist/sort.js +1 -1
- package/dist/sort.js.map +1 -1
- package/dist/sorted-index-by.cjs +2 -1
- package/dist/sorted-index-by.cjs.map +1 -0
- package/dist/sorted-index-by.js +1 -1
- package/dist/sorted-index-by.js.map +1 -1
- package/dist/sorted-index-with.cjs +2 -1
- package/dist/sorted-index-with.cjs.map +1 -0
- package/dist/sorted-index-with.js +1 -1
- package/dist/sorted-index-with.js.map +1 -1
- package/dist/sorted-index.cjs +2 -1
- package/dist/sorted-index.cjs.map +1 -0
- package/dist/sorted-index.js +1 -1
- package/dist/sorted-index.js.map +1 -1
- package/dist/sorted-last-index-by.cjs +2 -1
- package/dist/sorted-last-index-by.cjs.map +1 -0
- package/dist/sorted-last-index-by.js +1 -1
- package/dist/sorted-last-index-by.js.map +1 -1
- package/dist/sorted-last-index.cjs +2 -1
- package/dist/sorted-last-index.cjs.map +1 -0
- package/dist/sorted-last-index.js +1 -1
- package/dist/sorted-last-index.js.map +1 -1
- package/dist/splice.cjs +2 -1
- package/dist/splice.cjs.map +1 -0
- package/dist/splice.js +1 -1
- package/dist/splice.js.map +1 -1
- package/dist/split-at.cjs +2 -1
- package/dist/split-at.cjs.map +1 -0
- package/dist/split-at.js +1 -1
- package/dist/split-at.js.map +1 -1
- package/dist/split-when.cjs +2 -1
- package/dist/split-when.cjs.map +1 -0
- package/dist/split-when.js +1 -1
- package/dist/split-when.js.map +1 -1
- package/dist/split.cjs +2 -1
- package/dist/split.cjs.map +1 -0
- package/dist/split.js.map +1 -1
- package/dist/starts-with.cjs +2 -0
- package/dist/starts-with.cjs.map +1 -0
- package/dist/starts-with.js +2 -0
- package/dist/starts-with.js.map +1 -0
- package/dist/string-to-path.cjs +2 -1
- package/dist/string-to-path.cjs.map +1 -0
- package/dist/string-to-path.js.map +1 -1
- package/dist/subtract.cjs +2 -1
- package/dist/subtract.cjs.map +1 -0
- package/dist/subtract.js +1 -1
- package/dist/subtract.js.map +1 -1
- package/dist/sum-by.cjs +2 -1
- package/dist/sum-by.cjs.map +1 -0
- package/dist/sum-by.js +1 -1
- package/dist/sum-by.js.map +1 -1
- package/dist/sum.cjs +2 -1
- package/dist/sum.cjs.map +1 -0
- package/dist/sum.js +1 -1
- package/dist/sum.js.map +1 -1
- package/dist/swap-in-place-BzNaxwB3.js +2 -0
- package/dist/swap-in-place-BzNaxwB3.js.map +1 -0
- package/dist/swap-in-place-D1vasegg.cjs +2 -0
- package/dist/swap-in-place-D1vasegg.cjs.map +1 -0
- package/dist/swap-indices.cjs +2 -1
- package/dist/swap-indices.cjs.map +1 -0
- package/dist/swap-indices.js +1 -1
- package/dist/swap-indices.js.map +1 -1
- package/dist/swap-props.cjs +2 -1
- package/dist/swap-props.cjs.map +1 -0
- package/dist/swap-props.js +1 -1
- package/dist/swap-props.js.map +1 -1
- package/dist/take-first-by.cjs +2 -1
- package/dist/take-first-by.cjs.map +1 -0
- package/dist/take-first-by.js +1 -1
- package/dist/take-first-by.js.map +1 -1
- package/dist/take-last-while.cjs +2 -1
- package/dist/take-last-while.cjs.map +1 -0
- package/dist/take-last-while.js +1 -1
- package/dist/take-last-while.js.map +1 -1
- package/dist/take-last.cjs +2 -1
- package/dist/take-last.cjs.map +1 -0
- package/dist/take-last.js +1 -1
- package/dist/take-last.js.map +1 -1
- package/dist/take-while.cjs +2 -1
- package/dist/take-while.cjs.map +1 -0
- package/dist/take-while.js +1 -1
- package/dist/take-while.js.map +1 -1
- package/dist/take.cjs +2 -1
- package/dist/take.cjs.map +1 -0
- package/dist/take.js +1 -1
- package/dist/take.js.map +1 -1
- package/dist/tap.cjs +2 -1
- package/dist/tap.cjs.map +1 -0
- package/dist/tap.js +1 -1
- package/dist/tap.js.map +1 -1
- package/dist/times.cjs +2 -1
- package/dist/times.cjs.map +1 -0
- package/dist/times.js +1 -1
- package/dist/times.js.map +1 -1
- package/dist/to-camel-case.cjs +2 -1
- package/dist/to-camel-case.cjs.map +1 -0
- package/dist/to-camel-case.js +1 -1
- package/dist/to-camel-case.js.map +1 -1
- package/dist/to-kebab-case.cjs +2 -1
- package/dist/to-kebab-case.cjs.map +1 -0
- package/dist/to-kebab-case.js +1 -1
- package/dist/to-kebab-case.js.map +1 -1
- package/dist/to-lower-case.cjs +2 -1
- package/dist/to-lower-case.cjs.map +1 -0
- package/dist/to-lower-case.js +1 -1
- package/dist/to-lower-case.js.map +1 -1
- package/dist/to-single-BunGuk7o.cjs +2 -0
- package/dist/to-single-BunGuk7o.cjs.map +1 -0
- package/dist/to-single-XEXXW73e.js +2 -0
- package/dist/to-single-XEXXW73e.js.map +1 -0
- package/dist/to-snake-case.cjs +2 -1
- package/dist/to-snake-case.cjs.map +1 -0
- package/dist/to-snake-case.js +1 -1
- package/dist/to-snake-case.js.map +1 -1
- package/dist/to-title-case.cjs +2 -1
- package/dist/to-title-case.cjs.map +1 -0
- package/dist/to-title-case.js +1 -1
- package/dist/to-title-case.js.map +1 -1
- package/dist/to-upper-case.cjs +2 -1
- package/dist/to-upper-case.cjs.map +1 -0
- package/dist/to-upper-case.js +1 -1
- package/dist/to-upper-case.js.map +1 -1
- package/dist/truncate.cjs +2 -0
- package/dist/truncate.cjs.map +1 -0
- package/dist/truncate.js +2 -0
- package/dist/truncate.js.map +1 -0
- package/dist/uncapitalize.cjs +2 -1
- package/dist/uncapitalize.cjs.map +1 -0
- package/dist/uncapitalize.js +1 -1
- package/dist/uncapitalize.js.map +1 -1
- package/dist/unique-by.cjs +2 -1
- package/dist/unique-by.cjs.map +1 -0
- package/dist/unique-by.js +1 -1
- package/dist/unique-by.js.map +1 -1
- package/dist/unique-with.cjs +2 -1
- package/dist/unique-with.cjs.map +1 -0
- package/dist/unique-with.js +1 -1
- package/dist/unique-with.js.map +1 -1
- package/dist/unique.cjs +2 -1
- package/dist/unique.cjs.map +1 -0
- package/dist/unique.js +1 -1
- package/dist/unique.js.map +1 -1
- package/dist/utility-evaluators-C8koSp9T.cjs +2 -0
- package/dist/utility-evaluators-C8koSp9T.cjs.map +1 -0
- package/dist/utility-evaluators-ZAaUtL2Z.js +2 -0
- package/dist/utility-evaluators-ZAaUtL2Z.js.map +1 -0
- package/dist/values.cjs +2 -1
- package/dist/values.cjs.map +1 -0
- package/dist/values.js +1 -1
- package/dist/values.js.map +1 -1
- package/dist/when.cjs +2 -0
- package/dist/when.cjs.map +1 -0
- package/dist/when.js +2 -0
- package/dist/when.js.map +1 -0
- package/dist/with-precision-CgRuf7Wl.js +2 -0
- package/dist/with-precision-CgRuf7Wl.js.map +1 -0
- package/dist/with-precision-DVi9325n.cjs +2 -0
- package/dist/with-precision-DVi9325n.cjs.map +1 -0
- package/dist/words-B9lX8euz.js +3 -0
- package/dist/words-B9lX8euz.js.map +1 -0
- package/dist/words-_h74qi45.cjs +3 -0
- package/dist/words-_h74qi45.cjs.map +1 -0
- package/dist/zip-with.cjs +2 -1
- package/dist/zip-with.cjs.map +1 -0
- package/dist/zip-with.js +1 -1
- package/dist/zip-with.js.map +1 -1
- package/dist/zip.cjs +2 -1
- package/dist/zip.cjs.map +1 -0
- package/dist/zip.js +1 -1
- package/dist/zip.js.map +1 -1
- package/package.json +16 -18
- package/dist/add-prop.d.cts +0 -46
- package/dist/add-prop.d.cts.map +0 -1
- package/dist/add-prop.d.ts +0 -46
- package/dist/add-prop.d.ts.map +0 -1
- package/dist/add.d.cts +0 -34
- package/dist/add.d.cts.map +0 -1
- package/dist/add.d.ts +0 -34
- package/dist/add.d.ts.map +0 -1
- package/dist/all-pass.d.cts +0 -37
- package/dist/all-pass.d.cts.map +0 -1
- package/dist/all-pass.d.ts +0 -37
- package/dist/all-pass.d.ts.map +0 -1
- package/dist/any-pass.d.cts +0 -37
- package/dist/any-pass.d.cts.map +0 -1
- package/dist/any-pass.d.ts +0 -37
- package/dist/any-pass.d.ts.map +0 -1
- package/dist/array-required-prefix-BFDM7eSS.d.cts +0 -26
- package/dist/array-required-prefix-BFDM7eSS.d.cts.map +0 -1
- package/dist/array-required-prefix-DwpaLy0D.d.ts +0 -26
- package/dist/array-required-prefix-DwpaLy0D.d.ts.map +0 -1
- package/dist/binary-search-cutoff-index-CN25H71A.js +0 -2
- package/dist/binary-search-cutoff-index-CN25H71A.js.map +0 -1
- package/dist/binary-search-cutoff-index-ClkmTCR5.cjs +0 -1
- package/dist/bounded-partial-CPc1XU57.d.ts +0 -17
- package/dist/bounded-partial-CPc1XU57.d.ts.map +0 -1
- package/dist/bounded-partial-CtOsGqxa.d.cts +0 -17
- package/dist/bounded-partial-CtOsGqxa.d.cts.map +0 -1
- package/dist/capitalize.d.cts +0 -53
- package/dist/capitalize.d.cts.map +0 -1
- package/dist/capitalize.d.ts +0 -53
- package/dist/capitalize.d.ts.map +0 -1
- package/dist/ceil.d.cts +0 -39
- package/dist/ceil.d.cts.map +0 -1
- package/dist/ceil.d.ts +0 -39
- package/dist/ceil.d.ts.map +0 -1
- package/dist/chunk.d.cts +0 -76
- package/dist/chunk.d.cts.map +0 -1
- package/dist/chunk.d.ts +0 -76
- package/dist/chunk.d.ts.map +0 -1
- package/dist/clamp.d.cts +0 -37
- package/dist/clamp.d.cts.map +0 -1
- package/dist/clamp.d.ts +0 -37
- package/dist/clamp.d.ts.map +0 -1
- package/dist/clamped-integer-subtract-C-AIuFhk.d.ts +0 -11
- package/dist/clamped-integer-subtract-C-AIuFhk.d.ts.map +0 -1
- package/dist/clamped-integer-subtract-DueGS_u_.d.cts +0 -11
- package/dist/clamped-integer-subtract-DueGS_u_.d.cts.map +0 -1
- package/dist/clone.d.cts +0 -35
- package/dist/clone.d.cts.map +0 -1
- package/dist/clone.d.ts +0 -35
- package/dist/clone.d.ts.map +0 -1
- package/dist/coerced-array-BKR9Bvsl.d.cts +0 -17
- package/dist/coerced-array-BKR9Bvsl.d.cts.map +0 -1
- package/dist/coerced-array-BfTLxqLo.d.ts +0 -17
- package/dist/coerced-array-BfTLxqLo.d.ts.map +0 -1
- package/dist/concat.d.cts +0 -41
- package/dist/concat.d.cts.map +0 -1
- package/dist/concat.d.ts +0 -41
- package/dist/concat.d.ts.map +0 -1
- package/dist/conditional-6ff4g8Sy.cjs +0 -1
- package/dist/conditional-Br0uqqc9.d.cts +0 -221
- package/dist/conditional-Br0uqqc9.d.cts.map +0 -1
- package/dist/conditional-CDez6uXp.d.ts +0 -221
- package/dist/conditional-CDez6uXp.d.ts.map +0 -1
- package/dist/conditional-WbmvQs8H.js +0 -2
- package/dist/conditional-WbmvQs8H.js.map +0 -1
- package/dist/conditional.d.cts +0 -2
- package/dist/conditional.d.ts +0 -2
- package/dist/constant.d.cts +0 -32
- package/dist/constant.d.cts.map +0 -1
- package/dist/constant.d.ts +0 -32
- package/dist/constant.d.ts.map +0 -1
- package/dist/count-by.d.cts +0 -42
- package/dist/count-by.d.cts.map +0 -1
- package/dist/count-by.d.ts +0 -42
- package/dist/count-by.d.ts.map +0 -1
- package/dist/curry-BsY0Z8jH.cjs +0 -1
- package/dist/curry-CKDQ1osk.d.ts +0 -70
- package/dist/curry-CKDQ1osk.d.ts.map +0 -1
- package/dist/curry-NmniqyJ0.js +0 -2
- package/dist/curry-NmniqyJ0.js.map +0 -1
- package/dist/curry-from-lazy-BCGvmhyS.cjs +0 -1
- package/dist/curry-from-lazy-PQ0BbG-7.js +0 -2
- package/dist/curry-from-lazy-PQ0BbG-7.js.map +0 -1
- package/dist/curry-mh6BKSIA.d.cts +0 -70
- package/dist/curry-mh6BKSIA.d.cts.map +0 -1
- package/dist/curry-order-rules-BoF09Dq2.d.cts +0 -48
- package/dist/curry-order-rules-BoF09Dq2.d.cts.map +0 -1
- package/dist/curry-order-rules-ClqHrs8_.cjs +0 -1
- package/dist/curry-order-rules-CoO4bk5I.d.ts +0 -48
- package/dist/curry-order-rules-CoO4bk5I.d.ts.map +0 -1
- package/dist/curry-order-rules-DwrF-_P1.js +0 -2
- package/dist/curry-order-rules-DwrF-_P1.js.map +0 -1
- package/dist/curry.d.cts +0 -2
- package/dist/curry.d.ts +0 -2
- package/dist/debounce.d.cts +0 -98
- package/dist/debounce.d.cts.map +0 -1
- package/dist/debounce.d.ts +0 -98
- package/dist/debounce.d.ts.map +0 -1
- package/dist/deduped-DdwAYzXs.d.cts +0 -23
- package/dist/deduped-DdwAYzXs.d.cts.map +0 -1
- package/dist/deduped-RY-1u-ns.d.ts +0 -23
- package/dist/deduped-RY-1u-ns.d.ts.map +0 -1
- package/dist/difference-with.d.cts +0 -48
- package/dist/difference-with.d.cts.map +0 -1
- package/dist/difference-with.d.ts +0 -48
- package/dist/difference-with.d.ts.map +0 -1
- package/dist/difference.d.cts +0 -37
- package/dist/difference.d.cts.map +0 -1
- package/dist/difference.d.ts +0 -37
- package/dist/difference.d.ts.map +0 -1
- package/dist/dist-8XtUY3ad.cjs +0 -114
- package/dist/dist-Bd1vawFi.js +0 -103
- package/dist/dist-Bd1vawFi.js.map +0 -1
- package/dist/divide.d.cts +0 -33
- package/dist/divide.d.cts.map +0 -1
- package/dist/divide.d.ts +0 -33
- package/dist/divide.d.ts.map +0 -1
- package/dist/do-nothing.d.cts +0 -28
- package/dist/do-nothing.d.cts.map +0 -1
- package/dist/do-nothing.d.ts +0 -28
- package/dist/do-nothing.d.ts.map +0 -1
- package/dist/drop-first-by.d.cts +0 -41
- package/dist/drop-first-by.d.cts.map +0 -1
- package/dist/drop-first-by.d.ts +0 -41
- package/dist/drop-first-by.d.ts.map +0 -1
- package/dist/drop-last-while.d.cts +0 -36
- package/dist/drop-last-while.d.cts.map +0 -1
- package/dist/drop-last-while.d.ts +0 -36
- package/dist/drop-last-while.d.ts.map +0 -1
- package/dist/drop-last.d.cts +0 -32
- package/dist/drop-last.d.cts.map +0 -1
- package/dist/drop-last.d.ts +0 -32
- package/dist/drop-last.d.ts.map +0 -1
- package/dist/drop-while.d.cts +0 -36
- package/dist/drop-while.d.cts.map +0 -1
- package/dist/drop-while.d.ts +0 -36
- package/dist/drop-while.d.ts.map +0 -1
- package/dist/drop.d.cts +0 -40
- package/dist/drop.d.cts.map +0 -1
- package/dist/drop.d.ts +0 -40
- package/dist/drop.d.ts.map +0 -1
- package/dist/entries.d.cts +0 -31
- package/dist/entries.d.cts.map +0 -1
- package/dist/entries.d.ts +0 -31
- package/dist/entries.d.ts.map +0 -1
- package/dist/enumerable-string-key-of-CZQf3ld_.d.ts +0 -17
- package/dist/enumerable-string-key-of-CZQf3ld_.d.ts.map +0 -1
- package/dist/enumerable-string-key-of-DhcNc5iz.d.cts +0 -17
- package/dist/enumerable-string-key-of-DhcNc5iz.d.cts.map +0 -1
- package/dist/enumerable-string-keyed-value-of-CRlVAvdp.d.ts +0 -12
- package/dist/enumerable-string-keyed-value-of-CRlVAvdp.d.ts.map +0 -1
- package/dist/enumerable-string-keyed-value-of-icm2q60J.d.cts +0 -12
- package/dist/enumerable-string-keyed-value-of-icm2q60J.d.cts.map +0 -1
- package/dist/evolve.d.cts +0 -101
- package/dist/evolve.d.cts.map +0 -1
- package/dist/evolve.d.ts +0 -101
- package/dist/evolve.d.ts.map +0 -1
- package/dist/filter.d.cts +0 -50
- package/dist/filter.d.cts.map +0 -1
- package/dist/filter.d.ts +0 -50
- package/dist/filter.d.ts.map +0 -1
- package/dist/filtered-array-C--8loav.d.cts +0 -22
- package/dist/filtered-array-C--8loav.d.cts.map +0 -1
- package/dist/filtered-array-wtIEwdU7.d.ts +0 -22
- package/dist/filtered-array-wtIEwdU7.d.ts.map +0 -1
- package/dist/find-index.d.cts +0 -50
- package/dist/find-index.d.cts.map +0 -1
- package/dist/find-index.d.ts +0 -50
- package/dist/find-index.d.ts.map +0 -1
- package/dist/find-last-index.d.cts +0 -50
- package/dist/find-last-index.d.cts.map +0 -1
- package/dist/find-last-index.d.ts +0 -50
- package/dist/find-last-index.d.ts.map +0 -1
- package/dist/find-last.d.cts +0 -62
- package/dist/find-last.d.cts.map +0 -1
- package/dist/find-last.d.ts +0 -62
- package/dist/find-last.d.ts.map +0 -1
- package/dist/find.d.cts +0 -64
- package/dist/find.d.cts.map +0 -1
- package/dist/find.d.ts +0 -64
- package/dist/find.d.ts.map +0 -1
- package/dist/first-by.d.cts +0 -60
- package/dist/first-by.d.cts.map +0 -1
- package/dist/first-by.d.ts +0 -60
- package/dist/first-by.d.ts.map +0 -1
- package/dist/first.d.cts +0 -40
- package/dist/first.d.cts.map +0 -1
- package/dist/first.d.ts +0 -40
- package/dist/first.d.ts.map +0 -1
- package/dist/flat-map.d.cts +0 -47
- package/dist/flat-map.d.cts.map +0 -1
- package/dist/flat-map.d.ts +0 -47
- package/dist/flat-map.d.ts.map +0 -1
- package/dist/flat.d.cts +0 -53
- package/dist/flat.d.cts.map +0 -1
- package/dist/flat.d.ts +0 -53
- package/dist/flat.d.ts.map +0 -1
- package/dist/floor.d.cts +0 -39
- package/dist/floor.d.cts.map +0 -1
- package/dist/floor.d.ts +0 -39
- package/dist/floor.d.ts.map +0 -1
- package/dist/for-each-obj.d.cts +0 -47
- package/dist/for-each-obj.d.cts.map +0 -1
- package/dist/for-each-obj.d.ts +0 -47
- package/dist/for-each-obj.d.ts.map +0 -1
- package/dist/for-each.d.cts +0 -54
- package/dist/for-each.d.cts.map +0 -1
- package/dist/for-each.d.ts +0 -54
- package/dist/for-each.d.ts.map +0 -1
- package/dist/from-entries.d.cts +0 -68
- package/dist/from-entries.d.cts.map +0 -1
- package/dist/from-entries.d.ts +0 -68
- package/dist/from-entries.d.ts.map +0 -1
- package/dist/from-keys.d.cts +0 -60
- package/dist/from-keys.d.cts.map +0 -1
- package/dist/from-keys.d.ts +0 -60
- package/dist/from-keys.d.ts.map +0 -1
- package/dist/funnel.d.cts +0 -155
- package/dist/funnel.d.cts.map +0 -1
- package/dist/funnel.d.ts +0 -155
- package/dist/funnel.d.ts.map +0 -1
- package/dist/funnel.lodash-debounce-with-cached-value.test.cjs +0 -1
- package/dist/funnel.lodash-debounce-with-cached-value.test.d.cts +0 -1
- package/dist/funnel.lodash-debounce-with-cached-value.test.d.ts +0 -1
- package/dist/funnel.lodash-debounce-with-cached-value.test.js +0 -2
- package/dist/funnel.lodash-debounce-with-cached-value.test.js.map +0 -1
- package/dist/funnel.lodash-debounce.test.cjs +0 -1
- package/dist/funnel.lodash-debounce.test.d.cts +0 -1
- package/dist/funnel.lodash-debounce.test.d.ts +0 -1
- package/dist/funnel.lodash-debounce.test.js +0 -2
- package/dist/funnel.lodash-debounce.test.js.map +0 -1
- package/dist/funnel.lodash-throttle-with-cached-value.test.cjs +0 -1
- package/dist/funnel.lodash-throttle-with-cached-value.test.d.cts +0 -1
- package/dist/funnel.lodash-throttle-with-cached-value.test.d.ts +0 -1
- package/dist/funnel.lodash-throttle-with-cached-value.test.js +0 -2
- package/dist/funnel.lodash-throttle-with-cached-value.test.js.map +0 -1
- package/dist/funnel.lodash-throttle.test.cjs +0 -1
- package/dist/funnel.lodash-throttle.test.d.cts +0 -1
- package/dist/funnel.lodash-throttle.test.d.ts +0 -1
- package/dist/funnel.lodash-throttle.test.js +0 -2
- package/dist/funnel.lodash-throttle.test.js.map +0 -1
- package/dist/funnel.perkakas-debounce.test.cjs +0 -1
- package/dist/funnel.perkakas-debounce.test.d.cts +0 -1
- package/dist/funnel.perkakas-debounce.test.d.ts +0 -1
- package/dist/funnel.perkakas-debounce.test.js +0 -2
- package/dist/funnel.perkakas-debounce.test.js.map +0 -1
- package/dist/funnel.reference-batch.test.cjs +0 -1
- package/dist/funnel.reference-batch.test.d.cts +0 -1
- package/dist/funnel.reference-batch.test.d.ts +0 -1
- package/dist/funnel.reference-batch.test.js +0 -2
- package/dist/funnel.reference-batch.test.js.map +0 -1
- package/dist/funnel.test-d.cjs +0 -1
- package/dist/funnel.test-d.d.cts +0 -1
- package/dist/funnel.test-d.d.ts +0 -1
- package/dist/funnel.test-d.js +0 -2
- package/dist/funnel.test-d.js.map +0 -1
- package/dist/funnel.test.cjs +0 -1
- package/dist/funnel.test.d.cts +0 -1
- package/dist/funnel.test.d.ts +0 -1
- package/dist/funnel.test.js +0 -2
- package/dist/funnel.test.js.map +0 -1
- package/dist/group-by-prop.d.cts +0 -89
- package/dist/group-by-prop.d.cts.map +0 -1
- package/dist/group-by-prop.d.ts +0 -89
- package/dist/group-by-prop.d.ts.map +0 -1
- package/dist/group-by.d.cts +0 -69
- package/dist/group-by.d.cts.map +0 -1
- package/dist/group-by.d.ts +0 -69
- package/dist/group-by.d.ts.map +0 -1
- package/dist/has-at-least-BXwOPLQK.cjs +0 -1
- package/dist/has-at-least-Coy9sM-B.js +0 -2
- package/dist/has-at-least-Coy9sM-B.js.map +0 -1
- package/dist/has-at-least.d.cts +0 -59
- package/dist/has-at-least.d.cts.map +0 -1
- package/dist/has-at-least.d.ts +0 -59
- package/dist/has-at-least.d.ts.map +0 -1
- package/dist/has-sub-object.d.cts +0 -44
- package/dist/has-sub-object.d.cts.map +0 -1
- package/dist/has-sub-object.d.ts +0 -44
- package/dist/has-sub-object.d.ts.map +0 -1
- package/dist/heap-BhpfhYWj.js +0 -2
- package/dist/heap-BhpfhYWj.js.map +0 -1
- package/dist/heap-DWDhbxfx.cjs +0 -1
- package/dist/human-readable-file-size.d.cts +0 -17
- package/dist/human-readable-file-size.d.cts.map +0 -1
- package/dist/human-readable-file-size.d.ts +0 -17
- package/dist/human-readable-file-size.d.ts.map +0 -1
- package/dist/identity.d.cts +0 -22
- package/dist/identity.d.cts.map +0 -1
- package/dist/identity.d.ts +0 -22
- package/dist/identity.d.ts.map +0 -1
- package/dist/index-by.d.cts +0 -53
- package/dist/index-by.d.cts.map +0 -1
- package/dist/index-by.d.ts +0 -53
- package/dist/index-by.d.ts.map +0 -1
- package/dist/int-range-inclusive-BlGXX6Cz.d.ts +0 -15
- package/dist/int-range-inclusive-BlGXX6Cz.d.ts.map +0 -1
- package/dist/int-range-inclusive-KocNpK0p.d.cts +0 -15
- package/dist/int-range-inclusive-KocNpK0p.d.cts.map +0 -1
- package/dist/intersection-with.d.cts +0 -54
- package/dist/intersection-with.d.cts.map +0 -1
- package/dist/intersection-with.d.ts +0 -54
- package/dist/intersection-with.d.ts.map +0 -1
- package/dist/intersection.d.cts +0 -37
- package/dist/intersection.d.cts.map +0 -1
- package/dist/intersection.d.ts +0 -37
- package/dist/intersection.d.ts.map +0 -1
- package/dist/invert.d.cts +0 -33
- package/dist/invert.d.cts.map +0 -1
- package/dist/invert.d.ts +0 -33
- package/dist/invert.d.ts.map +0 -1
- package/dist/is-array.d.cts +0 -21
- package/dist/is-array.d.cts.map +0 -1
- package/dist/is-array.d.ts +0 -21
- package/dist/is-array.d.ts.map +0 -1
- package/dist/is-big-int.d.cts +0 -22
- package/dist/is-big-int.d.cts.map +0 -1
- package/dist/is-big-int.d.ts +0 -22
- package/dist/is-big-int.d.ts.map +0 -1
- package/dist/is-boolean.d.cts +0 -21
- package/dist/is-boolean.d.cts.map +0 -1
- package/dist/is-boolean.d.ts +0 -21
- package/dist/is-boolean.d.ts.map +0 -1
- package/dist/is-bounded-record-Bx4n8QB0.d.ts +0 -34
- package/dist/is-bounded-record-Bx4n8QB0.d.ts.map +0 -1
- package/dist/is-bounded-record-DV6ZQk9H.d.cts +0 -34
- package/dist/is-bounded-record-DV6ZQk9H.d.cts.map +0 -1
- package/dist/is-date.d.cts +0 -17
- package/dist/is-date.d.cts.map +0 -1
- package/dist/is-date.d.ts +0 -17
- package/dist/is-date.d.ts.map +0 -1
- package/dist/is-deep-equal.d.cts +0 -71
- package/dist/is-deep-equal.d.cts.map +0 -1
- package/dist/is-deep-equal.d.ts +0 -71
- package/dist/is-deep-equal.d.ts.map +0 -1
- package/dist/is-defined.d.cts +0 -19
- package/dist/is-defined.d.cts.map +0 -1
- package/dist/is-defined.d.ts +0 -19
- package/dist/is-defined.d.ts.map +0 -1
- package/dist/is-empty.d.cts +0 -35
- package/dist/is-empty.d.cts.map +0 -1
- package/dist/is-empty.d.ts +0 -35
- package/dist/is-empty.d.ts.map +0 -1
- package/dist/is-emptyish-9tX94IVx.d.cts +0 -73
- package/dist/is-emptyish-9tX94IVx.d.cts.map +0 -1
- package/dist/is-emptyish-DVFGJe-T.d.ts +0 -73
- package/dist/is-emptyish-DVFGJe-T.d.ts.map +0 -1
- package/dist/is-emptyish.d.cts +0 -2
- package/dist/is-emptyish.d.ts +0 -2
- package/dist/is-emptyish.test-d.cjs +0 -1
- package/dist/is-emptyish.test-d.d.cts +0 -8
- package/dist/is-emptyish.test-d.d.cts.map +0 -1
- package/dist/is-emptyish.test-d.d.ts +0 -8
- package/dist/is-emptyish.test-d.d.ts.map +0 -1
- package/dist/is-emptyish.test-d.js +0 -2
- package/dist/is-emptyish.test-d.js.map +0 -1
- package/dist/is-emptyish.test.cjs +0 -1
- package/dist/is-emptyish.test.d.cts +0 -1
- package/dist/is-emptyish.test.d.ts +0 -1
- package/dist/is-emptyish.test.js +0 -2
- package/dist/is-emptyish.test.js.map +0 -1
- package/dist/is-error.d.cts +0 -18
- package/dist/is-error.d.cts.map +0 -1
- package/dist/is-error.d.ts +0 -18
- package/dist/is-error.d.ts.map +0 -1
- package/dist/is-function.d.cts +0 -21
- package/dist/is-function.d.cts.map +0 -1
- package/dist/is-function.d.ts +0 -21
- package/dist/is-function.d.ts.map +0 -1
- package/dist/is-included-in.d.cts +0 -109
- package/dist/is-included-in.d.cts.map +0 -1
- package/dist/is-included-in.d.ts +0 -109
- package/dist/is-included-in.d.ts.map +0 -1
- package/dist/is-non-null.d.cts +0 -19
- package/dist/is-non-null.d.cts.map +0 -1
- package/dist/is-non-null.d.ts +0 -19
- package/dist/is-non-null.d.ts.map +0 -1
- package/dist/is-non-nullish.d.cts +0 -20
- package/dist/is-non-nullish.d.cts.map +0 -1
- package/dist/is-non-nullish.d.ts +0 -20
- package/dist/is-non-nullish.d.ts.map +0 -1
- package/dist/is-not.d.cts +0 -19
- package/dist/is-not.d.cts.map +0 -1
- package/dist/is-not.d.ts +0 -19
- package/dist/is-not.d.ts.map +0 -1
- package/dist/is-nullish.d.cts +0 -23
- package/dist/is-nullish.d.cts.map +0 -1
- package/dist/is-nullish.d.ts +0 -23
- package/dist/is-nullish.d.ts.map +0 -1
- package/dist/is-number.d.cts +0 -22
- package/dist/is-number.d.cts.map +0 -1
- package/dist/is-number.d.ts +0 -22
- package/dist/is-number.d.ts.map +0 -1
- package/dist/is-object-type.d.cts +0 -35
- package/dist/is-object-type.d.cts.map +0 -1
- package/dist/is-object-type.d.ts +0 -35
- package/dist/is-object-type.d.ts.map +0 -1
- package/dist/is-plain-object.d.cts +0 -33
- package/dist/is-plain-object.d.cts.map +0 -1
- package/dist/is-plain-object.d.ts +0 -33
- package/dist/is-plain-object.d.ts.map +0 -1
- package/dist/is-promise.d.cts +0 -18
- package/dist/is-promise.d.cts.map +0 -1
- package/dist/is-promise.d.ts +0 -18
- package/dist/is-promise.d.ts.map +0 -1
- package/dist/is-shallow-equal.d.cts +0 -71
- package/dist/is-shallow-equal.d.cts.map +0 -1
- package/dist/is-shallow-equal.d.ts +0 -71
- package/dist/is-shallow-equal.d.ts.map +0 -1
- package/dist/is-strict-equal.d.cts +0 -67
- package/dist/is-strict-equal.d.cts.map +0 -1
- package/dist/is-strict-equal.d.ts +0 -67
- package/dist/is-strict-equal.d.ts.map +0 -1
- package/dist/is-string.d.cts +0 -20
- package/dist/is-string.d.cts.map +0 -1
- package/dist/is-string.d.ts +0 -20
- package/dist/is-string.d.ts.map +0 -1
- package/dist/is-symbol.d.cts +0 -20
- package/dist/is-symbol.d.cts.map +0 -1
- package/dist/is-symbol.d.ts +0 -20
- package/dist/is-symbol.d.ts.map +0 -1
- package/dist/is-truthy.d.cts +0 -21
- package/dist/is-truthy.d.cts.map +0 -1
- package/dist/is-truthy.d.ts +0 -21
- package/dist/is-truthy.d.ts.map +0 -1
- package/dist/iterable-container-1TN3AJ3s.d.cts +0 -17
- package/dist/iterable-container-1TN3AJ3s.d.cts.map +0 -1
- package/dist/iterable-container-Dv5vSKht.d.ts +0 -17
- package/dist/iterable-container-Dv5vSKht.d.ts.map +0 -1
- package/dist/join.d.cts +0 -46
- package/dist/join.d.cts.map +0 -1
- package/dist/join.d.ts +0 -46
- package/dist/join.d.ts.map +0 -1
- package/dist/key-codes.d.cts +0 -29
- package/dist/key-codes.d.cts.map +0 -1
- package/dist/key-codes.d.ts +0 -29
- package/dist/key-codes.d.ts.map +0 -1
- package/dist/keys.d.cts +0 -38
- package/dist/keys.d.cts.map +0 -1
- package/dist/keys.d.ts +0 -38
- package/dist/keys.d.ts.map +0 -1
- package/dist/last.d.cts +0 -37
- package/dist/last.d.cts.map +0 -1
- package/dist/last.d.ts +0 -37
- package/dist/last.d.ts.map +0 -1
- package/dist/lazy-data-last-impl-D4kLybyP.cjs +0 -1
- package/dist/lazy-data-last-impl-R05wr4K6.js +0 -2
- package/dist/lazy-data-last-impl-R05wr4K6.js.map +0 -1
- package/dist/length.d.cts +0 -28
- package/dist/length.d.cts.map +0 -1
- package/dist/length.d.ts +0 -28
- package/dist/length.d.ts.map +0 -1
- package/dist/magic-string.es-94aXgwpn.js +0 -15
- package/dist/magic-string.es-94aXgwpn.js.map +0 -1
- package/dist/magic-string.es-CGYIWauW.cjs +0 -15
- package/dist/map-keys.d.cts +0 -34
- package/dist/map-keys.d.cts.map +0 -1
- package/dist/map-keys.d.ts +0 -34
- package/dist/map-keys.d.ts.map +0 -1
- package/dist/map-to-obj.d.cts +0 -68
- package/dist/map-to-obj.d.cts.map +0 -1
- package/dist/map-to-obj.d.ts +0 -68
- package/dist/map-to-obj.d.ts.map +0 -1
- package/dist/map-values.d.cts +0 -42
- package/dist/map-values.d.cts.map +0 -1
- package/dist/map-values.d.ts +0 -42
- package/dist/map-values.d.ts.map +0 -1
- package/dist/map-with-feedback.d.cts +0 -54
- package/dist/map-with-feedback.d.cts.map +0 -1
- package/dist/map-with-feedback.d.ts +0 -54
- package/dist/map-with-feedback.d.ts.map +0 -1
- package/dist/map.d.cts +0 -47
- package/dist/map.d.cts.map +0 -1
- package/dist/map.d.ts +0 -47
- package/dist/map.d.ts.map +0 -1
- package/dist/mapped-BbrC9t3s.d.ts +0 -7
- package/dist/mapped-BbrC9t3s.d.ts.map +0 -1
- package/dist/mapped-CkRNfTnY.d.cts +0 -7
- package/dist/mapped-CkRNfTnY.d.cts.map +0 -1
- package/dist/mean-by.d.cts +0 -35
- package/dist/mean-by.d.cts.map +0 -1
- package/dist/mean-by.d.ts +0 -35
- package/dist/mean-by.d.ts.map +0 -1
- package/dist/merge-all-CISawx-J.d.cts +0 -42
- package/dist/merge-all-CISawx-J.d.cts.map +0 -1
- package/dist/merge-all-DJ6n7R1b.d.ts +0 -42
- package/dist/merge-all-DJ6n7R1b.d.ts.map +0 -1
- package/dist/merge-all.d.cts +0 -2
- package/dist/merge-all.d.ts +0 -2
- package/dist/merge-deep.d.cts +0 -37
- package/dist/merge-deep.d.cts.map +0 -1
- package/dist/merge-deep.d.ts +0 -37
- package/dist/merge-deep.d.ts.map +0 -1
- package/dist/merge.d.cts +0 -57
- package/dist/merge.d.cts.map +0 -1
- package/dist/merge.d.ts +0 -57
- package/dist/merge.d.ts.map +0 -1
- package/dist/multiply.d.cts +0 -33
- package/dist/multiply.d.cts.map +0 -1
- package/dist/multiply.d.ts +0 -33
- package/dist/multiply.d.ts.map +0 -1
- package/dist/n-tuple-BkMobYQ9.d.cts +0 -12
- package/dist/n-tuple-BkMobYQ9.d.cts.map +0 -1
- package/dist/n-tuple-zo5g_mSL.d.ts +0 -12
- package/dist/n-tuple-zo5g_mSL.d.ts.map +0 -1
- package/dist/narrowed-to-B7tkuY2k.d.ts +0 -15
- package/dist/narrowed-to-B7tkuY2k.d.ts.map +0 -1
- package/dist/narrowed-to-D_6H-aZW.d.cts +0 -15
- package/dist/narrowed-to-D_6H-aZW.d.cts.map +0 -1
- package/dist/non-empty-array-DHAKSw6t.d.ts +0 -5
- package/dist/non-empty-array-DHAKSw6t.d.ts.map +0 -1
- package/dist/non-empty-array-NDjbHRjk.d.cts +0 -5
- package/dist/non-empty-array-NDjbHRjk.d.cts.map +0 -1
- package/dist/nth-by-Bby4vIbZ.cjs +0 -1
- package/dist/nth-by-JP3-Htbo.js +0 -2
- package/dist/nth-by-JP3-Htbo.js.map +0 -1
- package/dist/nth-by.d.cts +0 -42
- package/dist/nth-by.d.cts.map +0 -1
- package/dist/nth-by.d.ts +0 -42
- package/dist/nth-by.d.ts.map +0 -1
- package/dist/obj-of.d.cts +0 -27
- package/dist/obj-of.d.cts.map +0 -1
- package/dist/obj-of.d.ts +0 -27
- package/dist/obj-of.d.ts.map +0 -1
- package/dist/omit-DI8DRDHj.d.ts +0 -71
- package/dist/omit-DI8DRDHj.d.ts.map +0 -1
- package/dist/omit-DQiCiWAg.d.cts +0 -71
- package/dist/omit-DQiCiWAg.d.cts.map +0 -1
- package/dist/omit-by.d.cts +0 -52
- package/dist/omit-by.d.cts.map +0 -1
- package/dist/omit-by.d.ts +0 -52
- package/dist/omit-by.d.ts.map +0 -1
- package/dist/omit.d.cts +0 -2
- package/dist/omit.d.ts +0 -2
- package/dist/once.d.cts +0 -17
- package/dist/once.d.cts.map +0 -1
- package/dist/once.d.ts +0 -17
- package/dist/once.d.ts.map +0 -1
- package/dist/only.d.cts +0 -34
- package/dist/only.d.cts.map +0 -1
- package/dist/only.d.ts +0 -34
- package/dist/only.d.ts.map +0 -1
- package/dist/optional-options-with-defaults-BFaBSKkF.d.ts +0 -12
- package/dist/optional-options-with-defaults-BFaBSKkF.d.ts.map +0 -1
- package/dist/optional-options-with-defaults-BZVW8GfC.d.cts +0 -12
- package/dist/optional-options-with-defaults-BZVW8GfC.d.cts.map +0 -1
- package/dist/partial-array-CQF5oggb.d.cts +0 -12
- package/dist/partial-array-CQF5oggb.d.cts.map +0 -1
- package/dist/partial-array-DU-2Vkyx.d.ts +0 -12
- package/dist/partial-array-DU-2Vkyx.d.ts.map +0 -1
- package/dist/partition-by-union-BztEpKVh.d.cts +0 -20
- package/dist/partition-by-union-BztEpKVh.d.cts.map +0 -1
- package/dist/partition-by-union-DnfiiEMU.d.ts +0 -20
- package/dist/partition-by-union-DnfiiEMU.d.ts.map +0 -1
- package/dist/partition.d.cts +0 -51
- package/dist/partition.d.cts.map +0 -1
- package/dist/partition.d.ts +0 -51
- package/dist/partition.d.ts.map +0 -1
- package/dist/path-or.d.cts +0 -87
- package/dist/path-or.d.cts.map +0 -1
- package/dist/path-or.d.ts +0 -87
- package/dist/path-or.d.ts.map +0 -1
- package/dist/perkakas-type-error-B9ULNhW0.d.ts +0 -19
- package/dist/perkakas-type-error-B9ULNhW0.d.ts.map +0 -1
- package/dist/perkakas-type-error-ClCCHBW1.d.cts +0 -19
- package/dist/perkakas-type-error-ClCCHBW1.d.cts.map +0 -1
- package/dist/pick-by.d.cts +0 -68
- package/dist/pick-by.d.cts.map +0 -1
- package/dist/pick-by.d.ts +0 -68
- package/dist/pick-by.d.ts.map +0 -1
- package/dist/pick.d.cts +0 -55
- package/dist/pick.d.cts.map +0 -1
- package/dist/pick.d.ts +0 -55
- package/dist/pick.d.ts.map +0 -1
- package/dist/pipe-CB7Lufqv.cjs +0 -1
- package/dist/pipe-CZKusDA-.js +0 -2
- package/dist/pipe-CZKusDA-.js.map +0 -1
- package/dist/pipe.d.cts +0 -106
- package/dist/pipe.d.cts.map +0 -1
- package/dist/pipe.d.ts +0 -106
- package/dist/pipe.d.ts.map +0 -1
- package/dist/piped.d.cts +0 -31
- package/dist/piped.d.cts.map +0 -1
- package/dist/piped.d.ts +0 -31
- package/dist/piped.d.ts.map +0 -1
- package/dist/product.d.cts +0 -52
- package/dist/product.d.cts.map +0 -1
- package/dist/product.d.ts +0 -52
- package/dist/product.d.ts.map +0 -1
- package/dist/prop-D-4cFXSd.d.cts +0 -85
- package/dist/prop-D-4cFXSd.d.cts.map +0 -1
- package/dist/prop-DL-oRBeN.d.ts +0 -85
- package/dist/prop-DL-oRBeN.d.ts.map +0 -1
- package/dist/prop.d.cts +0 -2
- package/dist/prop.d.ts +0 -2
- package/dist/pull-object.d.cts +0 -70
- package/dist/pull-object.d.cts.map +0 -1
- package/dist/pull-object.d.ts +0 -70
- package/dist/pull-object.d.ts.map +0 -1
- package/dist/random-integer.d.cts +0 -23
- package/dist/random-integer.d.cts.map +0 -1
- package/dist/random-integer.d.ts +0 -23
- package/dist/random-integer.d.ts.map +0 -1
- package/dist/random-string.d.cts +0 -29
- package/dist/random-string.d.cts.map +0 -1
- package/dist/random-string.d.ts +0 -29
- package/dist/random-string.d.ts.map +0 -1
- package/dist/range.d.cts +0 -27
- package/dist/range.d.cts.map +0 -1
- package/dist/range.d.ts +0 -27
- package/dist/range.d.ts.map +0 -1
- package/dist/rank-by.d.cts +0 -45
- package/dist/rank-by.d.cts.map +0 -1
- package/dist/rank-by.d.ts +0 -45
- package/dist/rank-by.d.ts.map +0 -1
- package/dist/reduce.d.cts +0 -53
- package/dist/reduce.d.cts.map +0 -1
- package/dist/reduce.d.ts +0 -53
- package/dist/reduce.d.ts.map +0 -1
- package/dist/reordered-array-BWG6tVSK.d.ts +0 -7
- package/dist/reordered-array-BWG6tVSK.d.ts.map +0 -1
- package/dist/reordered-array-CmReuxDi.d.cts +0 -7
- package/dist/reordered-array-CmReuxDi.d.cts.map +0 -1
- package/dist/reverse.d.cts +0 -29
- package/dist/reverse.d.cts.map +0 -1
- package/dist/reverse.d.ts +0 -29
- package/dist/reverse.d.ts.map +0 -1
- package/dist/round.d.cts +0 -39
- package/dist/round.d.cts.map +0 -1
- package/dist/round.d.ts +0 -39
- package/dist/round.d.ts.map +0 -1
- package/dist/sample.d.cts +0 -69
- package/dist/sample.d.cts.map +0 -1
- package/dist/sample.d.ts +0 -69
- package/dist/sample.d.ts.map +0 -1
- package/dist/set-path.d.cts +0 -47
- package/dist/set-path.d.cts.map +0 -1
- package/dist/set-path.d.ts +0 -47
- package/dist/set-path.d.ts.map +0 -1
- package/dist/set.d.cts +0 -40
- package/dist/set.d.cts.map +0 -1
- package/dist/set.d.ts +0 -40
- package/dist/set.d.ts.map +0 -1
- package/dist/shuffle.d.cts +0 -31
- package/dist/shuffle.d.cts.map +0 -1
- package/dist/shuffle.d.ts +0 -31
- package/dist/shuffle.d.ts.map +0 -1
- package/dist/sleep.d.cts +0 -16
- package/dist/sleep.d.cts.map +0 -1
- package/dist/sleep.d.ts +0 -16
- package/dist/sleep.d.ts.map +0 -1
- package/dist/slice-string.d.cts +0 -41
- package/dist/slice-string.d.cts.map +0 -1
- package/dist/slice-string.d.ts +0 -41
- package/dist/slice-string.d.ts.map +0 -1
- package/dist/slugify.d.cts +0 -15
- package/dist/slugify.d.cts.map +0 -1
- package/dist/slugify.d.ts +0 -15
- package/dist/slugify.d.ts.map +0 -1
- package/dist/sort-by.d.cts +0 -88
- package/dist/sort-by.d.cts.map +0 -1
- package/dist/sort-by.d.ts +0 -88
- package/dist/sort-by.d.ts.map +0 -1
- package/dist/sort.d.cts +0 -39
- package/dist/sort.d.cts.map +0 -1
- package/dist/sort.d.ts +0 -39
- package/dist/sort.d.ts.map +0 -1
- package/dist/sorted-index-by.d.cts +0 -70
- package/dist/sorted-index-by.d.cts.map +0 -1
- package/dist/sorted-index-by.d.ts +0 -70
- package/dist/sorted-index-by.d.ts.map +0 -1
- package/dist/sorted-index-with.d.cts +0 -72
- package/dist/sorted-index-with.d.cts.map +0 -1
- package/dist/sorted-index-with.d.ts +0 -72
- package/dist/sorted-index-with.d.ts.map +0 -1
- package/dist/sorted-index.d.cts +0 -45
- package/dist/sorted-index.d.cts.map +0 -1
- package/dist/sorted-index.d.ts +0 -45
- package/dist/sorted-index.d.ts.map +0 -1
- package/dist/sorted-last-index-by.d.cts +0 -72
- package/dist/sorted-last-index-by.d.cts.map +0 -1
- package/dist/sorted-last-index-by.d.ts +0 -72
- package/dist/sorted-last-index-by.d.ts.map +0 -1
- package/dist/sorted-last-index.d.cts +0 -45
- package/dist/sorted-last-index.d.cts.map +0 -1
- package/dist/sorted-last-index.d.ts +0 -45
- package/dist/sorted-last-index.d.ts.map +0 -1
- package/dist/splice.d.cts +0 -35
- package/dist/splice.d.cts.map +0 -1
- package/dist/splice.d.ts +0 -35
- package/dist/splice.d.ts.map +0 -1
- package/dist/split-at.d.cts +0 -31
- package/dist/split-at.d.cts.map +0 -1
- package/dist/split-at.d.ts +0 -31
- package/dist/split-at.d.ts.map +0 -1
- package/dist/split-when.d.cts +0 -29
- package/dist/split-when.d.cts.map +0 -1
- package/dist/split-when.d.ts +0 -29
- package/dist/split-when.d.ts.map +0 -1
- package/dist/split.d.cts +0 -62
- package/dist/split.d.cts.map +0 -1
- package/dist/split.d.ts +0 -62
- package/dist/split.d.ts.map +0 -1
- package/dist/strict-function-BBgKFNUw.d.ts +0 -26
- package/dist/strict-function-BBgKFNUw.d.ts.map +0 -1
- package/dist/strict-function-CPTwDgnZ.d.cts +0 -26
- package/dist/strict-function-CPTwDgnZ.d.cts.map +0 -1
- package/dist/string-to-path.d.cts +0 -39
- package/dist/string-to-path.d.cts.map +0 -1
- package/dist/string-to-path.d.ts +0 -39
- package/dist/string-to-path.d.ts.map +0 -1
- package/dist/subtract.d.cts +0 -35
- package/dist/subtract.d.cts.map +0 -1
- package/dist/subtract.d.ts +0 -35
- package/dist/subtract.d.ts.map +0 -1
- package/dist/sum-by.d.cts +0 -57
- package/dist/sum-by.d.cts.map +0 -1
- package/dist/sum-by.d.ts +0 -57
- package/dist/sum-by.d.ts.map +0 -1
- package/dist/sum.d.cts +0 -50
- package/dist/sum.d.cts.map +0 -1
- package/dist/sum.d.ts +0 -50
- package/dist/sum.d.ts.map +0 -1
- package/dist/swap-in-place-BHkB_mvV.cjs +0 -1
- package/dist/swap-in-place-C_jXKHuD.js +0 -2
- package/dist/swap-in-place-C_jXKHuD.js.map +0 -1
- package/dist/swap-indices.d.cts +0 -61
- package/dist/swap-indices.d.cts.map +0 -1
- package/dist/swap-indices.d.ts +0 -61
- package/dist/swap-indices.d.ts.map +0 -1
- package/dist/swap-props.d.cts +0 -34
- package/dist/swap-props.d.cts.map +0 -1
- package/dist/swap-props.d.ts +0 -34
- package/dist/swap-props.d.ts.map +0 -1
- package/dist/take-first-by.d.cts +0 -41
- package/dist/take-first-by.d.cts.map +0 -1
- package/dist/take-first-by.d.ts +0 -41
- package/dist/take-first-by.d.ts.map +0 -1
- package/dist/take-last-while.d.cts +0 -36
- package/dist/take-last-while.d.cts.map +0 -1
- package/dist/take-last-while.d.ts +0 -36
- package/dist/take-last-while.d.ts.map +0 -1
- package/dist/take-last.d.cts +0 -32
- package/dist/take-last.d.cts.map +0 -1
- package/dist/take-last.d.ts +0 -32
- package/dist/take-last.d.ts.map +0 -1
- package/dist/take-while.d.cts +0 -34
- package/dist/take-while.d.cts.map +0 -1
- package/dist/take-while.d.ts +0 -34
- package/dist/take-while.d.ts.map +0 -1
- package/dist/take.d.cts +0 -34
- package/dist/take.d.cts.map +0 -1
- package/dist/take.d.ts +0 -34
- package/dist/take.d.ts.map +0 -1
- package/dist/tap.d.cts +0 -42
- package/dist/tap.d.cts.map +0 -1
- package/dist/tap.d.ts +0 -42
- package/dist/tap.d.ts.map +0 -1
- package/dist/times.d.cts +0 -48
- package/dist/times.d.cts.map +0 -1
- package/dist/times.d.ts +0 -48
- package/dist/times.d.ts.map +0 -1
- package/dist/to-camel-case.d.cts +0 -84
- package/dist/to-camel-case.d.cts.map +0 -1
- package/dist/to-camel-case.d.ts +0 -84
- package/dist/to-camel-case.d.ts.map +0 -1
- package/dist/to-kebab-case.d.cts +0 -60
- package/dist/to-kebab-case.d.cts.map +0 -1
- package/dist/to-kebab-case.d.ts +0 -60
- package/dist/to-kebab-case.d.ts.map +0 -1
- package/dist/to-lower-case.d.cts +0 -51
- package/dist/to-lower-case.d.cts.map +0 -1
- package/dist/to-lower-case.d.ts +0 -51
- package/dist/to-lower-case.d.ts.map +0 -1
- package/dist/to-single-BKYbBic-.js +0 -2
- package/dist/to-single-BKYbBic-.js.map +0 -1
- package/dist/to-single-Chq_hKEk.cjs +0 -1
- package/dist/to-snake-case.d.cts +0 -60
- package/dist/to-snake-case.d.cts.map +0 -1
- package/dist/to-snake-case.d.ts +0 -60
- package/dist/to-snake-case.d.ts.map +0 -1
- package/dist/to-string-DkC3zRUJ.d.cts +0 -13
- package/dist/to-string-DkC3zRUJ.d.cts.map +0 -1
- package/dist/to-string-YIFx2KS6.d.ts +0 -13
- package/dist/to-string-YIFx2KS6.d.ts.map +0 -1
- package/dist/to-title-case.d.cts +0 -86
- package/dist/to-title-case.d.cts.map +0 -1
- package/dist/to-title-case.d.ts +0 -86
- package/dist/to-title-case.d.ts.map +0 -1
- package/dist/to-upper-case.d.cts +0 -51
- package/dist/to-upper-case.d.cts.map +0 -1
- package/dist/to-upper-case.d.ts +0 -51
- package/dist/to-upper-case.d.ts.map +0 -1
- package/dist/tuple-parts-BYI4o8Vk.d.ts +0 -89
- package/dist/tuple-parts-BYI4o8Vk.d.ts.map +0 -1
- package/dist/tuple-parts-CzQQupgi.d.cts +0 -89
- package/dist/tuple-parts-CzQQupgi.d.cts.map +0 -1
- package/dist/type.helpers.d.cts +0 -5
- package/dist/type.helpers.d.cts.map +0 -1
- package/dist/type.helpers.d.ts +0 -5
- package/dist/type.helpers.d.ts.map +0 -1
- package/dist/uncapitalize.d.cts +0 -51
- package/dist/uncapitalize.d.cts.map +0 -1
- package/dist/uncapitalize.d.ts +0 -51
- package/dist/uncapitalize.d.ts.map +0 -1
- package/dist/unique-by.d.cts +0 -44
- package/dist/unique-by.d.cts.map +0 -1
- package/dist/unique-by.d.ts +0 -44
- package/dist/unique-by.d.ts.map +0 -1
- package/dist/unique-with.d.cts +0 -46
- package/dist/unique-with.d.cts.map +0 -1
- package/dist/unique-with.d.ts +0 -46
- package/dist/unique-with.d.ts.map +0 -1
- package/dist/unique.d.cts +0 -39
- package/dist/unique.d.cts.map +0 -1
- package/dist/unique.d.ts +0 -39
- package/dist/unique.d.ts.map +0 -1
- package/dist/upsert-prop-0hwik6JJ.d.cts +0 -8
- package/dist/upsert-prop-0hwik6JJ.d.cts.map +0 -1
- package/dist/upsert-prop-_NpaZwm4.d.ts +0 -8
- package/dist/upsert-prop-_NpaZwm4.d.ts.map +0 -1
- package/dist/utility-evaluators-Boc-TMbq.js +0 -2
- package/dist/utility-evaluators-Boc-TMbq.js.map +0 -1
- package/dist/utility-evaluators-CAbODbuk.cjs +0 -1
- package/dist/values.d.cts +0 -38
- package/dist/values.d.cts.map +0 -1
- package/dist/values.d.ts +0 -38
- package/dist/values.d.ts.map +0 -1
- package/dist/with-precision-CQ90Walk.js +0 -2
- package/dist/with-precision-CQ90Walk.js.map +0 -1
- package/dist/with-precision-dQAYLrgr.cjs +0 -1
- package/dist/words-DQCM5umD.js +0 -3
- package/dist/words-DQCM5umD.js.map +0 -1
- package/dist/words-DRQKxzLU.cjs +0 -2
- package/dist/zip-with.d.cts +0 -50
- package/dist/zip-with.d.cts.map +0 -1
- package/dist/zip-with.d.ts +0 -50
- package/dist/zip-with.d.ts.map +0 -1
- package/dist/zip.d.cts +0 -38
- package/dist/zip.d.cts.map +0 -1
- package/dist/zip.d.ts +0 -38
- package/dist/zip.d.ts.map +0 -1
package/dist/omit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"omit.js","names":[],"sources":["../src/omit.ts"],"sourcesContent":["import type { EmptyObject, IsNever, KeysOfUnion } from 'type-fest';\nimport type { IsBounded } from './internal/types/is-bounded';\nimport type { IsBoundedRecord } from './internal/types/is-bounded-record';\nimport type { PartitionByUnion } from './internal/types/partition-by-union';\nimport type { SimplifiedWritable } from './internal/types/simplified-writable';\nimport type { TupleParts } from './internal/types/tuple-parts';\nimport { curry } from './curry';\nimport { hasAtLeast } from './has-at-least';\n\ntype OmitFromArray<T, Keys extends ReadonlyArray<PropertyKey>>\n // Distribute unions for both object types and key arrays.\n = T extends unknown\n ? Keys extends unknown\n // The output is always writable because we always create a new object!\n
|
|
1
|
+
{"version":3,"file":"omit.js","names":[],"sources":["../src/omit.ts"],"sourcesContent":["import type { EmptyObject, IsNever, KeysOfUnion } from 'type-fest';\nimport type { IsBounded } from './internal/types/is-bounded';\nimport type { IsBoundedRecord } from './internal/types/is-bounded-record';\nimport type { PartitionByUnion } from './internal/types/partition-by-union';\nimport type { SimplifiedWritable } from './internal/types/simplified-writable';\nimport type { TupleParts } from './internal/types/tuple-parts';\nimport { curry } from './curry';\nimport { hasAtLeast } from './has-at-least';\n\ntype OmitFromArray<T, Keys extends ReadonlyArray<PropertyKey>>\n // Distribute unions for both object types and key arrays.\n = T extends unknown\n ? Keys extends unknown\n ? // The output is always writable because we always create a new object!\n SimplifiedWritable<\n IsNever<Extract<Keys[number], keyof T>> extends true\n ? // When none of the keys belong to T we can short-circuit and\n // simply return T as-is because `omit` would do nothing.\n T\n : IsBoundedRecord<T> extends true\n ? OmitBounded<T, Keys>\n : OmitUnbounded<T, Keys>\n >\n : never\n : never;\n\ntype OmitBounded<T, Keys extends ReadonlyArray<PropertyKey>>\n // We build our output by first considering any key present in the keys array\n // as being omitted. This object would contain all keys that are unaffected at\n // all by this omit operation.\n = FixEmpty<Omit<T, Keys[number]>>\n // But we might be missing keys that are optional in the keys tuple (and\n // thus might not be removed). Because these keys are optional, their props\n // in the output also need to be optional.\n & Partial<\n Pick<\n T,\n Exclude<\n // Find all keys that can either be omitted or not, these are all keys\n // in unions in the required parts of the keys tuple (the prefix and\n // the suffix), as well as all keys in the optional parts and the rest\n // item.\n | PartitionByUnion<TupleParts<Keys>['required']>['union']\n | TupleParts<Keys>['optional'][number]\n | TupleParts<Keys>['item']\n | PartitionByUnion<TupleParts<Keys>['suffix']>['union'],\n // We then need to remove from these any items which *also* are\n // ensured to always exist in the keys tuple, these are the elements\n // of the required parts of the tuple which are singular (not unions).\n | PartitionByUnion<TupleParts<Keys>['required']>['singular']\n | PartitionByUnion<TupleParts<Keys>['suffix']>['singular']\n >\n >\n >;\n\n/**\n * The built-in `Omit` type doesn't handle unbounded records correctly! When\n * omitting an unbounded key the result should be untouched as we can't tell\n * what got removed, and can't represent an object that had \"something\" removed\n * from it, but instead it returns `{}`(?!) The same thing applies when a key\n * is only optionally omitted for the same reasons. This is why we don't use\n * `Omit` at all for the unbounded case.\n *\n * @see https://www.typescriptlang.org/play/?#code/C4TwDgpgBAqgdgIwPYFc4BMLqgXigeQFsBLYAHgCUIBjJAJ3TIGdg7i4BzAGigCIALCABshSXgD4eLNp3EBuAFAB6JVDUA9APxA\n */\ntype OmitUnbounded<T, Keys extends ReadonlyArray<PropertyKey>> = T\n // Any key we know for sure is being omitted needs to become \"impossible\" to\n // access; for an unbounded record this means merging it with a bounded record\n // with `never` value for these keys.\n & Record<\n Bounded<\n | PartitionByUnion<TupleParts<Keys>['required']>['singular']\n | PartitionByUnion<TupleParts<Keys>['suffix']>['singular']\n >,\n never\n >;\n\n/**\n * When `Omit` omits **all** keys from a bounded record it results in `{}` which\n * doesn't match what we'd expect to be returned in terms of a useful type as\n * the output of `Omit`.\n */\ntype FixEmpty<T> = IsNever<keyof T> extends true ? EmptyObject : T;\n\n/**\n * Filter a union of types, leaving only those that are bounded. e.g.,\n * `Bounded<\"a\" | number>` results in `\"a\"`.\n */\ntype Bounded<T> = T extends unknown\n ? IsBounded<T> extends true\n ? T\n : never\n : never;\n\n/**\n * Returns a partial copy of an object omitting the keys specified.\n *\n * @param keys - The property names.\n * @signature\n * omit(keys)(obj);\n * @example\n * pipe({ a: 1, b: 2, c: 3, d: 4 }, omit(['a', 'd'])) // => { b: 2, c: 3 }\n * @dataLast\n * @category Object\n */\nexport function omit<T, const Keys extends ReadonlyArray<KeysOfUnion<T>>>(\n keys: Keys,\n): (data: T) => OmitFromArray<T, Keys>;\n\n/**\n * Returns a partial copy of an object omitting the keys specified.\n *\n * @param data - The object.\n * @param keys - The property names.\n * @signature\n * omit(obj, keys);\n * @example\n * omit({ a: 1, b: 2, c: 3, d: 4 }, ['a', 'd']) // => { b: 2, c: 3 }\n * @dataFirst\n * @category Object\n */\nexport function omit<T, const Keys extends ReadonlyArray<KeysOfUnion<T>>>(\n data: T,\n keys: Keys,\n): OmitFromArray<T, Keys>;\n\nexport function omit(...args: ReadonlyArray<unknown>): unknown {\n return curry(omitImplementation, args);\n}\n\nfunction omitImplementation<\n T extends object,\n Keys extends ReadonlyArray<keyof T>,\n>(data: T, keys: Keys): OmitFromArray<T, Keys> {\n if (!hasAtLeast(keys, 1)) {\n // No props to omit at all!\n // @ts-expect-error [ts2322] - TypeScript can't connect the fact that the\n // keys array is empty and infer the expected output, and then infer that we\n // return it correctly here.\n return { ...data };\n }\n\n if (!hasAtLeast(keys, 2)) {\n // Only one prop to omit so we can let the runtime engine deal with\n // removing it efficiently.\n const { [keys[0]]: _omitted, ...remaining } = data;\n\n // @ts-expect-error [ts2322] - TypeScript can't compute the expected output\n // correctly and then infer that we return it correctly here.\n return remaining;\n }\n\n // Multiple props to omit so we have to use a loop to omit all of them.\n const out = { ...data };\n for (const key of keys) {\n // eslint-disable-next-line ts/no-dynamic-delete -- This is intentional! It is the most effective way to allow the runtime engine to optimize the object without creating excessive copies for every omitted key.\n delete out[key];\n }\n\n // @ts-expect-error [ts2322] - The type is too complex and TypeScript can't\n // \"follow\" the iterative algorithm to ensure the output makes sense.\n return out;\n}\n"],"mappings":"kFA8HA,SAAgB,EAAK,GAAG,EAAuC,CAC7D,OAAO,EAAM,EAAoB,EAAK,CAGxC,SAAS,EAGP,EAAS,EAAoC,CAC7C,GAAI,CAAC,EAAW,EAAM,EAAE,CAKtB,MAAO,CAAE,GAAG,EAAM,CAGpB,GAAI,CAAC,EAAW,EAAM,EAAE,CAAE,CAGxB,GAAM,EAAG,EAAK,IAAK,EAAU,GAAG,GAAc,EAI9C,OAAO,EAIT,IAAM,EAAM,CAAE,GAAG,EAAM,CACvB,IAAK,IAAM,KAAO,EAEhB,OAAO,EAAI,GAKb,OAAO"}
|
package/dist/once.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
function e(e){let t=!1,n;return()=>(t||=(n=e(),!0),n)}exports.once=e;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){let t=!1,n;return()=>(t||=(n=e(),!0),n)}exports.once=e;
|
|
2
|
+
//# sourceMappingURL=once.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"once.cjs","names":[],"sources":["../src/once.ts"],"sourcesContent":["/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls to the function return the value of the first invocation.\n *\n * @param fn - The function to wrap.\n * @signature once(fn)\n * @example\n * const initialize = once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n * @category Function\n */\nexport function once<T>(fn: () => T): () => T {\n let called = false;\n let ret: T;\n return () => {\n if (!called) {\n ret = fn();\n called = true;\n }\n return ret;\n };\n}\n"],"mappings":"mEAYA,SAAgB,EAAQ,EAAsB,CAC5C,IAAI,EAAS,GACT,EACJ,WACE,AAEE,KADA,EAAM,GAAI,CACD,IAEJ"}
|
package/dist/once.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"once.js","names":[
|
|
1
|
+
{"version":3,"file":"once.js","names":[],"sources":["../src/once.ts"],"sourcesContent":["/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls to the function return the value of the first invocation.\n *\n * @param fn - The function to wrap.\n * @signature once(fn)\n * @example\n * const initialize = once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n * @category Function\n */\nexport function once<T>(fn: () => T): () => T {\n let called = false;\n let ret: T;\n return () => {\n if (!called) {\n ret = fn();\n called = true;\n }\n return ret;\n };\n}\n"],"mappings":"AAYA,SAAgB,EAAQ,EAAsB,CAC5C,IAAI,EAAS,GACT,EACJ,WACE,AAEE,KADA,EAAM,GAAI,CACD,IAEJ"}
|
package/dist/only.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const e=require(`./curry
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./curry.cjs`);function t(...t){return e.curry(n,t)}function n(e){return e.length===1?e[0]:void 0}exports.only=t;
|
|
2
|
+
//# sourceMappingURL=only.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"only.cjs","names":["curry"],"sources":["../src/only.ts"],"sourcesContent":["import type { IterableContainer } from './internal/types/iterable-container';\nimport { curry } from './curry';\n\ntype Only<T extends IterableContainer> = T extends\n | readonly [...Array<unknown>, unknown, unknown]\n | readonly []\n | readonly [unknown, ...Array<unknown>, unknown]\n | readonly [unknown, unknown, ...Array<unknown>]\n ? undefined\n : T extends readonly [unknown]\n ? T[number]\n : T[number] | undefined;\n\n/**\n * Returns the first and only element of `array`, or undefined otherwise.\n *\n * @param array - The target array.\n * @signature\n * only(array)\n * @example\n * only([]) // => undefined\n * only([1]) // => 1\n * only([1, 2]) // => undefined\n * @dataFirst\n * @category Array\n */\nexport function only<T extends IterableContainer>(array: Readonly<T>): Only<T>;\n\n/**\n * Returns the first and only element of `array`, or undefined otherwise.\n *\n * @signature\n * only()(array)\n * @example\n * pipe([], only()); // => undefined\n * pipe([1], only()); // => 1\n * pipe([1, 2], only()); // => undefined\n * @dataLast\n * @category Array\n */\nexport function only<T extends IterableContainer>(): (\n array: Readonly<T>,\n) => Only<T>;\n\nexport function only(...args: ReadonlyArray<unknown>): unknown {\n return curry(onlyImplementation, args);\n}\n\nfunction onlyImplementation<T>(array: ReadonlyArray<T>): T | undefined {\n return array.length === 1 ? array[0] : undefined;\n}\n"],"mappings":"kGA4CA,SAAgB,EAAK,GAAG,EAAuC,CAC7D,OAAOA,EAAAA,MAAM,EAAoB,EAAK,CAGxC,SAAS,EAAsB,EAAwC,CACrE,OAAO,EAAM,SAAW,EAAI,EAAM,GAAK,IAAA"}
|
package/dist/only.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{curry as e}from"./curry.js";function t(...t){return e(n,t)}function n(e){return e.length===1?e[0]:void 0}export{t as only};
|
|
2
2
|
//# sourceMappingURL=only.js.map
|
package/dist/only.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"only.js","names":[],"sources":["../src/only.ts"],"sourcesContent":["import type { IterableContainer } from './internal/types/iterable-container';\
|
|
1
|
+
{"version":3,"file":"only.js","names":[],"sources":["../src/only.ts"],"sourcesContent":["import type { IterableContainer } from './internal/types/iterable-container';\nimport { curry } from './curry';\n\ntype Only<T extends IterableContainer> = T extends\n | readonly [...Array<unknown>, unknown, unknown]\n | readonly []\n | readonly [unknown, ...Array<unknown>, unknown]\n | readonly [unknown, unknown, ...Array<unknown>]\n ? undefined\n : T extends readonly [unknown]\n ? T[number]\n : T[number] | undefined;\n\n/**\n * Returns the first and only element of `array`, or undefined otherwise.\n *\n * @param array - The target array.\n * @signature\n * only(array)\n * @example\n * only([]) // => undefined\n * only([1]) // => 1\n * only([1, 2]) // => undefined\n * @dataFirst\n * @category Array\n */\nexport function only<T extends IterableContainer>(array: Readonly<T>): Only<T>;\n\n/**\n * Returns the first and only element of `array`, or undefined otherwise.\n *\n * @signature\n * only()(array)\n * @example\n * pipe([], only()); // => undefined\n * pipe([1], only()); // => 1\n * pipe([1, 2], only()); // => undefined\n * @dataLast\n * @category Array\n */\nexport function only<T extends IterableContainer>(): (\n array: Readonly<T>,\n) => Only<T>;\n\nexport function only(...args: ReadonlyArray<unknown>): unknown {\n return curry(onlyImplementation, args);\n}\n\nfunction onlyImplementation<T>(array: ReadonlyArray<T>): T | undefined {\n return array.length === 1 ? array[0] : undefined;\n}\n"],"mappings":"mCA4CA,SAAgB,EAAK,GAAG,EAAuC,CAC7D,OAAO,EAAM,EAAoB,EAAK,CAGxC,SAAS,EAAsB,EAAwC,CACrE,OAAO,EAAM,SAAW,EAAI,EAAM,GAAK,IAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial-bind.cjs","names":[],"sources":["../src/partial-bind.ts"],"sourcesContent":["import type { IterableContainer } from './internal/types/iterable-container';\nimport type { PerkakasTypeError } from './internal/types/perkakas-type-error';\nimport type { StrictFunction } from './internal/types/strict-function';\nimport type { TupleSplits } from './internal/types/tuple-splits';\n\ntype PartialBindError<\n Message extends string,\n Metadata = never,\n> = PerkakasTypeError<'partialBind', Message, { metadata: Metadata }>;\n\ntype TuplePrefix<T extends IterableContainer> = TupleSplits<T>['left'];\n\ntype RemovePrefix<\n T extends IterableContainer,\n Prefix extends TuplePrefix<T>,\n> = Prefix extends readonly []\n ? T\n : T extends readonly [infer THead, ...infer TRest]\n ? Prefix extends readonly [infer _PrefixHead, ...infer PrefixRest]\n ? // PrefixHead extends THead.\n RemovePrefix<TRest, PrefixRest>\n : // Prefix (as a whole) extends readonly THead[].\n // Prefix could possibly be empty, so this has to be THead?.\n [THead?, ...RemovePrefix<TRest, Prefix>]\n : // T has an optional or rest parameter last. If T is a parameter list,\n // this can only happen if we have optional arguments or a rest param;\n // both cases are similar.\n T extends readonly [(infer _THead)?, ...infer TRest]\n ? Prefix extends readonly [infer _PrefixHead, ...infer PrefixRest]\n ? // PrefixHead extends THead.\n RemovePrefix<TRest, PrefixRest>\n : // Prefix (as a whole) extends [THead?, ...TRest].\n TRest\n : // We got passed a parameter list that isn't what we expected; this is\n // an internal error.\n PartialBindError<'Function parameter list has unexpected shape', T>;\n\n/**\n * Creates a function that calls `func` with `partial` put before the arguments\n * it receives.\n *\n * Can be thought of as \"freezing\" some portion of a function's arguments,\n * resulting in a new function with a simplified signature.\n *\n * @param func - The function to wrap.\n * @param partial - The arguments to put before.\n * @returns A partially bound function.\n * @signature\n * partialBind(func, ...partial);\n * @example\n * const fn = (x: number, y: number, z: number) => x * 100 + y * 10 + z;\n * const partialFn = partialBind(fn, 1, 2);\n * partialFn(3); //=> 123\n *\n * const logWithPrefix = partialBind(console.log, \"[prefix]\");\n * logWithPrefix(\"hello\"); //=> \"[prefix] hello\"\n * @dataFirst\n * @category Function\n * @see partialLastBind\n */\nexport function partialBind<\n F extends StrictFunction,\n PrefixArgs extends TuplePrefix<Parameters<F>>,\n RemovedPrefix extends RemovePrefix<Parameters<F>, PrefixArgs>,\n>(\n func: F,\n ...partial: PrefixArgs\n): (\n ...rest: RemovedPrefix extends IterableContainer ? RemovedPrefix : never\n) => ReturnType<F> {\n // @ts-expect-error [ts2345, ts2322] -- TypeScript infers the generic sub-\n // types too eagerly, making itself blind to the fact that the types match\n // here.\n return (...rest) => func(...partial, ...rest);\n}\n"],"mappings":"mEA4DA,SAAgB,EAKd,EACA,GAAG,EAGc,CAIjB,OAAQ,GAAG,IAAS,EAAK,GAAG,EAAS,GAAG,EAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial-bind.js","names":[],"sources":["../src/partial-bind.ts"],"sourcesContent":["import type { IterableContainer } from './internal/types/iterable-container';\nimport type { PerkakasTypeError } from './internal/types/perkakas-type-error';\nimport type { StrictFunction } from './internal/types/strict-function';\nimport type { TupleSplits } from './internal/types/tuple-splits';\n\ntype PartialBindError<\n Message extends string,\n Metadata = never,\n> = PerkakasTypeError<'partialBind', Message, { metadata: Metadata }>;\n\ntype TuplePrefix<T extends IterableContainer> = TupleSplits<T>['left'];\n\ntype RemovePrefix<\n T extends IterableContainer,\n Prefix extends TuplePrefix<T>,\n> = Prefix extends readonly []\n ? T\n : T extends readonly [infer THead, ...infer TRest]\n ? Prefix extends readonly [infer _PrefixHead, ...infer PrefixRest]\n ? // PrefixHead extends THead.\n RemovePrefix<TRest, PrefixRest>\n : // Prefix (as a whole) extends readonly THead[].\n // Prefix could possibly be empty, so this has to be THead?.\n [THead?, ...RemovePrefix<TRest, Prefix>]\n : // T has an optional or rest parameter last. If T is a parameter list,\n // this can only happen if we have optional arguments or a rest param;\n // both cases are similar.\n T extends readonly [(infer _THead)?, ...infer TRest]\n ? Prefix extends readonly [infer _PrefixHead, ...infer PrefixRest]\n ? // PrefixHead extends THead.\n RemovePrefix<TRest, PrefixRest>\n : // Prefix (as a whole) extends [THead?, ...TRest].\n TRest\n : // We got passed a parameter list that isn't what we expected; this is\n // an internal error.\n PartialBindError<'Function parameter list has unexpected shape', T>;\n\n/**\n * Creates a function that calls `func` with `partial` put before the arguments\n * it receives.\n *\n * Can be thought of as \"freezing\" some portion of a function's arguments,\n * resulting in a new function with a simplified signature.\n *\n * @param func - The function to wrap.\n * @param partial - The arguments to put before.\n * @returns A partially bound function.\n * @signature\n * partialBind(func, ...partial);\n * @example\n * const fn = (x: number, y: number, z: number) => x * 100 + y * 10 + z;\n * const partialFn = partialBind(fn, 1, 2);\n * partialFn(3); //=> 123\n *\n * const logWithPrefix = partialBind(console.log, \"[prefix]\");\n * logWithPrefix(\"hello\"); //=> \"[prefix] hello\"\n * @dataFirst\n * @category Function\n * @see partialLastBind\n */\nexport function partialBind<\n F extends StrictFunction,\n PrefixArgs extends TuplePrefix<Parameters<F>>,\n RemovedPrefix extends RemovePrefix<Parameters<F>, PrefixArgs>,\n>(\n func: F,\n ...partial: PrefixArgs\n): (\n ...rest: RemovedPrefix extends IterableContainer ? RemovedPrefix : never\n) => ReturnType<F> {\n // @ts-expect-error [ts2345, ts2322] -- TypeScript infers the generic sub-\n // types too eagerly, making itself blind to the fact that the types match\n // here.\n return (...rest) => func(...partial, ...rest);\n}\n"],"mappings":"AA4DA,SAAgB,EAKd,EACA,GAAG,EAGc,CAIjB,OAAQ,GAAG,IAAS,EAAK,GAAG,EAAS,GAAG,EAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial-last-bind.cjs","names":[],"sources":["../src/partial-last-bind.ts"],"sourcesContent":["import type { IterableContainer } from './internal/types/iterable-container';\nimport type { PerkakasTypeError } from './internal/types/perkakas-type-error';\nimport type { StrictFunction } from './internal/types/strict-function';\nimport type { TupleSplits } from './internal/types/tuple-splits';\n\ntype PartialLastBindError<\n Message extends string,\n Metadata = never,\n> = PerkakasTypeError<'partialLastBind', Message, { metadata: Metadata }>;\n\ntype TupleSuffix<T extends IterableContainer> = TupleSplits<T>['right'];\n\ntype RemoveSuffix<\n T extends IterableContainer,\n Suffix extends TupleSuffix<T>,\n> = Suffix extends readonly []\n ? T\n : T extends readonly [...infer TRest, infer TLast]\n ? Suffix extends readonly [...infer SuffixRest, infer _SuffixLast]\n ? // SuffixLast extends TLast.\n RemoveSuffix<TRest, SuffixRest>\n : // Suffix (as a whole) extends readonly TLast[].\n // Suffix could possibly be empty, so this has to be TLast?.\n [...RemoveSuffix<TRest, Suffix>, TLast?]\n : // T has an optional or rest parameter last. If T is a parameter list,\n // this can only happen if we have optional arguments or a rest param;\n // both cases are similar.\n T extends readonly [...infer TRest, (infer _TLast)?]\n ? Suffix extends readonly [...infer SuffixRest, infer _SuffixLast]\n ? // SuffixLast extends TLast.\n RemoveSuffix<TRest, SuffixRest>\n : // Suffix (as a whole) extends [...TRest, TLast?].\n TRest\n : // We got passed a parameter list that isn't what we expected; this\n // is an internal error.\n PartialLastBindError<'Function parameter list has unexpected shape', T>;\n\n/**\n * Creates a function that calls `func` with `partial` put after the arguments\n * it receives. Note that this doesn't support functions with both optional\n * and rest parameters.\n *\n * Can be thought of as \"freezing\" some portion of a function's arguments,\n * resulting in a new function with a simplified signature.\n *\n * Useful for converting a data-first function to a data-last one.\n *\n * @param func - The function to wrap.\n * @param partial - The arguments to put after.\n * @returns A partially bound function.\n * @signature\n * partialLastBind(func, ...partial);\n * @example\n * const fn = (x: number, y: number, z: number) => x * 100 + y * 10 + z;\n * const partialFn = partialLastBind(fn, 2, 3);\n * partialFn(1); //=> 123\n *\n * const parseBinary = partialLastBind(parseInt, \"2\");\n * parseBinary(\"101\"); //=> 5\n *\n * pipe(\n * { a: 1 },\n * // instead of (arg) => JSON.stringify(arg, null, 2)\n * partialLastBind(JSON.stringify, null, 2),\n * ); //=> '{\\n \"a\": 1\\n}'\n * @dataFirst\n * @category Function\n * @see partialBind\n */\nexport function partialLastBind<\n F extends StrictFunction,\n SuffixArgs extends TupleSuffix<Parameters<F>>,\n RemovedSuffix extends RemoveSuffix<Parameters<F>, SuffixArgs>,\n>(\n func: F,\n ...partial: SuffixArgs\n): (\n ...rest: RemovedSuffix extends IterableContainer ? RemovedSuffix : never\n) => ReturnType<F> {\n // @ts-expect-error [ts2345, ts2322] -- TypeScript infers the generic sub-\n // types too eagerly, making itself blind to the fact that the types match\n // here.\n return (...rest) => func(...rest, ...partial);\n}\n"],"mappings":"mEAqEA,SAAgB,EAKd,EACA,GAAG,EAGc,CAIjB,OAAQ,GAAG,IAAS,EAAK,GAAG,EAAM,GAAG,EAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial-last-bind.js","names":[],"sources":["../src/partial-last-bind.ts"],"sourcesContent":["import type { IterableContainer } from './internal/types/iterable-container';\nimport type { PerkakasTypeError } from './internal/types/perkakas-type-error';\nimport type { StrictFunction } from './internal/types/strict-function';\nimport type { TupleSplits } from './internal/types/tuple-splits';\n\ntype PartialLastBindError<\n Message extends string,\n Metadata = never,\n> = PerkakasTypeError<'partialLastBind', Message, { metadata: Metadata }>;\n\ntype TupleSuffix<T extends IterableContainer> = TupleSplits<T>['right'];\n\ntype RemoveSuffix<\n T extends IterableContainer,\n Suffix extends TupleSuffix<T>,\n> = Suffix extends readonly []\n ? T\n : T extends readonly [...infer TRest, infer TLast]\n ? Suffix extends readonly [...infer SuffixRest, infer _SuffixLast]\n ? // SuffixLast extends TLast.\n RemoveSuffix<TRest, SuffixRest>\n : // Suffix (as a whole) extends readonly TLast[].\n // Suffix could possibly be empty, so this has to be TLast?.\n [...RemoveSuffix<TRest, Suffix>, TLast?]\n : // T has an optional or rest parameter last. If T is a parameter list,\n // this can only happen if we have optional arguments or a rest param;\n // both cases are similar.\n T extends readonly [...infer TRest, (infer _TLast)?]\n ? Suffix extends readonly [...infer SuffixRest, infer _SuffixLast]\n ? // SuffixLast extends TLast.\n RemoveSuffix<TRest, SuffixRest>\n : // Suffix (as a whole) extends [...TRest, TLast?].\n TRest\n : // We got passed a parameter list that isn't what we expected; this\n // is an internal error.\n PartialLastBindError<'Function parameter list has unexpected shape', T>;\n\n/**\n * Creates a function that calls `func` with `partial` put after the arguments\n * it receives. Note that this doesn't support functions with both optional\n * and rest parameters.\n *\n * Can be thought of as \"freezing\" some portion of a function's arguments,\n * resulting in a new function with a simplified signature.\n *\n * Useful for converting a data-first function to a data-last one.\n *\n * @param func - The function to wrap.\n * @param partial - The arguments to put after.\n * @returns A partially bound function.\n * @signature\n * partialLastBind(func, ...partial);\n * @example\n * const fn = (x: number, y: number, z: number) => x * 100 + y * 10 + z;\n * const partialFn = partialLastBind(fn, 2, 3);\n * partialFn(1); //=> 123\n *\n * const parseBinary = partialLastBind(parseInt, \"2\");\n * parseBinary(\"101\"); //=> 5\n *\n * pipe(\n * { a: 1 },\n * // instead of (arg) => JSON.stringify(arg, null, 2)\n * partialLastBind(JSON.stringify, null, 2),\n * ); //=> '{\\n \"a\": 1\\n}'\n * @dataFirst\n * @category Function\n * @see partialBind\n */\nexport function partialLastBind<\n F extends StrictFunction,\n SuffixArgs extends TupleSuffix<Parameters<F>>,\n RemovedSuffix extends RemoveSuffix<Parameters<F>, SuffixArgs>,\n>(\n func: F,\n ...partial: SuffixArgs\n): (\n ...rest: RemovedSuffix extends IterableContainer ? RemovedSuffix : never\n) => ReturnType<F> {\n // @ts-expect-error [ts2345, ts2322] -- TypeScript infers the generic sub-\n // types too eagerly, making itself blind to the fact that the types match\n // here.\n return (...rest) => func(...rest, ...partial);\n}\n"],"mappings":"AAqEA,SAAgB,EAKd,EACA,GAAG,EAGc,CAIjB,OAAQ,GAAG,IAAS,EAAK,GAAG,EAAM,GAAG,EAAQ"}
|
package/dist/partition.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const e=require(`./curry
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./curry.cjs`);function t(...t){return e.curry(n,t)}function n(e,t){let n=[[],[]];for(let[r,i]of e.entries())t(i,r,e)?n[0].push(i):n[1].push(i);return n}exports.partition=t;
|
|
2
|
+
//# sourceMappingURL=partition.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partition.cjs","names":["curry"],"sources":["../src/partition.ts"],"sourcesContent":["import { curry } from './curry';\n\n/**\n * Splits a collection into two groups, the first of which contains elements the\n * `predicate` type guard passes, and the second one containing the rest.\n *\n * @param data - The items to split.\n * @param predicate - A function to execute for each element in the array. It\n * should return `true` to add the element to the first partition, and and\n * `false` to add the element to the other partition. A type-predicate can also\n * be used to narrow the result.\n * @returns A 2-tuple of arrays where the first array contains the elements that\n * passed the predicate, and the second array contains the elements that did\n * not. The items are in the same order as they were in the original array.\n * @signature\n * partition(data, predicate)\n * @example\n * partition(\n * ['one', 'two', 'forty two'],\n * x => x.length === 3,\n * ); // => [['one', 'two'], ['forty two']]\n * @dataFirst\n * @category Array\n */\nexport function partition<T, S extends T>(\n data: ReadonlyArray<T>,\n predicate: (value: T, index: number, data: ReadonlyArray<T>) => value is S,\n): [Array<S>, Array<Exclude<T, S>>];\nexport function partition<T>(\n data: ReadonlyArray<T>,\n predicate: (value: T, index: number, data: ReadonlyArray<T>) => boolean,\n): [Array<T>, Array<T>];\n\n/**\n * Splits a collection into two groups, the first of which contains elements the\n * `predicate` type guard passes, and the second one containing the rest.\n *\n * @param predicate - A function to execute for each element in the array. It\n * should return `true` to add the element to the first partition, and and\n * `false` to add the element to the other partition. A type-predicate can also\n * be used to narrow the result.\n * @returns A 2-tuple of arrays where the first array contains the elements that\n * passed the predicate, and the second array contains the elements that did\n * not. The items are in the same order as they were in the original array.\n * @signature\n * partition(predicate)(data)\n * @example\n * pipe(\n * ['one', 'two', 'forty two'],\n * partition(x => x.length === 3),\n * ); // => [['one', 'two'], ['forty two']]\n * @dataLast\n * @category Array\n */\nexport function partition<T, S extends T>(\n predicate: (value: T, index: number, data: ReadonlyArray<T>) => value is S,\n): (data: ReadonlyArray<T>) => [Array<S>, Array<Exclude<T, S>>];\nexport function partition<T>(\n predicate: (value: T, index: number, data: ReadonlyArray<T>) => boolean,\n): (data: ReadonlyArray<T>) => [Array<T>, Array<T>];\n\nexport function partition(...args: ReadonlyArray<unknown>): unknown {\n return curry(partitionImplementation, args);\n}\n\nfunction partitionImplementation<T, S extends T>(data: ReadonlyArray<T>, predicate: (value: T, index: number, data: ReadonlyArray<T>) => value is S): [Array<S>, Array<T>] {\n const ret: [Array<S>, Array<T>] = [[], []];\n for (const [index, item] of data.entries()) {\n if (predicate(item, index, data)) {\n ret[0].push(item);\n } else {\n ret[1].push(item);\n }\n }\n return ret;\n}\n"],"mappings":"kGA6DA,SAAgB,EAAU,GAAG,EAAuC,CAClE,OAAOA,EAAAA,MAAM,EAAyB,EAAK,CAG7C,SAAS,EAAwC,EAAwB,EAAkG,CACzK,IAAM,EAA4B,CAAC,EAAE,CAAE,EAAE,CAAC,CAC1C,IAAK,GAAM,CAAC,EAAO,KAAS,EAAK,SAAS,CACpC,EAAU,EAAM,EAAO,EAAK,CAC9B,EAAI,GAAG,KAAK,EAAK,CAEjB,EAAI,GAAG,KAAK,EAAK,CAGrB,OAAO"}
|
package/dist/partition.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{curry as e}from"./curry.js";function t(...t){return e(n,t)}function n(e,t){let n=[[],[]];for(let[r,i]of e.entries())t(i,r,e)?n[0].push(i):n[1].push(i);return n}export{t as partition};
|
|
2
2
|
//# sourceMappingURL=partition.js.map
|
package/dist/partition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partition.js","names":[
|
|
1
|
+
{"version":3,"file":"partition.js","names":[],"sources":["../src/partition.ts"],"sourcesContent":["import { curry } from './curry';\n\n/**\n * Splits a collection into two groups, the first of which contains elements the\n * `predicate` type guard passes, and the second one containing the rest.\n *\n * @param data - The items to split.\n * @param predicate - A function to execute for each element in the array. It\n * should return `true` to add the element to the first partition, and and\n * `false` to add the element to the other partition. A type-predicate can also\n * be used to narrow the result.\n * @returns A 2-tuple of arrays where the first array contains the elements that\n * passed the predicate, and the second array contains the elements that did\n * not. The items are in the same order as they were in the original array.\n * @signature\n * partition(data, predicate)\n * @example\n * partition(\n * ['one', 'two', 'forty two'],\n * x => x.length === 3,\n * ); // => [['one', 'two'], ['forty two']]\n * @dataFirst\n * @category Array\n */\nexport function partition<T, S extends T>(\n data: ReadonlyArray<T>,\n predicate: (value: T, index: number, data: ReadonlyArray<T>) => value is S,\n): [Array<S>, Array<Exclude<T, S>>];\nexport function partition<T>(\n data: ReadonlyArray<T>,\n predicate: (value: T, index: number, data: ReadonlyArray<T>) => boolean,\n): [Array<T>, Array<T>];\n\n/**\n * Splits a collection into two groups, the first of which contains elements the\n * `predicate` type guard passes, and the second one containing the rest.\n *\n * @param predicate - A function to execute for each element in the array. It\n * should return `true` to add the element to the first partition, and and\n * `false` to add the element to the other partition. A type-predicate can also\n * be used to narrow the result.\n * @returns A 2-tuple of arrays where the first array contains the elements that\n * passed the predicate, and the second array contains the elements that did\n * not. The items are in the same order as they were in the original array.\n * @signature\n * partition(predicate)(data)\n * @example\n * pipe(\n * ['one', 'two', 'forty two'],\n * partition(x => x.length === 3),\n * ); // => [['one', 'two'], ['forty two']]\n * @dataLast\n * @category Array\n */\nexport function partition<T, S extends T>(\n predicate: (value: T, index: number, data: ReadonlyArray<T>) => value is S,\n): (data: ReadonlyArray<T>) => [Array<S>, Array<Exclude<T, S>>];\nexport function partition<T>(\n predicate: (value: T, index: number, data: ReadonlyArray<T>) => boolean,\n): (data: ReadonlyArray<T>) => [Array<T>, Array<T>];\n\nexport function partition(...args: ReadonlyArray<unknown>): unknown {\n return curry(partitionImplementation, args);\n}\n\nfunction partitionImplementation<T, S extends T>(data: ReadonlyArray<T>, predicate: (value: T, index: number, data: ReadonlyArray<T>) => value is S): [Array<S>, Array<T>] {\n const ret: [Array<S>, Array<T>] = [[], []];\n for (const [index, item] of data.entries()) {\n if (predicate(item, index, data)) {\n ret[0].push(item);\n } else {\n ret[1].push(item);\n }\n }\n return ret;\n}\n"],"mappings":"mCA6DA,SAAgB,EAAU,GAAG,EAAuC,CAClE,OAAO,EAAM,EAAyB,EAAK,CAG7C,SAAS,EAAwC,EAAwB,EAAkG,CACzK,IAAM,EAA4B,CAAC,EAAE,CAAE,EAAE,CAAC,CAC1C,IAAK,GAAM,CAAC,EAAO,KAAS,EAAK,SAAS,CACpC,EAAU,EAAM,EAAO,EAAK,CAC9B,EAAI,GAAG,KAAK,EAAK,CAEjB,EAAI,GAAG,KAAK,EAAK,CAGrB,OAAO"}
|
package/dist/path-or.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const e=require(`./curry
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./curry.cjs`);function t(...t){return e.curry(n,t)}function n(e,t,n){let r=e;for(let e of t){if(r==null)break;r=r[e]}return r??n}exports.pathOr=t;
|
|
2
|
+
//# sourceMappingURL=path-or.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-or.cjs","names":["curry"],"sources":["../src/path-or.ts"],"sourcesContent":["import { curry } from './curry';\n\n/**\n * Given a union of indexable types `T`, we derive an indexable type\n * containing all of the keys of each variant of `T`. If a key is\n * present in multiple variants of `T`, then the corresponding type in\n * `Pathable<T>` will be the intersection of all types for that key.\n *\n * @example\n * type T1 = Pathable<{a: number} | {a: string; b: boolean}>\n * // {a: number | string; b: boolean}\n *\n * type T2 = Pathable<{a?: {b: string}}\n * // {a: {b: string} | undefined}\n *\n * type T3 = Pathable<{a: string} | number>\n * // {a: string}\n *\n * type T4 = Pathable<{a: number} | {a: string} | {b: boolean}>\n * // {a: number | string; b: boolean}\n *\n * This type lets us answer the questions:\n * - Given some object of type `T`, what keys might this object have?\n * - If this object did happen to have a particular key, what values\n * might that key have?\n */\ntype Pathable<T> = { [K in AllKeys<T>]: TypesForKey<T, K> };\n\ntype AllKeys<T> = T extends infer I ? keyof I : never;\ntype TypesForKey<T, K extends PropertyKey> = T extends infer I\n ? K extends keyof I\n ? I[K]\n : never\n : never;\n\n// Like Required<T>, but also removes explicit null and undefined typings */\ntype StrictlyRequired<T> = { [K in keyof T]-?: NonNullable<T[K]> };\n\n/**\n * Given some `A` which is a key of at least one variant of `T`, derive\n * `T[A]` for the cases where `A` is present in `T`, and `T[A]` is not\n * null or undefined.\n */\ntype PathValue1<T, A extends keyof Pathable<T>> = StrictlyRequired<\n Pathable<T>\n>[A];\n/** All possible options after successfully reaching `T[A]`. */\ntype Pathable1<T, A extends keyof Pathable<T>> = Pathable<PathValue1<T, A>>;\n\n/** As `PathValue1`, but for `T[A][B]`. */\ntype PathValue2<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n> = StrictlyRequired<Pathable1<T, A>>[B];\n/** As `Pathable1`, but for `T[A][B]`. */\ntype Pathable2<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n> = Pathable<PathValue2<T, A, B>>;\n\n/** As `PathValue1`, but for `T[A][B][C]`. */\ntype PathValue3<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n C extends keyof Pathable2<T, A, B>,\n> = StrictlyRequired<Pathable2<T, A, B>>[C];\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is `null` or `undefined`, the `defaultValue` is returned in its place.\n *\n * **DEPRECATED**: Use `defaultTo(prop(object, ...path), defaultValue)`\n * instead!\n *\n * @param object - The target object.\n * @param path - The path of the property to get.\n * @param defaultValue - The default value.\n * @signature pathOr(object, array, defaultValue)\n * @example\n * pathOr({x: 10}, ['y'], 2) // 2\n * pathOr({y: 10}, ['y'], 2) // 10\n * @dataFirst\n * @category Object\n * @deprecated Use `defaultTo(prop(object, ...path), defaultValue)` instead.\n */\nexport function pathOr<T, A extends keyof Pathable<T>>(\n object: T,\n path: readonly [A],\n defaultValue: PathValue1<T, A>,\n): PathValue1<T, A>;\n\n/**\n * @deprecated Use `defaultTo(prop(object, ...path), defaultValue)` instead.\n */\nexport function pathOr<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n>(\n object: T,\n path: readonly [A, B],\n defaultValue: PathValue2<T, A, B>,\n): PathValue2<T, A, B>;\n\n/**\n * @deprecated Use `defaultTo(prop(object, ...path), defaultValue)` instead.\n */\nexport function pathOr<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n C extends keyof Pathable2<T, A, B>,\n>(\n object: T,\n path: readonly [A, B, C],\n defaultValue: PathValue3<T, A, B, C>,\n): PathValue3<T, A, B, C>;\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is `undefined`, the `defaultValue` is returned in its place.\n *\n * **DEPRECATED**: Use `($) => defaultTo(prop($, ...path), defaultValue)`\n * instead, or if already inside a `pipe`, replace the call to `pathOr` with:\n * `pipe(..., prop(...path), defaultTo(defaultValue), ...)`.\n *\n * @param path - The path of the property to get.\n * @param defaultValue - The default value.\n * @signature pathOr(array, defaultValue)(object)\n * @example\n * pipe({x: 10}, pathOr(['y'], 2)) // 2\n * pipe({y: 10}, pathOr(['y'], 2)) // 10\n * @dataLast\n * @category Object\n * @deprecated Use `($) => defaultTo(prop($, ...path), defaultValue)` instead,\n * or if already inside a `pipe`, replace the call to `pathOr` with:\n * `pipe(..., prop(...path), defaultTo(defaultValue), ...)`.\n */\nexport function pathOr<T, A extends keyof Pathable<T>>(\n path: readonly [A],\n defaultValue: PathValue1<T, A>,\n): (object: T) => PathValue1<T, A>;\n\n/**\n * @deprecated Use `($) => defaultTo(prop($, ...path), defaultValue)` instead,\n * or if already inside a `pipe`, replace the call to `pathOr` with:\n * `pipe(..., prop(...path), defaultTo(defaultValue), ...)`.\n */\nexport function pathOr<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n>(\n path: readonly [A, B],\n defaultValue: PathValue2<T, A, B>,\n): (object: T) => PathValue2<T, A, B>;\n\n/**\n * @deprecated Use `($) => defaultTo(prop($, ...path), defaultValue)` instead,\n * or if already inside a `pipe`, replace the call to `pathOr` with:\n * `pipe(..., prop(...path), defaultTo(defaultValue), ...)`.\n */\nexport function pathOr<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n C extends keyof Pathable2<T, A, B>,\n>(\n path: readonly [A, B, C],\n defaultValue: PathValue3<T, A, B, C>,\n): (object: T) => PathValue3<T, A, B, C>;\n\n// TODO [>2]: Remove this function!\nexport function pathOr(...args: ReadonlyArray<unknown>): unknown {\n return curry(pathOrImplementation, args);\n}\n\nfunction pathOrImplementation(\n data: unknown,\n path: ReadonlyArray<PropertyKey>,\n defaultValue: unknown,\n): unknown {\n let current = data;\n for (const prop of path) {\n if (current === null || current === undefined) {\n break;\n }\n current = (current as Record<PropertyKey, unknown>)[prop];\n }\n\n return current ?? defaultValue;\n}\n"],"mappings":"kGA8KA,SAAgB,EAAO,GAAG,EAAuC,CAC/D,OAAOA,EAAAA,MAAM,EAAsB,EAAK,CAG1C,SAAS,EACP,EACA,EACA,EACS,CACT,IAAI,EAAU,EACd,IAAK,IAAM,KAAQ,EAAM,CACvB,GAAI,GAAY,KACd,MAEF,EAAW,EAAyC,GAGtD,OAAO,GAAW"}
|
package/dist/path-or.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{curry as e}from"./curry.js";function t(...t){return e(n,t)}function n(e,t,n){let r=e;for(let e of t){if(r==null)break;r=r[e]}return r??n}export{t as pathOr};
|
|
2
2
|
//# sourceMappingURL=path-or.js.map
|
package/dist/path-or.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-or.js","names":[],"sources":["../src/path-or.ts"],"sourcesContent":["import { curry } from './curry';\n\n/**\n * Given a union of indexable types `T`, we derive an indexable type\n * containing all of the keys of each variant of `T`. If a key is\n * present in multiple variants of `T`, then the corresponding type in\n * `Pathable<T>` will be the intersection of all types for that key.\n *\n * @example\n * type T1 = Pathable<{a: number} | {a: string; b: boolean}>\n * // {a: number | string; b: boolean}\n *\n * type T2 = Pathable<{a?: {b: string}}\n * // {a: {b: string} | undefined}\n *\n * type T3 = Pathable<{a: string} | number>\n * // {a: string}\n *\n * type T4 = Pathable<{a: number} | {a: string} | {b: boolean}>\n * // {a: number | string; b: boolean}\n *\n * This type lets us answer the questions:\n * - Given some object of type `T`, what keys might this object have?\n * - If this object did happen to have a particular key, what values\n * might that key have?\n */\ntype Pathable<T> = { [K in AllKeys<T>]: TypesForKey<T, K> };\n\ntype AllKeys<T> = T extends infer I ? keyof I : never;\ntype TypesForKey<T, K extends PropertyKey> = T extends infer I\n ? K extends keyof I\n ? I[K]\n : never\n : never;\n\n// Like Required<T>, but also removes explicit null and undefined typings */\ntype StrictlyRequired<T> = { [K in keyof T]-?: NonNullable<T[K]> };\n\n/**\n * Given some `A` which is a key of at least one variant of `T`, derive\n * `T[A]` for the cases where `A` is present in `T`, and `T[A]` is not\n * null or undefined.\n */\ntype PathValue1<T, A extends keyof Pathable<T>> = StrictlyRequired<\n Pathable<T>\n>[A];\n/** All possible options after successfully reaching `T[A]`. */\ntype Pathable1<T, A extends keyof Pathable<T>> = Pathable<PathValue1<T, A>>;\n\n/** As `PathValue1`, but for `T[A][B]`. */\ntype PathValue2<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n> = StrictlyRequired<Pathable1<T, A>>[B];\n/** As `Pathable1`, but for `T[A][B]`. */\ntype Pathable2<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n> = Pathable<PathValue2<T, A, B>>;\n\n/** As `PathValue1`, but for `T[A][B][C]`. */\ntype PathValue3<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n C extends keyof Pathable2<T, A, B>,\n> = StrictlyRequired<Pathable2<T, A, B>>[C];\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is `null` or `undefined`, the `defaultValue` is returned in its place.\n *\n *
|
|
1
|
+
{"version":3,"file":"path-or.js","names":[],"sources":["../src/path-or.ts"],"sourcesContent":["import { curry } from './curry';\n\n/**\n * Given a union of indexable types `T`, we derive an indexable type\n * containing all of the keys of each variant of `T`. If a key is\n * present in multiple variants of `T`, then the corresponding type in\n * `Pathable<T>` will be the intersection of all types for that key.\n *\n * @example\n * type T1 = Pathable<{a: number} | {a: string; b: boolean}>\n * // {a: number | string; b: boolean}\n *\n * type T2 = Pathable<{a?: {b: string}}\n * // {a: {b: string} | undefined}\n *\n * type T3 = Pathable<{a: string} | number>\n * // {a: string}\n *\n * type T4 = Pathable<{a: number} | {a: string} | {b: boolean}>\n * // {a: number | string; b: boolean}\n *\n * This type lets us answer the questions:\n * - Given some object of type `T`, what keys might this object have?\n * - If this object did happen to have a particular key, what values\n * might that key have?\n */\ntype Pathable<T> = { [K in AllKeys<T>]: TypesForKey<T, K> };\n\ntype AllKeys<T> = T extends infer I ? keyof I : never;\ntype TypesForKey<T, K extends PropertyKey> = T extends infer I\n ? K extends keyof I\n ? I[K]\n : never\n : never;\n\n// Like Required<T>, but also removes explicit null and undefined typings */\ntype StrictlyRequired<T> = { [K in keyof T]-?: NonNullable<T[K]> };\n\n/**\n * Given some `A` which is a key of at least one variant of `T`, derive\n * `T[A]` for the cases where `A` is present in `T`, and `T[A]` is not\n * null or undefined.\n */\ntype PathValue1<T, A extends keyof Pathable<T>> = StrictlyRequired<\n Pathable<T>\n>[A];\n/** All possible options after successfully reaching `T[A]`. */\ntype Pathable1<T, A extends keyof Pathable<T>> = Pathable<PathValue1<T, A>>;\n\n/** As `PathValue1`, but for `T[A][B]`. */\ntype PathValue2<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n> = StrictlyRequired<Pathable1<T, A>>[B];\n/** As `Pathable1`, but for `T[A][B]`. */\ntype Pathable2<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n> = Pathable<PathValue2<T, A, B>>;\n\n/** As `PathValue1`, but for `T[A][B][C]`. */\ntype PathValue3<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n C extends keyof Pathable2<T, A, B>,\n> = StrictlyRequired<Pathable2<T, A, B>>[C];\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is `null` or `undefined`, the `defaultValue` is returned in its place.\n *\n * **DEPRECATED**: Use `defaultTo(prop(object, ...path), defaultValue)`\n * instead!\n *\n * @param object - The target object.\n * @param path - The path of the property to get.\n * @param defaultValue - The default value.\n * @signature pathOr(object, array, defaultValue)\n * @example\n * pathOr({x: 10}, ['y'], 2) // 2\n * pathOr({y: 10}, ['y'], 2) // 10\n * @dataFirst\n * @category Object\n * @deprecated Use `defaultTo(prop(object, ...path), defaultValue)` instead.\n */\nexport function pathOr<T, A extends keyof Pathable<T>>(\n object: T,\n path: readonly [A],\n defaultValue: PathValue1<T, A>,\n): PathValue1<T, A>;\n\n/**\n * @deprecated Use `defaultTo(prop(object, ...path), defaultValue)` instead.\n */\nexport function pathOr<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n>(\n object: T,\n path: readonly [A, B],\n defaultValue: PathValue2<T, A, B>,\n): PathValue2<T, A, B>;\n\n/**\n * @deprecated Use `defaultTo(prop(object, ...path), defaultValue)` instead.\n */\nexport function pathOr<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n C extends keyof Pathable2<T, A, B>,\n>(\n object: T,\n path: readonly [A, B, C],\n defaultValue: PathValue3<T, A, B, C>,\n): PathValue3<T, A, B, C>;\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is `undefined`, the `defaultValue` is returned in its place.\n *\n * **DEPRECATED**: Use `($) => defaultTo(prop($, ...path), defaultValue)`\n * instead, or if already inside a `pipe`, replace the call to `pathOr` with:\n * `pipe(..., prop(...path), defaultTo(defaultValue), ...)`.\n *\n * @param path - The path of the property to get.\n * @param defaultValue - The default value.\n * @signature pathOr(array, defaultValue)(object)\n * @example\n * pipe({x: 10}, pathOr(['y'], 2)) // 2\n * pipe({y: 10}, pathOr(['y'], 2)) // 10\n * @dataLast\n * @category Object\n * @deprecated Use `($) => defaultTo(prop($, ...path), defaultValue)` instead,\n * or if already inside a `pipe`, replace the call to `pathOr` with:\n * `pipe(..., prop(...path), defaultTo(defaultValue), ...)`.\n */\nexport function pathOr<T, A extends keyof Pathable<T>>(\n path: readonly [A],\n defaultValue: PathValue1<T, A>,\n): (object: T) => PathValue1<T, A>;\n\n/**\n * @deprecated Use `($) => defaultTo(prop($, ...path), defaultValue)` instead,\n * or if already inside a `pipe`, replace the call to `pathOr` with:\n * `pipe(..., prop(...path), defaultTo(defaultValue), ...)`.\n */\nexport function pathOr<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n>(\n path: readonly [A, B],\n defaultValue: PathValue2<T, A, B>,\n): (object: T) => PathValue2<T, A, B>;\n\n/**\n * @deprecated Use `($) => defaultTo(prop($, ...path), defaultValue)` instead,\n * or if already inside a `pipe`, replace the call to `pathOr` with:\n * `pipe(..., prop(...path), defaultTo(defaultValue), ...)`.\n */\nexport function pathOr<\n T,\n A extends keyof Pathable<T>,\n B extends keyof Pathable1<T, A>,\n C extends keyof Pathable2<T, A, B>,\n>(\n path: readonly [A, B, C],\n defaultValue: PathValue3<T, A, B, C>,\n): (object: T) => PathValue3<T, A, B, C>;\n\n// TODO [>2]: Remove this function!\nexport function pathOr(...args: ReadonlyArray<unknown>): unknown {\n return curry(pathOrImplementation, args);\n}\n\nfunction pathOrImplementation(\n data: unknown,\n path: ReadonlyArray<PropertyKey>,\n defaultValue: unknown,\n): unknown {\n let current = data;\n for (const prop of path) {\n if (current === null || current === undefined) {\n break;\n }\n current = (current as Record<PropertyKey, unknown>)[prop];\n }\n\n return current ?? defaultValue;\n}\n"],"mappings":"mCA8KA,SAAgB,EAAO,GAAG,EAAuC,CAC/D,OAAO,EAAM,EAAsB,EAAK,CAG1C,SAAS,EACP,EACA,EACA,EACS,CACT,IAAI,EAAU,EACd,IAAK,IAAM,KAAQ,EAAM,CACvB,GAAI,GAAY,KACd,MAEF,EAAW,EAAyC,GAGtD,OAAO,GAAW"}
|
package/dist/pick-by.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const e=require(`./curry
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./curry.cjs`);function t(...t){return e.curry(n,t)}function n(e,t){let n={};for(let[r,i]of Object.entries(e))t(i,r,e)&&(n[r]=i);return n}exports.pickBy=t;
|
|
2
|
+
//# sourceMappingURL=pick-by.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pick-by.cjs","names":["curry"],"sources":["../src/pick-by.ts"],"sourcesContent":["import type { IsNever, Simplify } from 'type-fest';\nimport type { EnumerableStringKeyOf } from './internal/types/enumerable-string-key-of';\nimport type { EnumerableStringKeyedValueOf } from './internal/types/enumerable-string-keyed-value-of';\nimport type { IsBoundedRecord } from './internal/types/is-bounded-record';\nimport type { ToString } from './internal/types/to-string';\nimport { curry } from './curry';\n\n// When the predicate isn't a type-guard we don't know which properties would be\n// part of the output and which wouldn't so we can only safely downgrade the\n// whole object to a Partial of the input.\ntype EnumeratedPartial<T> = T extends unknown\n ? Simplify<\n IsBoundedRecord<T> extends true\n ? {\n // Object.entries returns keys as strings.\n -readonly [P in keyof T as ToString<P>]?: Required<T>[P];\n }\n : // For unbounded records (a simple Record with primitive `string` or\n // `number` keys) the return type here could technically be T; but for\n // cases where the record is unbounded but is more complex (like\n // `symbol` keys) we want to \"reconstruct\" the record from just its\n // enumerable components (which are the ones accessible via\n // `Object.entries`).\n Record<EnumerableStringKeyOf<T>, EnumerableStringKeyedValueOf<T>>\n >\n : never;\n\n// When the predicate is a type-guard we have more information to work with when\n// constructing the type of the output object. We can safely remove any property\n// which value would never come up true for the predicate, AND we can also\n// assume that properties that match the predicate perfectly would **always**\n// show up in the output object. Hence to build the output object we need to\n// build and merge 2 output objects: One for the properties which have a value\n// of at type that would always yield a `true` result from the predicate, these\n// are the \"matches\", which would not change the \"optionality\" of the input\n// object's props, and one for partial matches which would also make the props\n// optional (as they could have a value that would be filtered out).\ntype EnumeratedPartialNarrowed<T, S> = T extends unknown\n ? Simplify<\n IsBoundedRecord<T> extends true\n ? ExactProps<T, S> & PartialProps<T, S>\n : // For unbounded records we need to \"reconstruct\" the record and\n // narrow the value types. Similar to the non-narrowed case, we need\n // to also ignore `symbol` keys and any values that are only relevant\n // to them.\n Record<\n EnumerableStringKeyOf<T>,\n Extract<EnumerableStringKeyedValueOf<T>, S>\n >\n >\n : never;\n\n// The exact case, props here would always be part of the output object\ntype ExactProps<T, S> = {\n // Object.entries returns keys as strings.\n -readonly [P in keyof T as ToString<\n IsExactProp<T, P, S> extends true ? P : never\n >]: Extract<Required<T>[P], S>;\n};\n\n// The partial case, props here might be part of the output object, but might\n// not be, hence they are optional.\ntype PartialProps<T, S> = {\n // Object.entries returns keys as strings.\n -readonly [P in keyof T as ToString<\n IsPartialProp<T, P, S> extends true ? P : never\n >]?: IsNever<Extract<T[P], S>> extends true\n ? // If the result of extracting S from T[P] is never but S still extends\n // it, it means that T[P] is too wide and S can't be extracted from it:\n // e.g. if T[P] is `number` S is `1` then `Extract<number, 1> === never`.\n // For these cases we can return S directly as the type as it's already\n // very narrowed compared to T[P].\n S extends T[P]\n ? S\n : never\n : Extract<T[P], S>;\n};\n\n// If the input object's value type extends itself when the type-guard is\n// extracted from it we can safely assume that the predicate would always return\n// true for any value of that property.\ntype IsExactProp<T, P extends keyof T, S>\n = T[P] extends Extract<T[P], S> ? true : false;\n\n// ...and if the input object's value type isn't an exact match, but still has\n// some partial match (i.g. the extracted type-guard isn't completely disjoint)\n// then we can assume that the property can sometimes return true, and sometimes\n// false when passed to the predicate, hence it should be optional in the\n// output.\ntype IsPartialProp<T, P extends keyof T, S>\n = IsExactProp<T, P, S> extends true\n ? false\n : IsNever<Extract<T[P], S>> extends true\n ? S extends T[P]\n ? // If the result of extracting S from T[P] is never but S still\n // extends it, it means that T[P] is too wide and S can't be\n // extracted from it: e.g. if T[P] is `number` S is `1` then\n // `Extract<number, 1> === never`, but `1` extends `number`. We need\n // to handle these cases when we extract the value too (see above).\n true\n : false\n : true;\n\n/**\n * Iterates over the entries of `data` and reconstructs the object using only\n * entries that `predicate` accepts. Symbol keys are not passed to the predicate\n * and would be filtered out from the output object.\n *\n * See `omitBy` for a complementary function which starts with a shallow copy of\n * the input object and removes the entries that the predicate rejects. Because\n * it is subtractive symbol keys would be copied over to the output object.\n * See also `entries`, `filter`, and `fromEntries` which could be used to build\n * your own version of `pickBy` if you need more control (though the resulting\n * type might be less precise).\n *\n * @param data - The target object.\n * @param predicate - A function that takes the value, key, and the data itself\n * and returns true if the entry should be part of the output object, or `false`\n * to remove it. If the function is a type-guard on the value the output type\n * would be narrowed accordingly.\n * @returns A shallow copy of the input object with the rejected entries\n * removed.\n * @signature pickBy(data, predicate)\n * @example\n * pickBy({a: 1, b: 2, A: 3, B: 4}, (val, key) => key.toUpperCase() === key) // => {A: 3, B: 4}\n * @dataFirst\n * @category Object\n */\nexport function pickBy<\n T extends object,\n S extends EnumerableStringKeyedValueOf<T>,\n>(\n data: T,\n predicate: (\n value: EnumerableStringKeyedValueOf<T>,\n key: EnumerableStringKeyOf<T>,\n data: T,\n ) => value is S,\n): EnumeratedPartialNarrowed<T, S>;\nexport function pickBy<T extends object>(\n data: T,\n predicate: (\n value: EnumerableStringKeyedValueOf<T>,\n key: EnumerableStringKeyOf<T>,\n data: T,\n ) => boolean,\n): EnumeratedPartial<T>;\n\n/**\n * Iterates over the entries of `data` and reconstructs the object using only\n * entries that `predicate` accepts. Symbol keys are not passed to the predicate\n * and would be filtered out from the output object.\n *\n * See `omitBy` for a complementary function which starts with a shallow copy of\n * the input object and removes the entries that the predicate rejects. Because\n * it is subtractive symbol keys would be copied over to the output object.\n * See also `entries`, `filter`, and `fromEntries` which could be used to build\n * your own version of `pickBy` if you need more control (though the resulting\n * type might be less precise).\n *\n * @param predicate - A function that takes the value, key, and the data itself\n * and returns true if the entry should be part of the output object, or `false`\n * to remove it. If the function is a type-guard on the value the output type\n * would be narrowed accordingly.\n * @signature\n * pickBy(predicate)(data)\n * @example\n * pipe({a: 1, b: 2, A: 3, B: 4}, pickBy((val, key) => key.toUpperCase() === key)); // => {A: 3, B: 4}\n * @dataLast\n * @category Object\n */\nexport function pickBy<\n T extends object,\n S extends EnumerableStringKeyedValueOf<T>,\n>(\n predicate: (\n value: EnumerableStringKeyedValueOf<T>,\n key: EnumerableStringKeyOf<T>,\n data: T,\n ) => value is S,\n): (data: T) => EnumeratedPartialNarrowed<T, S>;\nexport function pickBy<T extends object>(\n predicate: (\n value: EnumerableStringKeyedValueOf<T>,\n key: EnumerableStringKeyOf<T>,\n data: T,\n ) => boolean,\n): (data: T) => EnumeratedPartial<T>;\n\nexport function pickBy(...args: ReadonlyArray<unknown>): unknown {\n return curry(pickByImplementation, args);\n}\n\nfunction pickByImplementation<T extends object>(\n data: T,\n predicate: (value: unknown, key: string, data: T) => boolean,\n): Record<string, unknown> {\n const out: Partial<Record<string, unknown>> = {};\n\n for (const [key, value] of Object.entries(data)) {\n if (predicate(value, key, data)) {\n out[key] = value;\n }\n }\n\n return out;\n}\n"],"mappings":"kGA6LA,SAAgB,EAAO,GAAG,EAAuC,CAC/D,OAAOA,EAAAA,MAAM,EAAsB,EAAK,CAG1C,SAAS,EACP,EACA,EACyB,CACzB,IAAM,EAAwC,EAAE,CAEhD,IAAK,GAAM,CAAC,EAAK,KAAU,OAAO,QAAQ,EAAK,CACzC,EAAU,EAAO,EAAK,EAAK,GAC7B,EAAI,GAAO,GAIf,OAAO"}
|
package/dist/pick-by.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{curry as e}from"./curry.js";function t(...t){return e(n,t)}function n(e,t){let n={};for(let[r,i]of Object.entries(e))t(i,r,e)&&(n[r]=i);return n}export{t as pickBy};
|
|
2
2
|
//# sourceMappingURL=pick-by.js.map
|
package/dist/pick-by.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pick-by.js","names":[
|
|
1
|
+
{"version":3,"file":"pick-by.js","names":[],"sources":["../src/pick-by.ts"],"sourcesContent":["import type { IsNever, Simplify } from 'type-fest';\nimport type { EnumerableStringKeyOf } from './internal/types/enumerable-string-key-of';\nimport type { EnumerableStringKeyedValueOf } from './internal/types/enumerable-string-keyed-value-of';\nimport type { IsBoundedRecord } from './internal/types/is-bounded-record';\nimport type { ToString } from './internal/types/to-string';\nimport { curry } from './curry';\n\n// When the predicate isn't a type-guard we don't know which properties would be\n// part of the output and which wouldn't so we can only safely downgrade the\n// whole object to a Partial of the input.\ntype EnumeratedPartial<T> = T extends unknown\n ? Simplify<\n IsBoundedRecord<T> extends true\n ? {\n // Object.entries returns keys as strings.\n -readonly [P in keyof T as ToString<P>]?: Required<T>[P];\n }\n : // For unbounded records (a simple Record with primitive `string` or\n // `number` keys) the return type here could technically be T; but for\n // cases where the record is unbounded but is more complex (like\n // `symbol` keys) we want to \"reconstruct\" the record from just its\n // enumerable components (which are the ones accessible via\n // `Object.entries`).\n Record<EnumerableStringKeyOf<T>, EnumerableStringKeyedValueOf<T>>\n >\n : never;\n\n// When the predicate is a type-guard we have more information to work with when\n// constructing the type of the output object. We can safely remove any property\n// which value would never come up true for the predicate, AND we can also\n// assume that properties that match the predicate perfectly would **always**\n// show up in the output object. Hence to build the output object we need to\n// build and merge 2 output objects: One for the properties which have a value\n// of at type that would always yield a `true` result from the predicate, these\n// are the \"matches\", which would not change the \"optionality\" of the input\n// object's props, and one for partial matches which would also make the props\n// optional (as they could have a value that would be filtered out).\ntype EnumeratedPartialNarrowed<T, S> = T extends unknown\n ? Simplify<\n IsBoundedRecord<T> extends true\n ? ExactProps<T, S> & PartialProps<T, S>\n : // For unbounded records we need to \"reconstruct\" the record and\n // narrow the value types. Similar to the non-narrowed case, we need\n // to also ignore `symbol` keys and any values that are only relevant\n // to them.\n Record<\n EnumerableStringKeyOf<T>,\n Extract<EnumerableStringKeyedValueOf<T>, S>\n >\n >\n : never;\n\n// The exact case, props here would always be part of the output object\ntype ExactProps<T, S> = {\n // Object.entries returns keys as strings.\n -readonly [P in keyof T as ToString<\n IsExactProp<T, P, S> extends true ? P : never\n >]: Extract<Required<T>[P], S>;\n};\n\n// The partial case, props here might be part of the output object, but might\n// not be, hence they are optional.\ntype PartialProps<T, S> = {\n // Object.entries returns keys as strings.\n -readonly [P in keyof T as ToString<\n IsPartialProp<T, P, S> extends true ? P : never\n >]?: IsNever<Extract<T[P], S>> extends true\n ? // If the result of extracting S from T[P] is never but S still extends\n // it, it means that T[P] is too wide and S can't be extracted from it:\n // e.g. if T[P] is `number` S is `1` then `Extract<number, 1> === never`.\n // For these cases we can return S directly as the type as it's already\n // very narrowed compared to T[P].\n S extends T[P]\n ? S\n : never\n : Extract<T[P], S>;\n};\n\n// If the input object's value type extends itself when the type-guard is\n// extracted from it we can safely assume that the predicate would always return\n// true for any value of that property.\ntype IsExactProp<T, P extends keyof T, S>\n = T[P] extends Extract<T[P], S> ? true : false;\n\n// ...and if the input object's value type isn't an exact match, but still has\n// some partial match (i.g. the extracted type-guard isn't completely disjoint)\n// then we can assume that the property can sometimes return true, and sometimes\n// false when passed to the predicate, hence it should be optional in the\n// output.\ntype IsPartialProp<T, P extends keyof T, S>\n = IsExactProp<T, P, S> extends true\n ? false\n : IsNever<Extract<T[P], S>> extends true\n ? S extends T[P]\n ? // If the result of extracting S from T[P] is never but S still\n // extends it, it means that T[P] is too wide and S can't be\n // extracted from it: e.g. if T[P] is `number` S is `1` then\n // `Extract<number, 1> === never`, but `1` extends `number`. We need\n // to handle these cases when we extract the value too (see above).\n true\n : false\n : true;\n\n/**\n * Iterates over the entries of `data` and reconstructs the object using only\n * entries that `predicate` accepts. Symbol keys are not passed to the predicate\n * and would be filtered out from the output object.\n *\n * See `omitBy` for a complementary function which starts with a shallow copy of\n * the input object and removes the entries that the predicate rejects. Because\n * it is subtractive symbol keys would be copied over to the output object.\n * See also `entries`, `filter`, and `fromEntries` which could be used to build\n * your own version of `pickBy` if you need more control (though the resulting\n * type might be less precise).\n *\n * @param data - The target object.\n * @param predicate - A function that takes the value, key, and the data itself\n * and returns true if the entry should be part of the output object, or `false`\n * to remove it. If the function is a type-guard on the value the output type\n * would be narrowed accordingly.\n * @returns A shallow copy of the input object with the rejected entries\n * removed.\n * @signature pickBy(data, predicate)\n * @example\n * pickBy({a: 1, b: 2, A: 3, B: 4}, (val, key) => key.toUpperCase() === key) // => {A: 3, B: 4}\n * @dataFirst\n * @category Object\n */\nexport function pickBy<\n T extends object,\n S extends EnumerableStringKeyedValueOf<T>,\n>(\n data: T,\n predicate: (\n value: EnumerableStringKeyedValueOf<T>,\n key: EnumerableStringKeyOf<T>,\n data: T,\n ) => value is S,\n): EnumeratedPartialNarrowed<T, S>;\nexport function pickBy<T extends object>(\n data: T,\n predicate: (\n value: EnumerableStringKeyedValueOf<T>,\n key: EnumerableStringKeyOf<T>,\n data: T,\n ) => boolean,\n): EnumeratedPartial<T>;\n\n/**\n * Iterates over the entries of `data` and reconstructs the object using only\n * entries that `predicate` accepts. Symbol keys are not passed to the predicate\n * and would be filtered out from the output object.\n *\n * See `omitBy` for a complementary function which starts with a shallow copy of\n * the input object and removes the entries that the predicate rejects. Because\n * it is subtractive symbol keys would be copied over to the output object.\n * See also `entries`, `filter`, and `fromEntries` which could be used to build\n * your own version of `pickBy` if you need more control (though the resulting\n * type might be less precise).\n *\n * @param predicate - A function that takes the value, key, and the data itself\n * and returns true if the entry should be part of the output object, or `false`\n * to remove it. If the function is a type-guard on the value the output type\n * would be narrowed accordingly.\n * @signature\n * pickBy(predicate)(data)\n * @example\n * pipe({a: 1, b: 2, A: 3, B: 4}, pickBy((val, key) => key.toUpperCase() === key)); // => {A: 3, B: 4}\n * @dataLast\n * @category Object\n */\nexport function pickBy<\n T extends object,\n S extends EnumerableStringKeyedValueOf<T>,\n>(\n predicate: (\n value: EnumerableStringKeyedValueOf<T>,\n key: EnumerableStringKeyOf<T>,\n data: T,\n ) => value is S,\n): (data: T) => EnumeratedPartialNarrowed<T, S>;\nexport function pickBy<T extends object>(\n predicate: (\n value: EnumerableStringKeyedValueOf<T>,\n key: EnumerableStringKeyOf<T>,\n data: T,\n ) => boolean,\n): (data: T) => EnumeratedPartial<T>;\n\nexport function pickBy(...args: ReadonlyArray<unknown>): unknown {\n return curry(pickByImplementation, args);\n}\n\nfunction pickByImplementation<T extends object>(\n data: T,\n predicate: (value: unknown, key: string, data: T) => boolean,\n): Record<string, unknown> {\n const out: Partial<Record<string, unknown>> = {};\n\n for (const [key, value] of Object.entries(data)) {\n if (predicate(value, key, data)) {\n out[key] = value;\n }\n }\n\n return out;\n}\n"],"mappings":"mCA6LA,SAAgB,EAAO,GAAG,EAAuC,CAC/D,OAAO,EAAM,EAAsB,EAAK,CAG1C,SAAS,EACP,EACA,EACyB,CACzB,IAAM,EAAwC,EAAE,CAEhD,IAAK,GAAM,CAAC,EAAK,KAAU,OAAO,QAAQ,EAAK,CACzC,EAAU,EAAO,EAAK,EAAK,GAC7B,EAAI,GAAO,GAIf,OAAO"}
|
package/dist/pick.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const e=require(`./curry
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./curry.cjs`);function t(...t){return e.curry(n,t)}function n(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}exports.pick=t;
|
|
2
|
+
//# sourceMappingURL=pick.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pick.cjs","names":["curry"],"sources":["../src/pick.ts"],"sourcesContent":["import type { EmptyObject, IsNever, KeysOfUnion, Writable } from 'type-fest';\nimport type { IsBounded } from './internal/types/is-bounded';\nimport type { IsBoundedRecord } from './internal/types/is-bounded-record';\nimport type { PartitionByUnion } from './internal/types/partition-by-union';\nimport type { TupleParts } from './internal/types/tuple-parts';\nimport { curry } from './curry';\n\ntype PickFromArray<T, Keys extends ReadonlyArray<KeysOfUnion<T>>>\n // Distribute unions for both object types and key arrays.\n = T extends unknown\n ? Keys extends unknown\n ? // When T is a union (or when Keys is empty) the picked props might\n // not exist in some of its sub-types, e.g.,\n // `pick(... as { a: string } | { b: number }, ['a'])`,\n // if we simply let the regular \"constructive\" logic run, the\n // resulting type would be `{}` which doesn't behave like an empty\n // object! instead, we want to use a more explicit *empty* type.\n IsNever<Extract<Keys[number], keyof T>> extends true\n ? EmptyObject\n : // Remove `readonly` modifiers from picked props since we return a\n // new, mutable, object. We don't wrap the result with `Simplify` to\n // flatten it because `Writable` does the same thing implicitly.\n Writable<\n IsBoundedRecord<T> extends true\n ? PickBoundedFromArray<T, Keys>\n : PickUnbounded<T, Extract<Keys[number], keyof T>>\n >\n : never\n : never;\n\n/**\n * Bounded records have bounded keys and result in a bounded output. The only\n * question left is whether to add the prop as-is, or make it optional. This\n * can be determined by the part of the keys array the prop is defined in, and\n * the way that element is defined: if the array contains a singular literal\n * key in either the required prefix or the suffix, we know that prop should be\n * picked as-is, otherwise, the key might not be present in the keys array so it\n * can only be picked optionally.\n */\ntype PickBoundedFromArray<T, Keys extends ReadonlyArray<KeysOfUnion<T>>>\n // Literal keys in the prefix/suffix are guaranteed present.\n = Pick<\n T,\n // When T is a union the keys need to be narrowed to just those that are\n // keys of the specific sub-type being built\n Extract<\n | PartitionByUnion<TupleParts<Keys>['required']>['singular']\n | PartitionByUnion<TupleParts<Keys>['suffix']>['singular'],\n keyof T\n >\n >\n // Union keys, optional elements, and rest elements are optional.\n & Partial<\n Pick<\n T,\n // When T is a union the keys need to be narrowed to just those that are\n // keys of the specific sub-type being built.\n Extract<\n | PartitionByUnion<TupleParts<Keys>['required']>['union']\n // TODO: the optional part of the keys array will always be empty because its impossible to provide the pick function with a tuple with optional elements; this is because optional elements are always implicitly `undefined` too; which breaks the constraint that all keys are keys of T (`undefined` is not a key of anything). We can lift this restriction by supporting `undefined` in the runtime and relaxing the type constraint to allow it, but this relaxed constraint enables a niche feature (optional tuple elements) at the expense of better type-safety for the more common cases of fixed tuples and arrays. Anyway... if we ever change it, this part of the output type will ensure the output is still correct:\n | TupleParts<Keys>['optional'][number]\n | TupleParts<Keys>['item']\n | PartitionByUnion<TupleParts<Keys>['suffix']>['union'],\n keyof T\n >\n >\n >;\n\n/**\n * The built-in `Pick` is weird when it comes to picking bounded keys from\n * unbounded records. It reconstructs the output object regardless of the shape\n * of the input: `Pick<Record<string, \"world\">, \"hello\">` results in the type\n * `{ hello: \"world\" }`, but you'd expect it to be optional because we don't\n * know if the record contains a `hello` prop or not!\n *\n * !Important: We assume T is unbounded and don't test for it!\n *\n * See: https://www.typescriptlang.org/play/?#code/PTAEE0HsFcHIBNQFMAeAHJBjALqAGqNpKAEZKigAGA3qABZIA2jkA-AFygBEA7pAE6N4XUAF9KAGlLRcAQ0ayAzgChsATwz5QAXlAAFAJaYA1gB4ASlgHxTi7PwMA7AOZTeAoVwB8bhs0jeANzKIBSgAHqsykA.\n */\ntype PickUnbounded<T, Keys extends keyof T>\n = IsBounded<Keys> extends true ? Partial<Pick<T, Keys>> : Pick<T, Keys>;\n\n/**\n * Creates an object composed of the picked `data` properties.\n *\n * @param keys - The property names.\n * @signature pick([prop1, prop2])(object)\n * @example\n * pipe({ a: 1, b: 2, c: 3, d: 4 }, pick(['a', 'd'])) // => { a: 1, d: 4 }\n * @dataLast\n * @category Object\n */\nexport function pick<\n T extends object,\n const Keys extends ReadonlyArray<KeysOfUnion<T>>,\n>(keys: Keys): (data: T) => PickFromArray<T, Keys>;\n\n/**\n * Creates an object composed of the picked `data` properties.\n *\n * @param data - The target object.\n * @param keys - The property names.\n * @signature pick(object, [prop1, prop2])\n * @example\n * pick({ a: 1, b: 2, c: 3, d: 4 }, ['a', 'd']) // => { a: 1, d: 4 }\n * @dataFirst\n * @category Object\n */\nexport function pick<\n T extends object,\n const Keys extends ReadonlyArray<KeysOfUnion<T>>,\n>(data: T, keys: Keys): PickFromArray<T, Keys>;\n\nexport function pick(...args: ReadonlyArray<unknown>): unknown {\n return curry(pickImplementation, args);\n}\n\nfunction pickImplementation<\n T extends object,\n Keys extends ReadonlyArray<keyof T>,\n>(object: T, keys: Keys): PickFromArray<T, Keys> {\n const out: Partial<Pick<T, Keys[number]>> = {};\n for (const key of keys) {\n if (key in object) {\n out[key] = object[key];\n }\n }\n // @ts-expect-error [ts2322] - We build the type incrementally, there's no way to make typescript infer that we \"finished\" building the object and to treat it as such.\n return out;\n}\n"],"mappings":"kGAiHA,SAAgB,EAAK,GAAG,EAAuC,CAC7D,OAAOA,EAAAA,MAAM,EAAoB,EAAK,CAGxC,SAAS,EAGP,EAAW,EAAoC,CAC/C,IAAM,EAAsC,EAAE,CAC9C,IAAK,IAAM,KAAO,EACZ,KAAO,IACT,EAAI,GAAO,EAAO,IAItB,OAAO"}
|
package/dist/pick.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{curry as e}from"./curry.js";function t(...t){return e(n,t)}function n(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}export{t as pick};
|
|
2
2
|
//# sourceMappingURL=pick.js.map
|
package/dist/pick.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pick.js","names":[
|
|
1
|
+
{"version":3,"file":"pick.js","names":[],"sources":["../src/pick.ts"],"sourcesContent":["import type { EmptyObject, IsNever, KeysOfUnion, Writable } from 'type-fest';\nimport type { IsBounded } from './internal/types/is-bounded';\nimport type { IsBoundedRecord } from './internal/types/is-bounded-record';\nimport type { PartitionByUnion } from './internal/types/partition-by-union';\nimport type { TupleParts } from './internal/types/tuple-parts';\nimport { curry } from './curry';\n\ntype PickFromArray<T, Keys extends ReadonlyArray<KeysOfUnion<T>>>\n // Distribute unions for both object types and key arrays.\n = T extends unknown\n ? Keys extends unknown\n ? // When T is a union (or when Keys is empty) the picked props might\n // not exist in some of its sub-types, e.g.,\n // `pick(... as { a: string } | { b: number }, ['a'])`,\n // if we simply let the regular \"constructive\" logic run, the\n // resulting type would be `{}` which doesn't behave like an empty\n // object! instead, we want to use a more explicit *empty* type.\n IsNever<Extract<Keys[number], keyof T>> extends true\n ? EmptyObject\n : // Remove `readonly` modifiers from picked props since we return a\n // new, mutable, object. We don't wrap the result with `Simplify` to\n // flatten it because `Writable` does the same thing implicitly.\n Writable<\n IsBoundedRecord<T> extends true\n ? PickBoundedFromArray<T, Keys>\n : PickUnbounded<T, Extract<Keys[number], keyof T>>\n >\n : never\n : never;\n\n/**\n * Bounded records have bounded keys and result in a bounded output. The only\n * question left is whether to add the prop as-is, or make it optional. This\n * can be determined by the part of the keys array the prop is defined in, and\n * the way that element is defined: if the array contains a singular literal\n * key in either the required prefix or the suffix, we know that prop should be\n * picked as-is, otherwise, the key might not be present in the keys array so it\n * can only be picked optionally.\n */\ntype PickBoundedFromArray<T, Keys extends ReadonlyArray<KeysOfUnion<T>>>\n // Literal keys in the prefix/suffix are guaranteed present.\n = Pick<\n T,\n // When T is a union the keys need to be narrowed to just those that are\n // keys of the specific sub-type being built\n Extract<\n | PartitionByUnion<TupleParts<Keys>['required']>['singular']\n | PartitionByUnion<TupleParts<Keys>['suffix']>['singular'],\n keyof T\n >\n >\n // Union keys, optional elements, and rest elements are optional.\n & Partial<\n Pick<\n T,\n // When T is a union the keys need to be narrowed to just those that are\n // keys of the specific sub-type being built.\n Extract<\n | PartitionByUnion<TupleParts<Keys>['required']>['union']\n // TODO: the optional part of the keys array will always be empty because its impossible to provide the pick function with a tuple with optional elements; this is because optional elements are always implicitly `undefined` too; which breaks the constraint that all keys are keys of T (`undefined` is not a key of anything). We can lift this restriction by supporting `undefined` in the runtime and relaxing the type constraint to allow it, but this relaxed constraint enables a niche feature (optional tuple elements) at the expense of better type-safety for the more common cases of fixed tuples and arrays. Anyway... if we ever change it, this part of the output type will ensure the output is still correct:\n | TupleParts<Keys>['optional'][number]\n | TupleParts<Keys>['item']\n | PartitionByUnion<TupleParts<Keys>['suffix']>['union'],\n keyof T\n >\n >\n >;\n\n/**\n * The built-in `Pick` is weird when it comes to picking bounded keys from\n * unbounded records. It reconstructs the output object regardless of the shape\n * of the input: `Pick<Record<string, \"world\">, \"hello\">` results in the type\n * `{ hello: \"world\" }`, but you'd expect it to be optional because we don't\n * know if the record contains a `hello` prop or not!\n *\n * !Important: We assume T is unbounded and don't test for it!\n *\n * See: https://www.typescriptlang.org/play/?#code/PTAEE0HsFcHIBNQFMAeAHJBjALqAGqNpKAEZKigAGA3qABZIA2jkA-AFygBEA7pAE6N4XUAF9KAGlLRcAQ0ayAzgChsATwz5QAXlAAFAJaYA1gB4ASlgHxTi7PwMA7AOZTeAoVwB8bhs0jeANzKIBSgAHqsykA.\n */\ntype PickUnbounded<T, Keys extends keyof T>\n = IsBounded<Keys> extends true ? Partial<Pick<T, Keys>> : Pick<T, Keys>;\n\n/**\n * Creates an object composed of the picked `data` properties.\n *\n * @param keys - The property names.\n * @signature pick([prop1, prop2])(object)\n * @example\n * pipe({ a: 1, b: 2, c: 3, d: 4 }, pick(['a', 'd'])) // => { a: 1, d: 4 }\n * @dataLast\n * @category Object\n */\nexport function pick<\n T extends object,\n const Keys extends ReadonlyArray<KeysOfUnion<T>>,\n>(keys: Keys): (data: T) => PickFromArray<T, Keys>;\n\n/**\n * Creates an object composed of the picked `data` properties.\n *\n * @param data - The target object.\n * @param keys - The property names.\n * @signature pick(object, [prop1, prop2])\n * @example\n * pick({ a: 1, b: 2, c: 3, d: 4 }, ['a', 'd']) // => { a: 1, d: 4 }\n * @dataFirst\n * @category Object\n */\nexport function pick<\n T extends object,\n const Keys extends ReadonlyArray<KeysOfUnion<T>>,\n>(data: T, keys: Keys): PickFromArray<T, Keys>;\n\nexport function pick(...args: ReadonlyArray<unknown>): unknown {\n return curry(pickImplementation, args);\n}\n\nfunction pickImplementation<\n T extends object,\n Keys extends ReadonlyArray<keyof T>,\n>(object: T, keys: Keys): PickFromArray<T, Keys> {\n const out: Partial<Pick<T, Keys[number]>> = {};\n for (const key of keys) {\n if (key in object) {\n out[key] = object[key];\n }\n }\n // @ts-expect-error [ts2322] - We build the type incrementally, there's no way to make typescript infer that we \"finished\" building the object and to treat it as such.\n return out;\n}\n"],"mappings":"mCAiHA,SAAgB,EAAK,GAAG,EAAuC,CAC7D,OAAO,EAAM,EAAoB,EAAK,CAGxC,SAAS,EAGP,EAAW,EAAoC,CAC/C,IAAM,EAAsC,EAAE,CAC9C,IAAK,IAAM,KAAO,EACZ,KAAO,IACT,EAAI,GAAO,EAAO,IAItB,OAAO"}
|
package/dist/pipe.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const e=require(`./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./utility-evaluators-C8koSp9T.cjs`);function t(e,...t){let a=e,o=t.map(e=>`lazy`in e?r(e):void 0),s=0;for(;s<t.length;){if(o[s]===void 0||!i(a)){let e=t[s];a=e(a),s+=1;continue}let e=[];for(let n=s;n<t.length;n++){let t=o[n];if(t===void 0||(e.push(t),t.isSingle))break}let r=[];for(let t of a)if(n(t,r,e))break;let{isSingle:c}=e.at(-1);a=c?r[0]:r,s+=e.length}return a}function n(t,r,i){if(i.length===0)return r.push(t),!1;let a=t,o=e.t,s=!1;for(let[e,t]of i.entries()){let{index:c,items:l}=t;if(l.push(a),o=t(a,c,l),t.index+=1,o.hasNext){if(o.hasMany??!1){for(let t of o.next)if(n(t,r,i.slice(e+1)))return!0;return s}a=o.next}if(!o.hasNext)break;o.done&&(s=!0)}return o.hasNext&&r.push(a),s}function r(e){let{lazy:t,lazyArgs:n}=e,r=t(...n);return Object.assign(r,{isSingle:t.single??!1,index:0,items:[]})}function i(e){return typeof e==`string`||typeof e==`object`&&!!e&&Symbol.iterator in e}exports.pipe=t;
|
|
2
|
+
//# sourceMappingURL=pipe.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipe.cjs","names":["SKIP_ITEM"],"sources":["../src/pipe.ts"],"sourcesContent":["/* eslint-disable ts/no-explicit-any */\n/* eslint-disable jsdoc/check-param-names -- we don't document the op params, it'd be redundant */\n\nimport type { LazyDefinition } from './internal/types/lazy-definition';\nimport type { LazyEvaluator } from './internal/types/lazy-evaluator';\nimport type { LazyResult } from './internal/types/lazy-result';\nimport { SKIP_ITEM } from './internal/utility-evaluators';\n\ntype PreparedLazyFunction = LazyEvaluator & {\n readonly isSingle: boolean;\n\n // These are intentionally mutable, they maintain the lazy piped state.\n index: number;\n items: Array<unknown>;\n};\n\ntype LazyFunction = LazyDefinition & ((input: unknown) => unknown);\n\n/**\n * Performs left-to-right function composition, passing data through functions\n * in sequence. Each function receives the output of the previous function,\n * creating a readable top-to-bottom data flow that matches how the\n * transformation is executed. This enables converting deeply nested function\n * calls into clear, sequential steps without temporary variables.\n *\n * When consecutive functions with a `lazy` tag (e.g., `map`, `filter`, `take`,\n * `drop`, `forEach`, etc...) are used together, they process data item-by-item\n * rather than creating intermediate arrays. This enables early termination\n * when only partial results are needed, improving performance for large\n * datasets and expensive operations.\n *\n * Functions are only evaluated lazily when their data-last form is used\n * directly in the pipe. To disable lazy evaluation, use data-first calls via\n * arrow functions: `($) => map($, callback)` instead of `map(callback)`.\n *\n * Any function can be used in pipes, not just Perkakas utilities. For creating\n * custom functions with currying and lazy evaluation support, see the `curry`\n * utility.\n *\n * A \"headless\" variant `piped` is available for creating reusable pipe\n * functions without initial data.\n *\n * IMPORTANT: During lazy evaluation, callbacks using the third parameter (the\n * input array) receive only items processed up to that point, not the complete\n * array.\n *\n * @param data - The input data.\n * @param functions - A sequence of functions that take one argument and\n * return a value.\n * @signature\n * pipe(data, ...functions);\n * @example\n * pipe([1, 2, 3], map(multiply(3))); //=> [3, 6, 9]\n *\n * // = Early termination with lazy evaluation =\n * pipe(\n * hugeArray,\n * map(expensiveComputation),\n * filter(complexPredicate),\n * // Only processes items until 2 results are found, then stops.\n * // Most of hugeArray never gets processed.\n * take(2),\n * );\n *\n * // = Custom logic within a pipe =\n * pipe(\n * input,\n * toLowerCase(),\n * normalize,\n * ($) => validate($, CONFIG),\n * split(\",\"),\n * unique(),\n * );\n *\n * // = Migrating nested transformations to pipes =\n * // Nested\n * const result = prop(\n * mapValues(groupByProp(users, \"department\"), length()),\n * \"engineering\",\n * );\n *\n * // Piped\n * const result = pipe(\n * users,\n * groupByProp(\"department\"),\n * mapValues(length()),\n * prop(\"engineering\"),\n * );\n *\n * // = Using the 3rd param of a callback =\n * // The following would print out `data` in its entirety for each value\n * // of `data`.\n * forEach([1, 2, 3, 4], (_item, _index, data) => {\n * console.log(data);\n * }); //=> \"[1, 2, 3, 4]\" logged 4 times\n *\n * // But with `pipe` data would only contain the items up to the current\n * // index\n * pipe([1, 2, 3, 4], forEach((_item, _index, data) => {\n * console.log(data);\n * })); //=> \"[1]\", \"[1, 2]\", \"[1, 2, 3]\", \"[1, 2, 3, 4]\"\n * @dataFirst\n * @category Function\n */\nexport function pipe<A>(data: A): A;\n\nexport function pipe<A, B>(data: A, funcA: (input: A) => B): B;\n\nexport function pipe<A, B, C>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n): C;\n\nexport function pipe<A, B, C, D>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n): D;\n\nexport function pipe<A, B, C, D, E>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n): E;\n\nexport function pipe<A, B, C, D, E, F>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n): F;\n\nexport function pipe<A, B, C, D, E, F, G>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n): G;\n\nexport function pipe<A, B, C, D, E, F, G, H>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n): H;\n\nexport function pipe<A, B, C, D, E, F, G, H, I>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n): I;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n): J;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J, K>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n): K;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J, K, L>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n): L;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n): M;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n funcM: (input: M) => N,\n): N;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n funcM: (input: M) => N,\n funcN: (input: N) => O,\n): O;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n funcM: (input: M) => N,\n funcN: (input: N) => O,\n funcO: (input: O) => P,\n): P;\n\nexport function pipe(\n input: unknown,\n ...functions: ReadonlyArray<LazyFunction | ((value: any) => unknown)>\n): any {\n let output = input;\n\n const lazyFunctions = functions.map((op) =>\n 'lazy' in op ? prepareLazyFunction(op) : undefined);\n\n let functionIndex = 0;\n while (functionIndex < functions.length) {\n const lazyFunction = lazyFunctions[functionIndex];\n if (lazyFunction === undefined || !isIterable(output)) {\n const func = functions[functionIndex]!;\n output = func(output);\n functionIndex += 1;\n continue;\n }\n\n const lazySequence: Array<PreparedLazyFunction> = [];\n for (let index = functionIndex; index < functions.length; index++) {\n const lazyOp = lazyFunctions[index];\n if (lazyOp === undefined) {\n break;\n }\n\n lazySequence.push(lazyOp);\n if (lazyOp.isSingle) {\n break;\n }\n }\n\n const accumulator: Array<unknown> = [];\n\n for (const value of output) {\n const shouldExitEarly = processItem(value, accumulator, lazySequence);\n if (shouldExitEarly) {\n break;\n }\n }\n\n const { isSingle } = lazySequence.at(-1)!;\n output = isSingle ? accumulator[0] : accumulator;\n functionIndex += lazySequence.length;\n }\n return output;\n}\n\nfunction processItem(\n item: unknown,\n accumulator: Array<unknown>,\n lazySequence: ReadonlyArray<PreparedLazyFunction>,\n): boolean {\n if (lazySequence.length === 0) {\n accumulator.push(item);\n return false;\n }\n\n let currentItem = item;\n\n let lazyResult: LazyResult<any> = SKIP_ITEM;\n let isDone = false;\n for (const [functionsIndex, lazyFn] of lazySequence.entries()) {\n const { index, items } = lazyFn;\n items.push(currentItem);\n lazyResult = lazyFn(currentItem, index, items);\n lazyFn.index += 1;\n if (lazyResult.hasNext) {\n if (lazyResult.hasMany ?? false) {\n for (const subItem of lazyResult.next as ReadonlyArray<unknown>) {\n const subResult = processItem(\n subItem,\n accumulator,\n lazySequence.slice(functionsIndex + 1),\n );\n if (subResult) {\n return true;\n }\n }\n return isDone;\n }\n currentItem = lazyResult.next;\n }\n if (!lazyResult.hasNext) {\n break;\n }\n // process remaining functions in the pipe\n // but don't process remaining elements in the input array\n if (lazyResult.done) {\n isDone = true;\n }\n }\n if (lazyResult.hasNext) {\n accumulator.push(currentItem);\n }\n return isDone;\n}\n\nfunction prepareLazyFunction(func: LazyFunction): PreparedLazyFunction {\n const { lazy, lazyArgs } = func;\n const fn = lazy(...lazyArgs);\n return Object.assign(fn, {\n isSingle: lazy.single ?? false,\n index: 0,\n items: [] as Array<unknown>,\n });\n}\n\nfunction isIterable(something: unknown): something is Iterable<unknown> {\n // Check for null and undefined to avoid errors when accessing Symbol.iterator\n return (\n typeof something === 'string'\n || (typeof something === 'object'\n && something !== null\n && Symbol.iterator in something)\n );\n}\n"],"mappings":"wHA2RA,SAAgB,EACd,EACA,GAAG,EACE,CACL,IAAI,EAAS,EAEP,EAAgB,EAAU,IAAK,GACnC,SAAU,EAAK,EAAoB,EAAG,CAAG,IAAA,GAAU,CAEjD,EAAgB,EACpB,KAAO,EAAgB,EAAU,QAAQ,CAEvC,GADqB,EAAc,KACd,IAAA,IAAa,CAAC,EAAW,EAAO,CAAE,CACrD,IAAM,EAAO,EAAU,GACvB,EAAS,EAAK,EAAO,CACrB,GAAiB,EACjB,SAGF,IAAM,EAA4C,EAAE,CACpD,IAAK,IAAI,EAAQ,EAAe,EAAQ,EAAU,OAAQ,IAAS,CACjE,IAAM,EAAS,EAAc,GAM7B,GALI,IAAW,IAAA,KAIf,EAAa,KAAK,EAAO,CACrB,EAAO,UACT,MAIJ,IAAM,EAA8B,EAAE,CAEtC,IAAK,IAAM,KAAS,EAElB,GADwB,EAAY,EAAO,EAAa,EAAa,CAEnE,MAIJ,GAAM,CAAE,YAAa,EAAa,GAAG,GAAG,CACxC,EAAS,EAAW,EAAY,GAAK,EACrC,GAAiB,EAAa,OAEhC,OAAO,EAGT,SAAS,EACP,EACA,EACA,EACS,CACT,GAAI,EAAa,SAAW,EAE1B,OADA,EAAY,KAAK,EAAK,CACf,GAGT,IAAI,EAAc,EAEd,EAA8BA,EAAAA,EAC9B,EAAS,GACb,IAAK,GAAM,CAAC,EAAgB,KAAW,EAAa,SAAS,CAAE,CAC7D,GAAM,CAAE,QAAO,SAAU,EAIzB,GAHA,EAAM,KAAK,EAAY,CACvB,EAAa,EAAO,EAAa,EAAO,EAAM,CAC9C,EAAO,OAAS,EACZ,EAAW,QAAS,CACtB,GAAI,EAAW,SAAW,GAAO,CAC/B,IAAK,IAAM,KAAW,EAAW,KAM/B,GALkB,EAChB,EACA,EACA,EAAa,MAAM,EAAiB,EAAE,CACvC,CAEC,MAAO,GAGX,OAAO,EAET,EAAc,EAAW,KAE3B,GAAI,CAAC,EAAW,QACd,MAIE,EAAW,OACb,EAAS,IAMb,OAHI,EAAW,SACb,EAAY,KAAK,EAAY,CAExB,EAGT,SAAS,EAAoB,EAA0C,CACrE,GAAM,CAAE,OAAM,YAAa,EACrB,EAAK,EAAK,GAAG,EAAS,CAC5B,OAAO,OAAO,OAAO,EAAI,CACvB,SAAU,EAAK,QAAU,GACzB,MAAO,EACP,MAAO,EAAE,CACV,CAAC,CAGJ,SAAS,EAAW,EAAoD,CAEtE,OACE,OAAO,GAAc,UACjB,OAAO,GAAc,YACpB,GACA,OAAO,YAAY"}
|
package/dist/pipe.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./
|
|
1
|
+
import{t as e}from"./utility-evaluators-ZAaUtL2Z.js";function t(e,...t){let a=e,o=t.map(e=>`lazy`in e?r(e):void 0),s=0;for(;s<t.length;){if(o[s]===void 0||!i(a)){let e=t[s];a=e(a),s+=1;continue}let e=[];for(let n=s;n<t.length;n++){let t=o[n];if(t===void 0||(e.push(t),t.isSingle))break}let r=[];for(let t of a)if(n(t,r,e))break;let{isSingle:c}=e.at(-1);a=c?r[0]:r,s+=e.length}return a}function n(t,r,i){if(i.length===0)return r.push(t),!1;let a=t,o=e,s=!1;for(let[e,t]of i.entries()){let{index:c,items:l}=t;if(l.push(a),o=t(a,c,l),t.index+=1,o.hasNext){if(o.hasMany??!1){for(let t of o.next)if(n(t,r,i.slice(e+1)))return!0;return s}a=o.next}if(!o.hasNext)break;o.done&&(s=!0)}return o.hasNext&&r.push(a),s}function r(e){let{lazy:t,lazyArgs:n}=e,r=t(...n);return Object.assign(r,{isSingle:t.single??!1,index:0,items:[]})}function i(e){return typeof e==`string`||typeof e==`object`&&!!e&&Symbol.iterator in e}export{t as pipe};
|
|
2
|
+
//# sourceMappingURL=pipe.js.map
|
package/dist/pipe.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipe.js","names":[],"sources":["../src/pipe.ts"],"sourcesContent":["/* eslint-disable ts/no-explicit-any */\n/* eslint-disable jsdoc/check-param-names -- we don't document the op params, it'd be redundant */\n\nimport type { LazyDefinition } from './internal/types/lazy-definition';\nimport type { LazyEvaluator } from './internal/types/lazy-evaluator';\nimport type { LazyResult } from './internal/types/lazy-result';\nimport { SKIP_ITEM } from './internal/utility-evaluators';\n\ntype PreparedLazyFunction = LazyEvaluator & {\n readonly isSingle: boolean;\n\n // These are intentionally mutable, they maintain the lazy piped state.\n index: number;\n items: Array<unknown>;\n};\n\ntype LazyFunction = LazyDefinition & ((input: unknown) => unknown);\n\n/**\n * Performs left-to-right function composition, passing data through functions\n * in sequence. Each function receives the output of the previous function,\n * creating a readable top-to-bottom data flow that matches how the\n * transformation is executed. This enables converting deeply nested function\n * calls into clear, sequential steps without temporary variables.\n *\n * When consecutive functions with a `lazy` tag (e.g., `map`, `filter`, `take`,\n * `drop`, `forEach`, etc...) are used together, they process data item-by-item\n * rather than creating intermediate arrays. This enables early termination\n * when only partial results are needed, improving performance for large\n * datasets and expensive operations.\n *\n * Functions are only evaluated lazily when their data-last form is used\n * directly in the pipe. To disable lazy evaluation, use data-first calls via\n * arrow functions: `($) => map($, callback)` instead of `map(callback)`.\n *\n * Any function can be used in pipes, not just Perkakas utilities. For creating\n * custom functions with currying and lazy evaluation support, see the `curry`\n * utility.\n *\n * A \"headless\" variant `piped` is available for creating reusable pipe\n * functions without initial data.\n *\n * IMPORTANT: During lazy evaluation, callbacks using the third parameter (the\n * input array) receive only items processed up to that point, not the complete\n * array.\n *\n * @param data - The input data.\n * @param functions - A sequence of functions that take one argument and\n * return a value.\n * @signature\n * pipe(data, ...functions);\n * @example\n * pipe([1, 2, 3], map(multiply(3))); //=> [3, 6, 9]\n *\n * // = Early termination with lazy evaluation =\n * pipe(\n * hugeArray,\n * map(expensiveComputation),\n * filter(complexPredicate),\n * // Only processes items until 2 results are found, then stops.\n * // Most of hugeArray never gets processed.\n * take(2),\n * );\n *\n * // = Custom logic within a pipe =\n * pipe(\n * input,\n * toLowerCase(),\n * normalize,\n * ($) => validate($, CONFIG),\n * split(\",\"),\n * unique(),\n * );\n *\n * // = Migrating nested transformations to pipes =\n * // Nested\n * const result = prop(\n * mapValues(groupByProp(users, \"department\"), length()),\n * \"engineering\",\n * );\n *\n * // Piped\n * const result = pipe(\n * users,\n * groupByProp(\"department\"),\n * mapValues(length()),\n * prop(\"engineering\"),\n * );\n *\n * // = Using the 3rd param of a callback =\n * // The following would print out `data` in its entirety for each value\n * // of `data`.\n * forEach([1, 2, 3, 4], (_item, _index, data) => {\n * console.log(data);\n * }); //=> \"[1, 2, 3, 4]\" logged 4 times\n *\n * // But with `pipe` data would only contain the items up to the current\n * // index\n * pipe([1, 2, 3, 4], forEach((_item, _index, data) => {\n * console.log(data);\n * })); //=> \"[1]\", \"[1, 2]\", \"[1, 2, 3]\", \"[1, 2, 3, 4]\"\n * @dataFirst\n * @category Function\n */\nexport function pipe<A>(data: A): A;\n\nexport function pipe<A, B>(data: A, funcA: (input: A) => B): B;\n\nexport function pipe<A, B, C>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n): C;\n\nexport function pipe<A, B, C, D>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n): D;\n\nexport function pipe<A, B, C, D, E>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n): E;\n\nexport function pipe<A, B, C, D, E, F>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n): F;\n\nexport function pipe<A, B, C, D, E, F, G>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n): G;\n\nexport function pipe<A, B, C, D, E, F, G, H>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n): H;\n\nexport function pipe<A, B, C, D, E, F, G, H, I>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n): I;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n): J;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J, K>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n): K;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J, K, L>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n): L;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n): M;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n funcM: (input: M) => N,\n): N;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n funcM: (input: M) => N,\n funcN: (input: N) => O,\n): O;\n\nexport function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(\n data: A,\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n funcM: (input: M) => N,\n funcN: (input: N) => O,\n funcO: (input: O) => P,\n): P;\n\nexport function pipe(\n input: unknown,\n ...functions: ReadonlyArray<LazyFunction | ((value: any) => unknown)>\n): any {\n let output = input;\n\n const lazyFunctions = functions.map((op) =>\n 'lazy' in op ? prepareLazyFunction(op) : undefined);\n\n let functionIndex = 0;\n while (functionIndex < functions.length) {\n const lazyFunction = lazyFunctions[functionIndex];\n if (lazyFunction === undefined || !isIterable(output)) {\n const func = functions[functionIndex]!;\n output = func(output);\n functionIndex += 1;\n continue;\n }\n\n const lazySequence: Array<PreparedLazyFunction> = [];\n for (let index = functionIndex; index < functions.length; index++) {\n const lazyOp = lazyFunctions[index];\n if (lazyOp === undefined) {\n break;\n }\n\n lazySequence.push(lazyOp);\n if (lazyOp.isSingle) {\n break;\n }\n }\n\n const accumulator: Array<unknown> = [];\n\n for (const value of output) {\n const shouldExitEarly = processItem(value, accumulator, lazySequence);\n if (shouldExitEarly) {\n break;\n }\n }\n\n const { isSingle } = lazySequence.at(-1)!;\n output = isSingle ? accumulator[0] : accumulator;\n functionIndex += lazySequence.length;\n }\n return output;\n}\n\nfunction processItem(\n item: unknown,\n accumulator: Array<unknown>,\n lazySequence: ReadonlyArray<PreparedLazyFunction>,\n): boolean {\n if (lazySequence.length === 0) {\n accumulator.push(item);\n return false;\n }\n\n let currentItem = item;\n\n let lazyResult: LazyResult<any> = SKIP_ITEM;\n let isDone = false;\n for (const [functionsIndex, lazyFn] of lazySequence.entries()) {\n const { index, items } = lazyFn;\n items.push(currentItem);\n lazyResult = lazyFn(currentItem, index, items);\n lazyFn.index += 1;\n if (lazyResult.hasNext) {\n if (lazyResult.hasMany ?? false) {\n for (const subItem of lazyResult.next as ReadonlyArray<unknown>) {\n const subResult = processItem(\n subItem,\n accumulator,\n lazySequence.slice(functionsIndex + 1),\n );\n if (subResult) {\n return true;\n }\n }\n return isDone;\n }\n currentItem = lazyResult.next;\n }\n if (!lazyResult.hasNext) {\n break;\n }\n // process remaining functions in the pipe\n // but don't process remaining elements in the input array\n if (lazyResult.done) {\n isDone = true;\n }\n }\n if (lazyResult.hasNext) {\n accumulator.push(currentItem);\n }\n return isDone;\n}\n\nfunction prepareLazyFunction(func: LazyFunction): PreparedLazyFunction {\n const { lazy, lazyArgs } = func;\n const fn = lazy(...lazyArgs);\n return Object.assign(fn, {\n isSingle: lazy.single ?? false,\n index: 0,\n items: [] as Array<unknown>,\n });\n}\n\nfunction isIterable(something: unknown): something is Iterable<unknown> {\n // Check for null and undefined to avoid errors when accessing Symbol.iterator\n return (\n typeof something === 'string'\n || (typeof something === 'object'\n && something !== null\n && Symbol.iterator in something)\n );\n}\n"],"mappings":"qDA2RA,SAAgB,EACd,EACA,GAAG,EACE,CACL,IAAI,EAAS,EAEP,EAAgB,EAAU,IAAK,GACnC,SAAU,EAAK,EAAoB,EAAG,CAAG,IAAA,GAAU,CAEjD,EAAgB,EACpB,KAAO,EAAgB,EAAU,QAAQ,CAEvC,GADqB,EAAc,KACd,IAAA,IAAa,CAAC,EAAW,EAAO,CAAE,CACrD,IAAM,EAAO,EAAU,GACvB,EAAS,EAAK,EAAO,CACrB,GAAiB,EACjB,SAGF,IAAM,EAA4C,EAAE,CACpD,IAAK,IAAI,EAAQ,EAAe,EAAQ,EAAU,OAAQ,IAAS,CACjE,IAAM,EAAS,EAAc,GAM7B,GALI,IAAW,IAAA,KAIf,EAAa,KAAK,EAAO,CACrB,EAAO,UACT,MAIJ,IAAM,EAA8B,EAAE,CAEtC,IAAK,IAAM,KAAS,EAElB,GADwB,EAAY,EAAO,EAAa,EAAa,CAEnE,MAIJ,GAAM,CAAE,YAAa,EAAa,GAAG,GAAG,CACxC,EAAS,EAAW,EAAY,GAAK,EACrC,GAAiB,EAAa,OAEhC,OAAO,EAGT,SAAS,EACP,EACA,EACA,EACS,CACT,GAAI,EAAa,SAAW,EAE1B,OADA,EAAY,KAAK,EAAK,CACf,GAGT,IAAI,EAAc,EAEd,EAA8B,EAC9B,EAAS,GACb,IAAK,GAAM,CAAC,EAAgB,KAAW,EAAa,SAAS,CAAE,CAC7D,GAAM,CAAE,QAAO,SAAU,EAIzB,GAHA,EAAM,KAAK,EAAY,CACvB,EAAa,EAAO,EAAa,EAAO,EAAM,CAC9C,EAAO,OAAS,EACZ,EAAW,QAAS,CACtB,GAAI,EAAW,SAAW,GAAO,CAC/B,IAAK,IAAM,KAAW,EAAW,KAM/B,GALkB,EAChB,EACA,EACA,EAAa,MAAM,EAAiB,EAAE,CACvC,CAEC,MAAO,GAGX,OAAO,EAET,EAAc,EAAW,KAE3B,GAAI,CAAC,EAAW,QACd,MAIE,EAAW,OACb,EAAS,IAMb,OAHI,EAAW,SACb,EAAY,KAAK,EAAY,CAExB,EAGT,SAAS,EAAoB,EAA0C,CACrE,GAAM,CAAE,OAAM,YAAa,EACrB,EAAK,EAAK,GAAG,EAAS,CAC5B,OAAO,OAAO,OAAO,EAAI,CACvB,SAAU,EAAK,QAAU,GACzB,MAAO,EACP,MAAO,EAAE,CACV,CAAC,CAGJ,SAAS,EAAW,EAAoD,CAEtE,OACE,OAAO,GAAc,UACjB,OAAO,GAAc,YACpB,GACA,OAAO,YAAY"}
|
package/dist/piped.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const e=require(`./pipe
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./pipe.cjs`);function t(...t){return n=>e.pipe(n,...t)}exports.piped=t;
|
|
2
|
+
//# sourceMappingURL=piped.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"piped.cjs","names":["pipe"],"sources":["../src/piped.ts"],"sourcesContent":["import { pipe } from './pipe';\n\n/**\n * Data-last version of `pipe`. See `pipe` documentation for full details.\n *\n * Use `piped` when you need to pass a transformation as a callback to\n * functions like `map` and `filter`, where the data type can be inferred\n * from the call site.\n *\n * IMPORTANT: `piped` does not work as a \"function factory\" in order to create\n * standalone utility functions; because TypeScript cannot infer the input data\n * type (without requiring to explicitly define all type params for all\n * functions in the pipe). We recommend defining the function explicitly, and\n * then use `pipe` in its implementation.\n *\n * @signature\n * piped(...functions)(data);\n * @example\n * map(\n * [{ a: 1 }, { a: 2 }, { a: 3 }],\n * piped(prop('a'), add(1)),\n * ); //=> [2, 3, 4]\n * @dataLast\n * @category Function\n */\nexport function piped<A>(): (data: A) => A;\n\nexport function piped<A, B>(funcA: (input: A) => B): (data: A) => B;\n\nexport function piped<A, B, C>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n): (data: A) => C;\n\nexport function piped<A, B, C, D>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n): (data: A) => D;\n\nexport function piped<A, B, C, D, E>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n): (data: A) => E;\n\nexport function piped<A, B, C, D, E, F>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n): (data: A) => F;\n\nexport function piped<A, B, C, D, E, F, G>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n): (data: A) => G;\n\nexport function piped<A, B, C, D, E, F, G, H>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n): (data: A) => H;\n\nexport function piped<A, B, C, D, E, F, G, H, I>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n): (data: A) => I;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n): (data: A) => J;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J, K>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n): (data: A) => K;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J, K, L>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n): (data: A) => L;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J, K, L, M>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n): (data: A) => M;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n funcM: (input: M) => N,\n): (data: A) => N;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n funcM: (input: M) => N,\n funcN: (input: N) => O,\n): (data: A) => O;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n funcM: (input: M) => N,\n funcN: (input: N) => O,\n funcO: (input: O) => P,\n): (data: A) => P;\n\nexport function piped(...functions: ReadonlyArray<(input: unknown) => unknown>) {\n return (value: unknown): unknown =>\n pipe(\n value,\n // @ts-expect-error [ts2556] - We can't avoid this error because pipe is typed for users and this is an internal function\n ...functions,\n );\n}\n"],"mappings":"iGA8LA,SAAgB,EAAM,GAAG,EAAuD,CAC9E,MAAQ,IACNA,EAAAA,KACE,EAEA,GAAG,EACJ"}
|
package/dist/piped.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{pipe as e}from"./pipe.js";function t(...t){return n=>e(n,...t)}export{t as piped};
|
|
2
2
|
//# sourceMappingURL=piped.js.map
|
package/dist/piped.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"piped.js","names":[],"sources":["../src/piped.ts"],"sourcesContent":["import { pipe } from './pipe';\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"piped.js","names":[],"sources":["../src/piped.ts"],"sourcesContent":["import { pipe } from './pipe';\n\n/**\n * Data-last version of `pipe`. See `pipe` documentation for full details.\n *\n * Use `piped` when you need to pass a transformation as a callback to\n * functions like `map` and `filter`, where the data type can be inferred\n * from the call site.\n *\n * IMPORTANT: `piped` does not work as a \"function factory\" in order to create\n * standalone utility functions; because TypeScript cannot infer the input data\n * type (without requiring to explicitly define all type params for all\n * functions in the pipe). We recommend defining the function explicitly, and\n * then use `pipe` in its implementation.\n *\n * @signature\n * piped(...functions)(data);\n * @example\n * map(\n * [{ a: 1 }, { a: 2 }, { a: 3 }],\n * piped(prop('a'), add(1)),\n * ); //=> [2, 3, 4]\n * @dataLast\n * @category Function\n */\nexport function piped<A>(): (data: A) => A;\n\nexport function piped<A, B>(funcA: (input: A) => B): (data: A) => B;\n\nexport function piped<A, B, C>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n): (data: A) => C;\n\nexport function piped<A, B, C, D>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n): (data: A) => D;\n\nexport function piped<A, B, C, D, E>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n): (data: A) => E;\n\nexport function piped<A, B, C, D, E, F>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n): (data: A) => F;\n\nexport function piped<A, B, C, D, E, F, G>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n): (data: A) => G;\n\nexport function piped<A, B, C, D, E, F, G, H>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n): (data: A) => H;\n\nexport function piped<A, B, C, D, E, F, G, H, I>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n): (data: A) => I;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n): (data: A) => J;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J, K>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n): (data: A) => K;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J, K, L>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n): (data: A) => L;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J, K, L, M>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n): (data: A) => M;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n funcM: (input: M) => N,\n): (data: A) => N;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n funcM: (input: M) => N,\n funcN: (input: N) => O,\n): (data: A) => O;\n\nexport function piped<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(\n funcA: (input: A) => B,\n funcB: (input: B) => C,\n funcC: (input: C) => D,\n funcD: (input: D) => E,\n funcE: (input: E) => F,\n funcF: (input: F) => G,\n funcG: (input: G) => H,\n funcH: (input: H) => I,\n funcI: (input: I) => J,\n funcJ: (input: J) => K,\n funcK: (input: K) => L,\n funcL: (input: L) => M,\n funcM: (input: M) => N,\n funcN: (input: N) => O,\n funcO: (input: O) => P,\n): (data: A) => P;\n\nexport function piped(...functions: ReadonlyArray<(input: unknown) => unknown>) {\n return (value: unknown): unknown =>\n pipe(\n value,\n // @ts-expect-error [ts2556] - We can't avoid this error because pipe is typed for users and this is an internal function\n ...functions,\n );\n}\n"],"mappings":"iCA8LA,SAAgB,EAAM,GAAG,EAAuD,CAC9E,MAAQ,IACN,EACE,EAEA,GAAG,EACJ"}
|
package/dist/product.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const e=require(`./curry
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./curry.cjs`);function t(...t){return e.curry(n,t)}function n(e){let t=typeof e[0]==`bigint`?1n:1;for(let n of e)t*=n;return t}exports.product=t;
|
|
2
|
+
//# sourceMappingURL=product.cjs.map
|