@vinicunca/perkakas 1.6.0 → 1.7.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 +1 -1
- package/dist/add-prop.d.cts +1 -1
- package/dist/add-prop.d.ts +1 -1
- package/dist/add-prop.js +1 -1
- package/dist/add.cjs +1 -1
- package/dist/add.js +1 -1
- package/dist/all-pass.cjs +1 -1
- package/dist/all-pass.js +1 -1
- package/dist/any-pass.cjs +1 -1
- package/dist/any-pass.js +1 -1
- package/dist/{array-required-prefix-BW08fIbb.d.cts → array-required-prefix-Ck4lHkbA.d.cts} +3 -5
- package/dist/{array-required-prefix-a3sgCkd2.d.ts → array-required-prefix-DXv_WnmG.d.ts} +3 -5
- package/dist/{bounded-partial-wqR8ceNQ.d.cts → bounded-partial-BqwRN49U.d.cts} +3 -2
- package/dist/{bounded-partial-CJjczH6j.d.ts → bounded-partial-BzynYDVs.d.ts} +3 -2
- package/dist/ceil.cjs +1 -1
- package/dist/ceil.js +1 -1
- package/dist/chunk-3DOG24FJ.cjs +1 -0
- package/dist/chunk-4BTTPOEU.cjs +1 -0
- package/dist/chunk-4Y6KJJOW.js +1 -0
- package/dist/{chunk-BDBX4ZMW.cjs → chunk-76VE5EC6.cjs} +1 -1
- package/dist/{chunk-TNA73S2T.cjs → chunk-7C7R7JNX.cjs} +1 -1
- package/dist/{chunk-WONMP5WS.js → chunk-7V7IBWP5.js} +1 -1
- package/dist/chunk-BKBHW2XJ.js +1 -0
- package/dist/chunk-BSNCALDT.cjs +1 -0
- package/dist/{chunk-UGWBDJPI.cjs → chunk-D4TUHKBA.cjs} +1 -1
- package/dist/chunk-EK7ODJWE.js +1 -0
- package/dist/chunk-FIO5FNV2.js +1 -0
- package/dist/chunk-FOUZI2Q3.cjs +1 -0
- package/dist/chunk-GRKRFDIL.js +1 -0
- package/dist/chunk-JYWIRZ2Z.js +1 -0
- package/dist/chunk-MBGSSEZN.cjs +1 -0
- package/dist/{chunk-GFXNX2W7.js → chunk-MPWQN3WY.js} +1 -1
- package/dist/chunk-NHTBBY2L.js +1 -0
- package/dist/chunk-NQUTCPKD.js +1 -0
- package/dist/chunk-OKBFQ7B6.js +1 -0
- package/dist/chunk-P7RCAO7P.cjs +438 -0
- package/dist/chunk-QGF2XNZS.cjs +1 -0
- package/dist/chunk-RMOD5JNB.cjs +1 -0
- package/dist/{chunk-5NW4GR2Q.cjs → chunk-RTFVY5D4.cjs} +1 -1
- package/dist/chunk-SG2YWG6U.cjs +1 -0
- package/dist/chunk-SXNRBENP.cjs +1 -0
- package/dist/chunk-TSP3FU72.cjs +1 -0
- package/dist/chunk-TWCEO47X.cjs +1 -0
- package/dist/{chunk-L4FN2W5Q.cjs → chunk-TXPRX236.cjs} +1 -1
- package/dist/{chunk-3K7SNX4D.cjs → chunk-UURK6I3D.cjs} +1 -1
- package/dist/chunk-XCG2UC6T.js +1 -0
- package/dist/{chunk-673TXH2U.js → chunk-YRVN4PYH.js} +1 -1
- package/dist/chunk-YWIXN5BR.js +1 -0
- package/dist/chunk-Z23BZCCD.js +438 -0
- package/dist/{chunk-EDZFEURO.js → chunk-Z5YZYBC2.js} +1 -1
- package/dist/chunk-Z7D7Q6U3.js +1 -0
- package/dist/chunk-ZMG3NQDL.js +1 -0
- package/dist/chunk.cjs +1 -1
- package/dist/chunk.d.cts +8 -23
- package/dist/chunk.d.ts +8 -23
- package/dist/chunk.js +1 -1
- package/dist/clamp.cjs +1 -1
- package/dist/clamp.js +1 -1
- package/dist/clone.cjs +1 -1
- package/dist/clone.js +1 -1
- package/dist/concat.cjs +1 -1
- package/dist/concat.js +1 -1
- package/dist/conditional.cjs +1 -1
- package/dist/conditional.d.cts +133 -43
- package/dist/conditional.d.ts +133 -43
- package/dist/conditional.js +1 -1
- package/dist/constant.cjs +1 -1
- package/dist/constant.js +1 -1
- package/dist/count-by.cjs +1 -1
- package/dist/count-by.d.cts +3 -2
- package/dist/count-by.d.ts +3 -2
- package/dist/count-by.js +1 -1
- package/dist/curry.cjs +1 -1
- package/dist/curry.js +1 -1
- package/dist/debounce.cjs +1 -1
- package/dist/debounce.js +1 -1
- package/dist/difference-with.cjs +1 -1
- package/dist/difference-with.js +1 -1
- package/dist/difference.cjs +1 -1
- package/dist/difference.js +1 -1
- package/dist/divide.cjs +1 -1
- package/dist/divide.js +1 -1
- package/dist/do-nothing.cjs +1 -1
- package/dist/do-nothing.js +1 -1
- package/dist/drop-first-by.cjs +1 -1
- package/dist/drop-first-by.d.cts +1 -1
- package/dist/drop-first-by.d.ts +1 -1
- package/dist/drop-first-by.js +1 -1
- package/dist/drop-last-while.cjs +1 -1
- package/dist/drop-last-while.js +1 -1
- package/dist/drop-last.cjs +1 -1
- package/dist/drop-last.js +1 -1
- package/dist/drop-while.cjs +1 -1
- package/dist/drop-while.js +1 -1
- package/dist/drop.cjs +1 -1
- package/dist/drop.d.cts +2 -1
- package/dist/drop.d.ts +2 -1
- package/dist/drop.js +1 -1
- package/dist/entries.cjs +1 -1
- package/dist/entries.d.cts +8 -5
- package/dist/entries.d.ts +8 -5
- package/dist/entries.js +1 -1
- package/dist/{enumerable-string-key-of-BQ4aR5ep.d.cts → enumerable-string-key-of-C4gsorXe.d.ts} +3 -1
- package/dist/{enumerable-string-key-of-BQ4aR5ep.d.ts → enumerable-string-key-of-D8w_3Yg8.d.cts} +3 -1
- package/dist/enumerable-string-keyed-value-of-BU9R_cEk.d.cts +9 -0
- package/dist/enumerable-string-keyed-value-of-BU9R_cEk.d.ts +9 -0
- package/dist/evolve.cjs +1 -1
- package/dist/evolve.js +1 -1
- package/dist/filter.cjs +1 -1
- package/dist/filter.d.cts +4 -4
- package/dist/filter.d.ts +4 -4
- package/dist/filter.js +1 -1
- package/dist/{filtered-array-DX6NNaBq.d.cts → filtered-array-BCjySbC6.d.cts} +1 -1
- package/dist/{filtered-array-BNHX1Nwj.d.ts → filtered-array-JKATL39M.d.ts} +1 -1
- package/dist/find-index.cjs +1 -1
- package/dist/find-index.js +1 -1
- package/dist/find-last-index.cjs +1 -1
- package/dist/find-last-index.js +1 -1
- package/dist/find-last.cjs +1 -1
- package/dist/find-last.js +1 -1
- package/dist/find.cjs +1 -1
- package/dist/find.js +1 -1
- package/dist/first-by.cjs +1 -1
- package/dist/first-by.d.cts +1 -1
- package/dist/first-by.d.ts +1 -1
- package/dist/first-by.js +1 -1
- package/dist/first.cjs +1 -1
- package/dist/first.js +1 -1
- package/dist/flat-map.cjs +1 -1
- package/dist/flat-map.js +1 -1
- package/dist/flat.cjs +1 -1
- package/dist/flat.d.cts +2 -5
- package/dist/flat.d.ts +2 -5
- package/dist/flat.js +1 -1
- package/dist/floor.cjs +1 -1
- package/dist/floor.js +1 -1
- package/dist/for-each-obj.cjs +1 -1
- package/dist/for-each-obj.d.cts +3 -2
- package/dist/for-each-obj.d.ts +3 -2
- package/dist/for-each-obj.js +1 -1
- package/dist/for-each.cjs +1 -1
- package/dist/for-each.js +1 -1
- package/dist/from-entries.cjs +1 -1
- package/dist/from-entries.d.cts +4 -2
- package/dist/from-entries.d.ts +4 -2
- package/dist/from-entries.js +1 -1
- package/dist/from-keys.cjs +1 -1
- package/dist/from-keys.d.cts +3 -2
- package/dist/from-keys.d.ts +3 -2
- package/dist/from-keys.js +1 -1
- package/dist/funnel.cjs +1 -1
- package/dist/funnel.d.cts +7 -7
- package/dist/funnel.d.ts +7 -7
- package/dist/funnel.js +1 -1
- package/dist/funnel.lodash-debounce-with-cached-value.test.cjs +1 -1
- package/dist/funnel.lodash-debounce-with-cached-value.test.js +1 -1
- package/dist/funnel.lodash-debounce.test.cjs +1 -1
- package/dist/funnel.lodash-debounce.test.js +1 -1
- package/dist/funnel.lodash-throttle-with-cached-value.test.cjs +1 -1
- package/dist/funnel.lodash-throttle-with-cached-value.test.js +1 -1
- package/dist/funnel.lodash-throttle.test.cjs +1 -1
- package/dist/funnel.lodash-throttle.test.js +1 -1
- package/dist/funnel.perkakas-debounce.test.cjs +1 -0
- package/dist/funnel.perkakas-debounce.test.js +1 -0
- package/dist/funnel.reference-batch.test.cjs +1 -1
- package/dist/funnel.reference-batch.test.js +1 -1
- package/dist/funnel.test-d.cjs +1 -1
- package/dist/funnel.test-d.js +1 -1
- package/dist/funnel.test.cjs +1 -1
- package/dist/funnel.test.js +1 -1
- package/dist/group-by-prop.cjs +1 -1
- package/dist/group-by-prop.d.cts +7 -5
- package/dist/group-by-prop.d.ts +7 -5
- package/dist/group-by-prop.js +1 -1
- package/dist/group-by.cjs +1 -1
- package/dist/group-by.d.cts +3 -2
- package/dist/group-by.d.ts +3 -2
- package/dist/group-by.js +1 -1
- package/dist/has-at-least.cjs +1 -1
- package/dist/has-at-least.d.cts +3 -2
- package/dist/has-at-least.d.ts +3 -2
- package/dist/has-at-least.js +1 -1
- package/dist/has-sub-object.cjs +1 -1
- package/dist/has-sub-object.js +1 -1
- package/dist/human-readable-file-size.cjs +1 -1
- package/dist/human-readable-file-size.js +1 -1
- package/dist/identity.cjs +1 -1
- package/dist/identity.js +1 -1
- package/dist/if-D4QIikQ1.d.cts +5 -0
- package/dist/if-D4QIikQ1.d.ts +5 -0
- package/dist/index-by.cjs +1 -1
- package/dist/index-by.d.cts +3 -2
- package/dist/index-by.d.ts +3 -2
- package/dist/index-by.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +11 -9
- package/dist/index.d.ts +11 -9
- package/dist/index.js +1 -1
- package/dist/intersection-with.cjs +1 -1
- package/dist/intersection-with.js +1 -1
- package/dist/intersection.cjs +1 -1
- package/dist/intersection.js +1 -1
- package/dist/invert.cjs +1 -1
- package/dist/invert.d.cts +2 -1
- package/dist/invert.d.ts +2 -1
- package/dist/invert.js +1 -1
- package/dist/is-array.cjs +1 -1
- package/dist/is-array.js +1 -1
- package/dist/is-big-int.cjs +1 -1
- package/dist/is-big-int.js +1 -1
- package/dist/is-boolean.cjs +1 -1
- package/dist/is-boolean.js +1 -1
- package/dist/is-bounded-record-C9WAwfA8.d.cts +30 -0
- package/dist/is-bounded-record-C9WAwfA8.d.ts +30 -0
- package/dist/is-date.cjs +1 -1
- package/dist/is-date.js +1 -1
- package/dist/is-deep-equal.cjs +1 -1
- package/dist/is-deep-equal.js +1 -1
- package/dist/is-defined.cjs +1 -1
- package/dist/is-defined.js +1 -1
- package/dist/is-empty.cjs +1 -1
- package/dist/is-empty.js +1 -1
- package/dist/is-error.cjs +1 -1
- package/dist/is-error.js +1 -1
- package/dist/is-function.cjs +1 -1
- package/dist/is-function.js +1 -1
- package/dist/is-included-in.cjs +1 -1
- package/dist/is-included-in.js +1 -1
- package/dist/is-non-null.cjs +1 -1
- package/dist/is-non-null.js +1 -1
- package/dist/is-non-nullish.cjs +1 -1
- package/dist/is-non-nullish.js +1 -1
- package/dist/is-not.cjs +1 -1
- package/dist/is-not.js +1 -1
- package/dist/is-nullish.cjs +1 -1
- package/dist/is-nullish.js +1 -1
- package/dist/is-number.cjs +1 -1
- package/dist/is-number.js +1 -1
- package/dist/is-object-type.cjs +1 -1
- package/dist/is-object-type.js +1 -1
- package/dist/is-plain-object.cjs +1 -1
- package/dist/is-plain-object.js +1 -1
- package/dist/is-promise.cjs +1 -1
- package/dist/is-promise.js +1 -1
- package/dist/is-shallow-equal.cjs +1 -1
- package/dist/is-shallow-equal.js +1 -1
- package/dist/is-strict-equal.cjs +1 -1
- package/dist/is-strict-equal.js +1 -1
- package/dist/is-string.cjs +1 -1
- package/dist/is-string.js +1 -1
- package/dist/is-symbol.cjs +1 -1
- package/dist/is-symbol.js +1 -1
- package/dist/is-truthy.cjs +1 -1
- package/dist/is-truthy.js +1 -1
- package/dist/join.cjs +1 -1
- package/dist/join.js +1 -1
- package/dist/key-codes.cjs +1 -1
- package/dist/key-codes.js +1 -1
- package/dist/keys.cjs +1 -1
- package/dist/keys.d.cts +4 -3
- package/dist/keys.d.ts +4 -3
- package/dist/keys.js +1 -1
- package/dist/last.cjs +1 -1
- package/dist/last.js +1 -1
- package/dist/length.cjs +1 -1
- package/dist/length.js +1 -1
- package/dist/magic-string.es-2ADFIHOO.cjs +13 -0
- package/dist/magic-string.es-PNCTE22R.js +13 -0
- package/dist/map-keys.cjs +1 -1
- package/dist/map-keys.d.cts +6 -4
- package/dist/map-keys.d.ts +6 -4
- package/dist/map-keys.js +1 -1
- package/dist/map-to-obj.cjs +1 -1
- package/dist/map-to-obj.d.cts +30 -12
- package/dist/map-to-obj.d.ts +30 -12
- package/dist/map-to-obj.js +1 -1
- package/dist/map-values.cjs +1 -1
- package/dist/map-values.d.cts +3 -2
- package/dist/map-values.d.ts +3 -2
- package/dist/map-values.js +1 -1
- package/dist/map-with-feedback.cjs +1 -1
- package/dist/map-with-feedback.js +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/mean-by.cjs +1 -1
- package/dist/mean-by.js +1 -1
- package/dist/merge-all.cjs +1 -1
- package/dist/merge-all.d.cts +2 -1
- package/dist/merge-all.d.ts +2 -1
- package/dist/merge-all.js +1 -1
- package/dist/merge-deep.cjs +1 -1
- package/dist/merge-deep.js +1 -1
- package/dist/merge.cjs +1 -1
- package/dist/merge.js +1 -1
- package/dist/multiply.cjs +1 -1
- package/dist/multiply.js +1 -1
- package/dist/nth-by.cjs +1 -1
- package/dist/nth-by.d.cts +1 -1
- package/dist/nth-by.d.ts +1 -1
- package/dist/nth-by.js +1 -1
- package/dist/obj-of.cjs +1 -1
- package/dist/obj-of.js +1 -1
- package/dist/omit-by.cjs +1 -1
- package/dist/omit-by.d.cts +7 -6
- package/dist/omit-by.d.ts +7 -6
- package/dist/omit-by.js +1 -1
- package/dist/omit.cjs +1 -1
- package/dist/omit.js +1 -1
- package/dist/once.cjs +1 -1
- package/dist/once.js +1 -1
- package/dist/only.cjs +1 -1
- package/dist/only.js +1 -1
- package/dist/partition.cjs +1 -1
- package/dist/partition.js +1 -1
- package/dist/path-or.cjs +1 -1
- package/dist/path-or.js +1 -1
- package/dist/perkakas-type-error-8wPb8T2y.d.cts +17 -0
- package/dist/perkakas-type-error-8wPb8T2y.d.ts +17 -0
- package/dist/pick-by.cjs +1 -1
- package/dist/pick-by.d.cts +11 -11
- package/dist/pick-by.d.ts +11 -11
- package/dist/pick-by.js +1 -1
- package/dist/pick.cjs +1 -1
- package/dist/pick.d.cts +52 -7
- package/dist/pick.d.ts +52 -7
- package/dist/pick.js +1 -1
- package/dist/pipe.cjs +1 -1
- package/dist/pipe.js +1 -1
- package/dist/piped.cjs +1 -1
- package/dist/piped.js +1 -1
- package/dist/product.cjs +1 -1
- package/dist/product.js +1 -1
- package/dist/prop.cjs +1 -1
- package/dist/prop.js +1 -1
- package/dist/pull-object.cjs +1 -1
- package/dist/pull-object.d.cts +3 -2
- package/dist/pull-object.d.ts +3 -2
- package/dist/pull-object.js +1 -1
- package/dist/random-integer.cjs +1 -1
- package/dist/random-integer.js +1 -1
- package/dist/random-string.cjs +1 -1
- package/dist/random-string.js +1 -1
- package/dist/range.cjs +1 -1
- package/dist/range.js +1 -1
- package/dist/rank-by.cjs +1 -1
- package/dist/rank-by.d.cts +1 -1
- package/dist/rank-by.d.ts +1 -1
- package/dist/rank-by.js +1 -1
- package/dist/reduce.cjs +1 -1
- package/dist/reduce.js +1 -1
- package/dist/reverse.cjs +1 -1
- package/dist/reverse.js +1 -1
- package/dist/round.cjs +1 -1
- package/dist/round.js +1 -1
- package/dist/sample.cjs +1 -1
- package/dist/sample.js +1 -1
- package/dist/set-path.cjs +1 -1
- package/dist/set-path.d.cts +18 -7
- package/dist/set-path.d.ts +18 -7
- package/dist/set-path.js +1 -1
- package/dist/set.cjs +1 -1
- package/dist/set.d.cts +1 -1
- package/dist/set.d.ts +1 -1
- package/dist/set.js +1 -1
- package/dist/shuffle.cjs +1 -1
- package/dist/shuffle.js +1 -1
- package/dist/sleep.cjs +1 -1
- package/dist/sleep.js +1 -1
- package/dist/slice-string.cjs +1 -1
- package/dist/slice-string.js +1 -1
- package/dist/slugify.cjs +1 -1
- package/dist/slugify.js +1 -1
- package/dist/sort-by.cjs +1 -1
- package/dist/sort-by.js +1 -1
- package/dist/sort.cjs +1 -1
- package/dist/sort.js +1 -1
- package/dist/sorted-index-by.cjs +1 -1
- package/dist/sorted-index-by.js +1 -1
- package/dist/sorted-index-with.cjs +1 -1
- package/dist/sorted-index-with.js +1 -1
- package/dist/sorted-index.cjs +1 -1
- package/dist/sorted-index.js +1 -1
- package/dist/sorted-last-index-by.cjs +1 -1
- package/dist/sorted-last-index-by.js +1 -1
- package/dist/sorted-last-index.cjs +1 -1
- package/dist/sorted-last-index.js +1 -1
- package/dist/splice.cjs +1 -1
- package/dist/splice.js +1 -1
- package/dist/split-at.cjs +1 -1
- package/dist/split-at.js +1 -1
- package/dist/split-when.cjs +1 -1
- package/dist/split-when.js +1 -1
- package/dist/split.cjs +1 -1
- package/dist/split.js +1 -1
- package/dist/string-to-path.cjs +1 -1
- package/dist/string-to-path.d.cts +33 -11
- package/dist/string-to-path.d.ts +33 -11
- package/dist/string-to-path.js +1 -1
- package/dist/subtract.cjs +1 -1
- package/dist/subtract.js +1 -1
- package/dist/sum-by.cjs +1 -1
- package/dist/sum-by.js +1 -1
- package/dist/sum.cjs +1 -1
- package/dist/sum.js +1 -1
- package/dist/swap-indices.cjs +1 -1
- package/dist/swap-indices.js +1 -1
- package/dist/swap-props.cjs +1 -1
- package/dist/swap-props.js +1 -1
- package/dist/take-first-by.cjs +1 -1
- package/dist/take-first-by.d.cts +1 -1
- package/dist/take-first-by.d.ts +1 -1
- package/dist/take-first-by.js +1 -1
- package/dist/take-last-while.cjs +1 -1
- package/dist/take-last-while.js +1 -1
- package/dist/take-last.cjs +1 -1
- package/dist/take-last.js +1 -1
- package/dist/take-while.cjs +1 -1
- package/dist/take-while.js +1 -1
- package/dist/take.cjs +1 -1
- package/dist/take.js +1 -1
- package/dist/tap.cjs +1 -1
- package/dist/tap.js +1 -1
- package/dist/times.cjs +1 -1
- package/dist/times.d.cts +1 -9
- package/dist/times.d.ts +1 -9
- package/dist/times.js +1 -1
- package/dist/to-camel-case.cjs +1 -1
- package/dist/to-camel-case.js +1 -1
- package/dist/to-capital-case.cjs +1 -1
- package/dist/to-capital-case.js +1 -1
- package/dist/to-constant-case.cjs +1 -1
- package/dist/to-constant-case.js +1 -1
- package/dist/to-kebab-case.cjs +1 -1
- package/dist/to-kebab-case.js +1 -1
- package/dist/to-no-case.cjs +1 -1
- package/dist/to-no-case.js +1 -1
- package/dist/to-pascal-case.cjs +1 -1
- package/dist/to-pascal-case.js +1 -1
- package/dist/to-pascal-snake-case.cjs +1 -1
- package/dist/to-pascal-snake-case.js +1 -1
- package/dist/to-sentence-case.cjs +1 -1
- package/dist/to-sentence-case.js +1 -1
- package/dist/to-snake-case.cjs +1 -1
- package/dist/to-snake-case.js +1 -1
- package/dist/to-string-DO8zw6jS.d.cts +11 -0
- package/dist/to-string-DO8zw6jS.d.ts +11 -0
- package/dist/to-train-case.cjs +1 -1
- package/dist/to-train-case.js +1 -1
- package/dist/{tuple-parts-CrwnkDKX.d.ts → tuple-parts-BTivqbtT.d.ts} +4 -18
- package/dist/{tuple-parts-DAqFAJP8.d.cts → tuple-parts-v6av7LMU.d.cts} +4 -18
- package/dist/unique-by.cjs +1 -1
- package/dist/unique-by.js +1 -1
- package/dist/unique-with.cjs +1 -1
- package/dist/unique-with.js +1 -1
- package/dist/unique.cjs +1 -1
- package/dist/unique.js +1 -1
- package/dist/{upsert-prop-tIHFi_F_.d.cts → upsert-prop-Cc3jEW9l.d.cts} +1 -2
- package/dist/{upsert-prop-D0N8486l.d.ts → upsert-prop-CdUtD50i.d.ts} +1 -2
- package/dist/values.cjs +1 -1
- package/dist/values.d.cts +1 -1
- package/dist/values.d.ts +1 -1
- package/dist/values.js +1 -1
- package/dist/zip-with.cjs +1 -1
- package/dist/zip-with.js +1 -1
- package/dist/zip.cjs +1 -1
- package/dist/zip.js +1 -1
- package/package.json +12 -12
- package/dist/chunk-5SAUYUEK.js +0 -1
- package/dist/chunk-6HSB3NFW.js +0 -1
- package/dist/chunk-6L5XEBJG.js +0 -1
- package/dist/chunk-A2PAJNYA.js +0 -1
- package/dist/chunk-AWXJSK4F.js +0 -1
- package/dist/chunk-CZLV6ZLZ.js +0 -1
- package/dist/chunk-F3JXHUP4.cjs +0 -1
- package/dist/chunk-FMUPPQZE.js +0 -1
- package/dist/chunk-FP3LV577.js +0 -1
- package/dist/chunk-GFQXVPLP.cjs +0 -1
- package/dist/chunk-GOUUMCT7.cjs +0 -1
- package/dist/chunk-HRK4GMT2.cjs +0 -1
- package/dist/chunk-ICYGL2YZ.js +0 -1
- package/dist/chunk-J3ZXNDMT.cjs +0 -1
- package/dist/chunk-MBC7VZHY.js +0 -1
- package/dist/chunk-NQGMUM3E.cjs +0 -1
- package/dist/chunk-OBWPUDD3.cjs +0 -1
- package/dist/chunk-SQZULO7V.js +0 -1
- package/dist/chunk-UDSRBKNR.js +0 -1
- package/dist/chunk-VRZNQSZN.cjs +0 -1
- package/dist/chunk-WYM2JV5T.cjs +0 -1
- package/dist/chunk-XU4TDKMD.cjs +0 -1
- package/dist/enumerable-string-keyed-value-of-CLzltniW.d.cts +0 -15
- package/dist/enumerable-string-keyed-value-of-CLzltniW.d.ts +0 -15
- package/dist/funnel.remeda-debounce.test.cjs +0 -1
- package/dist/funnel.remeda-debounce.test.js +0 -1
- package/dist/if-bounded-record-Drd4UbBU.d.cts +0 -29
- package/dist/if-bounded-record-Drd4UbBU.d.ts +0 -29
- package/dist/reconstructed-record-DchLaSO8.d.cts +0 -10
- package/dist/reconstructed-record-DuxOLlMs.d.ts +0 -10
- /package/dist/{funnel.remeda-debounce.test.d.cts → funnel.perkakas-debounce.test.d.cts} +0 -0
- /package/dist/{funnel.remeda-debounce.test.d.ts → funnel.perkakas-debounce.test.d.ts} +0 -0
package/dist/to-pascal-case.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-ZIGQWNCG.js";import"./chunk-MZEHWQF3.js";export{a as toPascalCase};
|
|
1
|
+
import{a}from"./chunk-ZIGQWNCG.js";import"./chunk-MZEHWQF3.js";import"./chunk-EK7ODJWE.js";export{a as toPascalCase};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWVTQN2AIcjs = require('./chunk-WVTQN2AI.cjs');require('./chunk-7GAGU65U.cjs');require('./chunk-OPJJI442.cjs');exports.toPascalSnakeCase = _chunkWVTQN2AIcjs.a;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWVTQN2AIcjs = require('./chunk-WVTQN2AI.cjs');require('./chunk-7GAGU65U.cjs');require('./chunk-OPJJI442.cjs');require('./chunk-MBGSSEZN.cjs');exports.toPascalSnakeCase = _chunkWVTQN2AIcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-OT55MXTZ.js";import"./chunk-CQ7LGCRX.js";import"./chunk-MZEHWQF3.js";export{a as toPascalSnakeCase};
|
|
1
|
+
import{a}from"./chunk-OT55MXTZ.js";import"./chunk-CQ7LGCRX.js";import"./chunk-MZEHWQF3.js";import"./chunk-EK7ODJWE.js";export{a as toPascalSnakeCase};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkN7AESA4Wcjs = require('./chunk-N7AESA4W.cjs');require('./chunk-OPJJI442.cjs');exports.toSentenceCase = _chunkN7AESA4Wcjs.a;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkN7AESA4Wcjs = require('./chunk-N7AESA4W.cjs');require('./chunk-OPJJI442.cjs');require('./chunk-MBGSSEZN.cjs');exports.toSentenceCase = _chunkN7AESA4Wcjs.a;
|
package/dist/to-sentence-case.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-L4S5OAPG.js";import"./chunk-MZEHWQF3.js";export{a as toSentenceCase};
|
|
1
|
+
import{a}from"./chunk-L4S5OAPG.js";import"./chunk-MZEHWQF3.js";import"./chunk-EK7ODJWE.js";export{a as toSentenceCase};
|
package/dist/to-snake-case.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLPNHLDEAcjs = require('./chunk-LPNHLDEA.cjs');require('./chunk-I27XCDDI.cjs');require('./chunk-OPJJI442.cjs');exports.toSnakeCase = _chunkLPNHLDEAcjs.a;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLPNHLDEAcjs = require('./chunk-LPNHLDEA.cjs');require('./chunk-I27XCDDI.cjs');require('./chunk-OPJJI442.cjs');require('./chunk-MBGSSEZN.cjs');exports.toSnakeCase = _chunkLPNHLDEAcjs.a;
|
package/dist/to-snake-case.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-5OPUQ5T6.js";import"./chunk-MFSRIHWE.js";import"./chunk-MZEHWQF3.js";export{a as toSnakeCase};
|
|
1
|
+
import{a}from"./chunk-5OPUQ5T6.js";import"./chunk-MFSRIHWE.js";import"./chunk-MZEHWQF3.js";import"./chunk-EK7ODJWE.js";export{a as toSnakeCase};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A utility to preserve strings as-is, convert numbers to strings, and fail on
|
|
3
|
+
* anything else. This happens a lot in JS when accessing objects or when
|
|
4
|
+
* enumerating over keys.
|
|
5
|
+
*
|
|
6
|
+
* Notice that symbols are not supported, which is consistent with how built-in
|
|
7
|
+
* functions like `Object.keys` and `Object.entries` behave.
|
|
8
|
+
*/
|
|
9
|
+
type ToString<T> = T extends unknown ? T extends number ? `${T}` : T extends string ? T : never : never;
|
|
10
|
+
|
|
11
|
+
export type { ToString as T };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A utility to preserve strings as-is, convert numbers to strings, and fail on
|
|
3
|
+
* anything else. This happens a lot in JS when accessing objects or when
|
|
4
|
+
* enumerating over keys.
|
|
5
|
+
*
|
|
6
|
+
* Notice that symbols are not supported, which is consistent with how built-in
|
|
7
|
+
* functions like `Object.keys` and `Object.entries` behave.
|
|
8
|
+
*/
|
|
9
|
+
type ToString<T> = T extends unknown ? T extends number ? `${T}` : T extends string ? T : never : never;
|
|
10
|
+
|
|
11
|
+
export type { ToString as T };
|
package/dist/to-train-case.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkX7EK7EDZcjs = require('./chunk-X7EK7EDZ.cjs');require('./chunk-7GAGU65U.cjs');require('./chunk-OPJJI442.cjs');exports.toTrainCase = _chunkX7EK7EDZcjs.a;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkX7EK7EDZcjs = require('./chunk-X7EK7EDZ.cjs');require('./chunk-7GAGU65U.cjs');require('./chunk-OPJJI442.cjs');require('./chunk-MBGSSEZN.cjs');exports.toTrainCase = _chunkX7EK7EDZcjs.a;
|
package/dist/to-train-case.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-RW5FFMRB.js";import"./chunk-CQ7LGCRX.js";import"./chunk-MZEHWQF3.js";export{a as toTrainCase};
|
|
1
|
+
import{a}from"./chunk-RW5FFMRB.js";import"./chunk-CQ7LGCRX.js";import"./chunk-MZEHWQF3.js";import"./chunk-EK7ODJWE.js";export{a as toTrainCase};
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Simplify, Or } from 'type-fest';
|
|
2
2
|
import { I as IterableContainer } from './iterable-container-BTpDVdNc.js';
|
|
3
|
-
|
|
4
|
-
declare const PerkakasErrorSymbol: unique symbol;
|
|
5
|
-
interface PerkakasTypeErrorOptions {
|
|
6
|
-
type?: unknown;
|
|
7
|
-
metadata?: unknown;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Used for reporting type errors in a more useful way than `never`.
|
|
11
|
-
*/
|
|
12
|
-
type PerkakasTypeError<FunctionName extends string, Message extends number | string, Options extends PerkakasTypeErrorOptions = {}> = Tagged<Options extends {
|
|
13
|
-
type: infer T;
|
|
14
|
-
} ? T : typeof PerkakasErrorSymbol, `PerkakasTypeError(${FunctionName}): ${Message}.`, Options extends {
|
|
15
|
-
metadata: infer Metadata;
|
|
16
|
-
} ? Metadata : never>;
|
|
3
|
+
import { P as PerkakasTypeError } from './perkakas-type-error-8wPb8T2y.js';
|
|
17
4
|
|
|
18
5
|
/**
|
|
19
6
|
* Takes a tuple and returns the types that make up its parts. These parts
|
|
@@ -52,8 +39,7 @@ type TupleParts<T extends IterableContainer, Prefix extends Array<unknown> = []>
|
|
|
52
39
|
*/
|
|
53
40
|
required: Prefix;
|
|
54
41
|
} & TuplePartsWithoutRequired<T>>;
|
|
55
|
-
type TuplePartsWithoutRequired<T extends IterableContainer, Suffix extends Array<unknown> = []> = T extends readonly [...infer Head, infer Tail] ? TuplePartsWithoutRequired<Head, [Tail, ...Suffix]> : (Suffix extends readonly [] ? TuplePartsWithoutFixed<T> :
|
|
56
|
-
{
|
|
42
|
+
type TuplePartsWithoutRequired<T extends IterableContainer, Suffix extends Array<unknown> = []> = T extends readonly [...infer Head, infer Tail] ? TuplePartsWithoutRequired<Head, [Tail, ...Suffix]> : (Suffix extends readonly [] ? TuplePartsWithoutFixed<T> : {
|
|
57
43
|
optional: [];
|
|
58
44
|
} & TuplePartsRest<T>) & {
|
|
59
45
|
/**
|
|
@@ -97,4 +83,4 @@ interface TuplePartsRest<T extends IterableContainer> {
|
|
|
97
83
|
item: T extends readonly [] ? never : T[number];
|
|
98
84
|
}
|
|
99
85
|
|
|
100
|
-
export type {
|
|
86
|
+
export type { TupleParts as T };
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Simplify, Or } from 'type-fest';
|
|
2
2
|
import { I as IterableContainer } from './iterable-container-BTpDVdNc.cjs';
|
|
3
|
-
|
|
4
|
-
declare const PerkakasErrorSymbol: unique symbol;
|
|
5
|
-
interface PerkakasTypeErrorOptions {
|
|
6
|
-
type?: unknown;
|
|
7
|
-
metadata?: unknown;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Used for reporting type errors in a more useful way than `never`.
|
|
11
|
-
*/
|
|
12
|
-
type PerkakasTypeError<FunctionName extends string, Message extends number | string, Options extends PerkakasTypeErrorOptions = {}> = Tagged<Options extends {
|
|
13
|
-
type: infer T;
|
|
14
|
-
} ? T : typeof PerkakasErrorSymbol, `PerkakasTypeError(${FunctionName}): ${Message}.`, Options extends {
|
|
15
|
-
metadata: infer Metadata;
|
|
16
|
-
} ? Metadata : never>;
|
|
3
|
+
import { P as PerkakasTypeError } from './perkakas-type-error-8wPb8T2y.cjs';
|
|
17
4
|
|
|
18
5
|
/**
|
|
19
6
|
* Takes a tuple and returns the types that make up its parts. These parts
|
|
@@ -52,8 +39,7 @@ type TupleParts<T extends IterableContainer, Prefix extends Array<unknown> = []>
|
|
|
52
39
|
*/
|
|
53
40
|
required: Prefix;
|
|
54
41
|
} & TuplePartsWithoutRequired<T>>;
|
|
55
|
-
type TuplePartsWithoutRequired<T extends IterableContainer, Suffix extends Array<unknown> = []> = T extends readonly [...infer Head, infer Tail] ? TuplePartsWithoutRequired<Head, [Tail, ...Suffix]> : (Suffix extends readonly [] ? TuplePartsWithoutFixed<T> :
|
|
56
|
-
{
|
|
42
|
+
type TuplePartsWithoutRequired<T extends IterableContainer, Suffix extends Array<unknown> = []> = T extends readonly [...infer Head, infer Tail] ? TuplePartsWithoutRequired<Head, [Tail, ...Suffix]> : (Suffix extends readonly [] ? TuplePartsWithoutFixed<T> : {
|
|
57
43
|
optional: [];
|
|
58
44
|
} & TuplePartsRest<T>) & {
|
|
59
45
|
/**
|
|
@@ -97,4 +83,4 @@ interface TuplePartsRest<T extends IterableContainer> {
|
|
|
97
83
|
item: T extends readonly [] ? never : T[number];
|
|
98
84
|
}
|
|
99
85
|
|
|
100
|
-
export type {
|
|
86
|
+
export type { TupleParts as T };
|
package/dist/unique-by.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYN6OVP7Dcjs = require('./chunk-YN6OVP7D.cjs');require('./chunk-YJWH5VIJ.cjs');require('./chunk-BO34ARLY.cjs');require('./chunk-N5JE6642.cjs');exports.uniqueBy = _chunkYN6OVP7Dcjs.a;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYN6OVP7Dcjs = require('./chunk-YN6OVP7D.cjs');require('./chunk-YJWH5VIJ.cjs');require('./chunk-BO34ARLY.cjs');require('./chunk-N5JE6642.cjs');require('./chunk-MBGSSEZN.cjs');exports.uniqueBy = _chunkYN6OVP7Dcjs.a;
|
package/dist/unique-by.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-7RUINKY7.js";import"./chunk-LSODZ3GY.js";import"./chunk-QHBVEZSR.js";import"./chunk-EPU4K3DD.js";export{a as uniqueBy};
|
|
1
|
+
import{a}from"./chunk-7RUINKY7.js";import"./chunk-LSODZ3GY.js";import"./chunk-QHBVEZSR.js";import"./chunk-EPU4K3DD.js";import"./chunk-EK7ODJWE.js";export{a as uniqueBy};
|
package/dist/unique-with.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFN6OUY2Pcjs = require('./chunk-FN6OUY2P.cjs');require('./chunk-YJWH5VIJ.cjs');require('./chunk-BO34ARLY.cjs');require('./chunk-N5JE6642.cjs');exports.uniqueWith = _chunkFN6OUY2Pcjs.a;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFN6OUY2Pcjs = require('./chunk-FN6OUY2P.cjs');require('./chunk-YJWH5VIJ.cjs');require('./chunk-BO34ARLY.cjs');require('./chunk-N5JE6642.cjs');require('./chunk-MBGSSEZN.cjs');exports.uniqueWith = _chunkFN6OUY2Pcjs.a;
|
package/dist/unique-with.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-SE4JHXNT.js";import"./chunk-LSODZ3GY.js";import"./chunk-QHBVEZSR.js";import"./chunk-EPU4K3DD.js";export{a as uniqueWith};
|
|
1
|
+
import{a}from"./chunk-SE4JHXNT.js";import"./chunk-LSODZ3GY.js";import"./chunk-QHBVEZSR.js";import"./chunk-EPU4K3DD.js";import"./chunk-EK7ODJWE.js";export{a as uniqueWith};
|
package/dist/unique.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJUPDV6DZcjs = require('./chunk-JUPDV6DZ.cjs');require('./chunk-YJWH5VIJ.cjs');require('./chunk-BO34ARLY.cjs');require('./chunk-N5JE6642.cjs');exports.unique = _chunkJUPDV6DZcjs.a;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJUPDV6DZcjs = require('./chunk-JUPDV6DZ.cjs');require('./chunk-YJWH5VIJ.cjs');require('./chunk-BO34ARLY.cjs');require('./chunk-N5JE6642.cjs');require('./chunk-MBGSSEZN.cjs');exports.unique = _chunkJUPDV6DZcjs.a;
|
package/dist/unique.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-X7PFDZGQ.js";import"./chunk-LSODZ3GY.js";import"./chunk-QHBVEZSR.js";import"./chunk-EPU4K3DD.js";export{a as unique};
|
|
1
|
+
import{a}from"./chunk-X7PFDZGQ.js";import"./chunk-LSODZ3GY.js";import"./chunk-QHBVEZSR.js";import"./chunk-EPU4K3DD.js";import"./chunk-EK7ODJWE.js";export{a as unique};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Simplify, IsLiteral, Writable } from 'type-fest';
|
|
2
2
|
import { I as IsUnion } from './is-union-Bx34mF34.cjs';
|
|
3
3
|
|
|
4
|
-
type UpsertProp<T, K extends PropertyKey, V> = Simplify<Omit<T, K> & (IsSingleLiteral<K> extends true ? Writable<Required<Record<K, V>>> :
|
|
5
|
-
{
|
|
4
|
+
type UpsertProp<T, K extends PropertyKey, V> = Simplify<Omit<T, K> & (IsSingleLiteral<K> extends true ? Writable<Required<Record<K, V>>> : {
|
|
6
5
|
-readonly [P in keyof T as P extends K ? P : never]: T[P] | V;
|
|
7
6
|
} & {
|
|
8
7
|
-readonly [P in K as P extends keyof T ? never : P]?: V;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Simplify, IsLiteral, Writable } from 'type-fest';
|
|
2
2
|
import { I as IsUnion } from './is-union-Bx34mF34.js';
|
|
3
3
|
|
|
4
|
-
type UpsertProp<T, K extends PropertyKey, V> = Simplify<Omit<T, K> & (IsSingleLiteral<K> extends true ? Writable<Required<Record<K, V>>> :
|
|
5
|
-
{
|
|
4
|
+
type UpsertProp<T, K extends PropertyKey, V> = Simplify<Omit<T, K> & (IsSingleLiteral<K> extends true ? Writable<Required<Record<K, V>>> : {
|
|
6
5
|
-readonly [P in keyof T as P extends K ? P : never]: T[P] | V;
|
|
7
6
|
} & {
|
|
8
7
|
-readonly [P in K as P extends keyof T ? never : P]?: V;
|
package/dist/values.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLTDI6TR7cjs = require('./chunk-LTDI6TR7.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.values = _chunkLTDI6TR7cjs.a;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLTDI6TR7cjs = require('./chunk-LTDI6TR7.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.values = _chunkLTDI6TR7cjs.a;
|
package/dist/values.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as EnumerableStringKeyedValueOf } from './enumerable-string-keyed-value-of-
|
|
1
|
+
import { E as EnumerableStringKeyedValueOf } from './enumerable-string-keyed-value-of-BU9R_cEk.cjs';
|
|
2
2
|
import { I as IterableContainer } from './iterable-container-BTpDVdNc.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
|
package/dist/values.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as EnumerableStringKeyedValueOf } from './enumerable-string-keyed-value-of-
|
|
1
|
+
import { E as EnumerableStringKeyedValueOf } from './enumerable-string-keyed-value-of-BU9R_cEk.js';
|
|
2
2
|
import { I as IterableContainer } from './iterable-container-BTpDVdNc.js';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
|
package/dist/values.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-VOFKZP4G.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as values};
|
|
1
|
+
import{a}from"./chunk-VOFKZP4G.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as values};
|
package/dist/zip-with.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBUOTA64Pcjs = require('./chunk-BUOTA64P.cjs');require('./chunk-GZJMERDJ.cjs');exports.zipWith = _chunkBUOTA64Pcjs.a;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBUOTA64Pcjs = require('./chunk-BUOTA64P.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.zipWith = _chunkBUOTA64Pcjs.a;
|
package/dist/zip-with.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-Z7DYKN6W.js";import"./chunk-KGPDVVVV.js";export{a as zipWith};
|
|
1
|
+
import{a}from"./chunk-Z7DYKN6W.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as zipWith};
|
package/dist/zip.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKGWDTRVRcjs = require('./chunk-KGWDTRVR.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.zip = _chunkKGWDTRVRcjs.a;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKGWDTRVRcjs = require('./chunk-KGWDTRVR.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.zip = _chunkKGWDTRVRcjs.a;
|
package/dist/zip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-K7T2WOD7.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as zip};
|
|
1
|
+
import{a}from"./chunk-K7T2WOD7.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as zip};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vinicunca/perkakas",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.7.0",
|
|
5
5
|
"description": "Utility for JavaScript and Typescript.",
|
|
6
6
|
"author": "praburangki<https://github.com/praburangki>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
"node": ">=20.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"type-fest": "^4.
|
|
40
|
+
"type-fest": "^4.41.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@types/node": "^22.
|
|
44
|
-
"@vinicunca/eslint-config": "^3.
|
|
45
|
-
"@vitest/coverage-v8": "^3.
|
|
46
|
-
"bumpp": "^10.0
|
|
47
|
-
"eslint": "^9.
|
|
48
|
-
"prettier": "^3.
|
|
49
|
-
"taze": "^
|
|
50
|
-
"tsup": "^8.
|
|
51
|
-
"typescript": "^5.8.
|
|
52
|
-
"vitest": "^3.
|
|
43
|
+
"@types/node": "^22.16.5",
|
|
44
|
+
"@vinicunca/eslint-config": "^3.18.0",
|
|
45
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
46
|
+
"bumpp": "^10.2.0",
|
|
47
|
+
"eslint": "^9.31.0",
|
|
48
|
+
"prettier": "^3.6.2",
|
|
49
|
+
"taze": "^19.1.0",
|
|
50
|
+
"tsup": "^8.5.0",
|
|
51
|
+
"typescript": "^5.8.3",
|
|
52
|
+
"vitest": "^3.2.4"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "tsup",
|
package/dist/chunk-5SAUYUEK.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=n=>Object.assign(n,{single:!0});export{e as a};
|
package/dist/chunk-6HSB3NFW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as P}from"./chunk-J6WPJH72.js";function s(...e){return P(r,e)}function r(e,u,t){let[n,...a]=u;if(n===void 0)return t;if(Array.isArray(e)){let o=[...e];return o[n]=r(e[n],a,t),o}let{[n]:T,...y}=e;return{...y,[n]:r(T,a,t)}}export{s as a};
|
package/dist/chunk-6L5XEBJG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./chunk-J6WPJH72.js";function a(...n){return t(c,n)}function c(n,r){let o={};for(let e of r)e in n&&(o[e]=n[e]);return o}export{a};
|
package/dist/chunk-A2PAJNYA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function u(n,t,e){return n(e[0])?r=>t(r,...e):t(...e)}var x=Object.assign(a,{defaultCase:R});function a(...n){return u(s,o,n)}function o(n,...t){for(let[e,r]of t)if(e(n))return r(n);throw new Error("conditional: data failed for all cases")}function s(n){if(!Array.isArray(n))return!1;let[t,e,...r]=n;return typeof t=="function"&&t.length<=1&&typeof e=="function"&&e.length<=1&&r.length===0}function R(n=d){return[T,n]}function T(){return!0}function d(){}export{x as a};
|
package/dist/chunk-AWXJSK4F.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function T(c,{triggerAt:l="end",minQuietPeriodMs:u,maxBurstDurationMs:t,minGapMs:o,reducer:p=g}){let e,n,d,r;function a(){let i=d;i!==void 0&&(d=void 0,c(i),o!==void 0&&(n=setTimeout(f,o)))}function f(){clearTimeout(n),n=void 0,e===void 0&&a()}function m(){clearTimeout(e),e=void 0,r=void 0,n===void 0&&a()}return{call:(...i)=>{let s=e===void 0&&n===void 0;if((l!=="start"||s)&&(d=p(d,...i)),!(e===void 0&&!s)){if(u!==void 0||t!==void 0||o===void 0){clearTimeout(e);let y=Date.now();r??=y;let R=t===void 0?u??0:Math.min(u??t,t-(y-r));e=setTimeout(m,R)}l!=="end"&&s&&a()}},cancel:()=>{clearTimeout(e),e=void 0,r=void 0,clearTimeout(n),n=void 0,d=void 0},flush:()=>{m(),f()},get isIdle(){return e===void 0&&n===void 0}}}var g=()=>"";export{T as a};
|
package/dist/chunk-CZLV6ZLZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=/^(?:\.?(?<propName>[^.[\]]+)|\[(?<index>.+?)\])(?<rest>.*)$/u;function r(t){if(t.length===0)return[];let e=n.exec(t);return e?.groups===void 0?[t]:[e.groups.index??e.groups.propName,...r(e.groups.rest)]}export{r as a};
|
package/dist/chunk-F3JXHUP4.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZ6OOXW67cjs = require('./chunk-Z6OOXW67.cjs');var _chunkEROXO3T4cjs = require('./chunk-EROXO3T4.cjs');function y(n,e,r){return e<0||e>=n.length?void 0:c([...n],0,n.length-1,e,r)}function c(n,e,r,o,u){if(e===r)return n[e];let t=l(n,e,r,u);return o===t?n[o]:c(n,o<t?e:t+1,o<t?t-1:r,o,u)}function l(n,e,r,o){let u=n[r],t=e;for(let m=e;m<r;m++)o(n[m],u)<0&&(_chunkZ6OOXW67cjs.a.call(void 0, n,t,m),t+=1);return _chunkZ6OOXW67cjs.a.call(void 0, n,t,r),t}function d(...n){return _chunkEROXO3T4cjs.b.call(void 0, a,n)}function a(n,e,r){return y(n,r>=0?r:n.length+r,e)}exports.a = d;
|
package/dist/chunk-FMUPPQZE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as u}from"./chunk-J6WPJH72.js";function s(...n){return u(l,n)}function l(n,e){let t=n.entries(),r=t.next();if(r.done??!1)return 0;let{value:[,i]}=r,a=e(i,0,n);for(let[o,m]of t){let b=e(m,o,n);a+=b}return a}export{s as a};
|
package/dist/chunk-FP3LV577.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./chunk-7KBK2RWQ.js";import{a as o}from"./chunk-ITDJLXHO.js";function p(...n){return t(a,n)}function a(n,y){if(!o(n,2))return n[0];let[e]=n,[,...i]=n;for(let r of i)y(r,e)<0&&(e=r);return e}export{p as a};
|
package/dist/chunk-GFQXVPLP.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXR72I63Wcjs = require('./chunk-XR72I63W.cjs');function p(...n){return _chunkXR72I63Wcjs.a.call(void 0, u,n)}function u(n,t=[],r=[]){if(typeof n=="function")return n;if(typeof n!="object"||n===null||n instanceof Date||n instanceof RegExp)return structuredClone(n);let o=t.indexOf(n);return o>=0?r[o]:(t.push(n),Array.isArray(n)?y(n,t,r):s(n,t,r))}function s(n,t,r){let o={};r.push(o);for(let[e,c]of Object.entries(n))o[e]=u(c,t,r);return o}function y(n,t,r){let o=[];r.push(o);for(let[e,c]of n.entries())o[e]=u(c,t,r);return o}exports.a = p;
|
package/dist/chunk-GOUUMCT7.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }function T(c,{triggerAt:l="end",minQuietPeriodMs:u,maxBurstDurationMs:t,minGapMs:o,reducer:p=g}){let e,n,d,r;function a(){let i=d;i!==void 0&&(d=void 0,c(i),o!==void 0&&(n=setTimeout(f,o)))}function f(){clearTimeout(n),n=void 0,e===void 0&&a()}function m(){clearTimeout(e),e=void 0,r=void 0,n===void 0&&a()}return{call:(...i)=>{let s=e===void 0&&n===void 0;if((l!=="start"||s)&&(d=p(d,...i)),!(e===void 0&&!s)){if(u!==void 0||t!==void 0||o===void 0){clearTimeout(e);let y=Date.now();r??=y;let R=t===void 0?_nullishCoalesce(u, () => (0)):Math.min(_nullishCoalesce(u, () => (t)),t-(y-r));e=setTimeout(m,R)}l!=="end"&&s&&a()}},cancel:()=>{clearTimeout(e),e=void 0,r=void 0,clearTimeout(n),n=void 0,d=void 0},flush:()=>{m(),f()},get isIdle(){return e===void 0&&n===void 0}}}var g=()=>"";exports.a = T;
|
package/dist/chunk-HRK4GMT2.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXR72I63Wcjs = require('./chunk-XR72I63W.cjs');function a(...n){return _chunkXR72I63Wcjs.a.call(void 0, c,n)}function c(n,r){let o={};for(let e of r)e in n&&(o[e]=n[e]);return o}exports.a = a;
|
package/dist/chunk-ICYGL2YZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./chunk-J6WPJH72.js";function p(...n){return i(u,n)}function u(n,t=[],r=[]){if(typeof n=="function")return n;if(typeof n!="object"||n===null||n instanceof Date||n instanceof RegExp)return structuredClone(n);let o=t.indexOf(n);return o>=0?r[o]:(t.push(n),Array.isArray(n)?y(n,t,r):s(n,t,r))}function s(n,t,r){let o={};r.push(o);for(let[e,c]of Object.entries(n))o[e]=u(c,t,r);return o}function y(n,t,r){let o=[];r.push(o);for(let[e,c]of n.entries())o[e]=u(c,t,r);return o}export{p as a};
|
package/dist/chunk-J3ZXNDMT.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEROXO3T4cjs = require('./chunk-EROXO3T4.cjs');var _chunk66JP4PUGcjs = require('./chunk-66JP4PUG.cjs');function p(...n){return _chunkEROXO3T4cjs.a.call(void 0, a,n)}function a(n,y){if(!_chunk66JP4PUGcjs.a.call(void 0, n,2))return n[0];let[e]=n,[,...i]=n;for(let r of i)y(r,e)<0&&(e=r);return e}exports.a = p;
|
package/dist/chunk-MBC7VZHY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-J6WPJH72.js";function t(...r){return e(Object.entries,r)}export{t as a};
|
package/dist/chunk-NQGMUM3E.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXR72I63Wcjs = require('./chunk-XR72I63W.cjs');function s(...e){return _chunkXR72I63Wcjs.a.call(void 0, r,e)}function r(e,u,t){let[n,...a]=u;if(n===void 0)return t;if(Array.isArray(e)){let o=[...e];return o[n]=r(e[n],a,t),o}let{[n]:T,...y}=e;return{...y,[n]:r(T,a,t)}}exports.a = s;
|
package/dist/chunk-OBWPUDD3.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var e=n=>Object.assign(n,{single:!0});exports.a = e;
|
package/dist/chunk-SQZULO7V.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./chunk-J6WPJH72.js";function y(...e){return n(l,e)}function l(e,a){let t={...e};for(let[r,o]of Object.entries(t))a(o,r,e)&&delete t[r];return t}export{y as a};
|
package/dist/chunk-UDSRBKNR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./chunk-YYEJOSR3.js";import{b as p}from"./chunk-7KBK2RWQ.js";function y(n,e,r){return e<0||e>=n.length?void 0:c([...n],0,n.length-1,e,r)}function c(n,e,r,o,u){if(e===r)return n[e];let t=l(n,e,r,u);return o===t?n[o]:c(n,o<t?e:t+1,o<t?t-1:r,o,u)}function l(n,e,r,o){let u=n[r],t=e;for(let m=e;m<r;m++)o(n[m],u)<0&&(i(n,t,m),t+=1);return i(n,t,r),t}function d(...n){return p(a,n)}function a(n,e,r){return y(n,r>=0?r:n.length+r,e)}export{d as a};
|
package/dist/chunk-VRZNQSZN.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var n=/^(?:\.?(?<propName>[^.[\]]+)|\[(?<index>.+?)\])(?<rest>.*)$/u;function r(t){if(t.length===0)return[];let e=n.exec(t);return _optionalChain([e, 'optionalAccess', _ => _.groups])===void 0?[t]:[_nullishCoalesce(e.groups.index, () => (e.groups.propName)),...r(e.groups.rest)]}exports.a = r;
|
package/dist/chunk-WYM2JV5T.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});function u(n,t,e){return n(e[0])?r=>t(r,...e):t(...e)}var x=Object.assign(a,{defaultCase:R});function a(...n){return u(s,o,n)}function o(n,...t){for(let[e,r]of t)if(e(n))return r(n);throw new Error("conditional: data failed for all cases")}function s(n){if(!Array.isArray(n))return!1;let[t,e,...r]=n;return typeof t=="function"&&t.length<=1&&typeof e=="function"&&e.length<=1&&r.length===0}function R(n=d){return[T,n]}function T(){return!0}function d(){}exports.a = x;
|
package/dist/chunk-XU4TDKMD.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkXR72I63Wcjs = require('./chunk-XR72I63W.cjs');function s(...n){return _chunkXR72I63Wcjs.a.call(void 0, l,n)}function l(n,e){let t=n.entries(),r=t.next();if(_nullishCoalesce(r.done, () => (!1)))return 0;let{value:[,i]}=r,a=e(i,0,n);for(let[o,m]of t){let b=e(m,o,n);a+=b}return a}exports.a = s;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { EmptyObject } from 'type-fest';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A union of all values of properties in T which are not keyed by a symbol,
|
|
5
|
-
* following the definition of `Object.values` and `Object.entries`.
|
|
6
|
-
*/
|
|
7
|
-
type EnumerableStringKeyedValueOf<T> = ValuesOf<{
|
|
8
|
-
[K in keyof T]-?: K extends symbol ? never : T[K];
|
|
9
|
-
}>;
|
|
10
|
-
/**
|
|
11
|
-
* Extracts the value type from an object type T.
|
|
12
|
-
*/
|
|
13
|
-
type ValuesOf<T> = T extends EmptyObject ? T[keyof T] : T extends Record<PropertyKey, infer V> ? V : never;
|
|
14
|
-
|
|
15
|
-
export type { EnumerableStringKeyedValueOf as E };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { EmptyObject } from 'type-fest';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A union of all values of properties in T which are not keyed by a symbol,
|
|
5
|
-
* following the definition of `Object.values` and `Object.entries`.
|
|
6
|
-
*/
|
|
7
|
-
type EnumerableStringKeyedValueOf<T> = ValuesOf<{
|
|
8
|
-
[K in keyof T]-?: K extends symbol ? never : T[K];
|
|
9
|
-
}>;
|
|
10
|
-
/**
|
|
11
|
-
* Extracts the value type from an object type T.
|
|
12
|
-
*/
|
|
13
|
-
type ValuesOf<T> = T extends EmptyObject ? T[keyof T] : T extends Record<PropertyKey, infer V> ? V : never;
|
|
14
|
-
|
|
15
|
-
export type { EnumerableStringKeyedValueOf as E };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict"; function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkAQRYBCA3cjs = require('./chunk-AQRYBCA3.cjs');var _chunkHC3HZK4Qcjs = require('./chunk-HC3HZK4Q.cjs');var _chunkGOUUMCT7cjs = require('./chunk-GOUUMCT7.cjs');function n(e,{timing:t,waitMs:l,maxWaitMs:i}){if(i!==void 0&&l!==void 0&&i<l)throw new Error(`debounce: maxWaitMs (${i.toString()}) cannot be less than waitMs (${l.toString()})`);let o,s=_chunkGOUUMCT7cjs.a.call(void 0, d=>{o=e(...d)},{reducer:(d,...u)=>u,minQuietPeriodMs:_nullishCoalesce(_nullishCoalesce(l, () => (i)), () => (0)),...i!==void 0&&{maxBurstDurationMs:i},...t==="leading"?{triggerAt:"start"}:t==="both"?{triggerAt:"both"}:{triggerAt:"end"}});return{call:(...d)=>(s.call(...d),o),flush:()=>(s.flush(),o),cancel:()=>{s.cancel()},get isPending(){return!s.isIdle},get cachedValue(){return o}}}describe("main functionality",()=>{it("should debounce a function",async()=>{let e=vi.fn(_chunkAQRYBCA3cjs.a.call(void 0, )),t=n(e,{waitMs:32});expect([t.call("a"),t.call("b"),t.call("c")]).toStrictEqual([void 0,void 0,void 0]),expect(e).toHaveBeenCalledTimes(0),await _chunkHC3HZK4Qcjs.a.call(void 0, 128),expect(e).toHaveBeenCalledTimes(1),expect([t.call("d"),t.call("e"),t.call("f")]).toStrictEqual(["c","c","c"]),expect(e).toHaveBeenCalledTimes(1),await _chunkHC3HZK4Qcjs.a.call(void 0, 256),expect(e).toHaveBeenCalledTimes(2)}),it("subsequent debounced calls return the last `func` result",async()=>{let e=n(_chunkAQRYBCA3cjs.a.call(void 0, ),{waitMs:32});e.call("a"),await _chunkHC3HZK4Qcjs.a.call(void 0, 64),expect(e.call("b")).toBe("a"),await _chunkHC3HZK4Qcjs.a.call(void 0, 128),expect(e.call("c")).toBe("b")}),it("should not immediately call `func` when `wait` is `0`",async()=>{let e=vi.fn(),t=n(e,{});t.call(),t.call(),expect(e).toHaveBeenCalledTimes(0),await _chunkHC3HZK4Qcjs.a.call(void 0, 5),expect(e).toHaveBeenCalledTimes(1)}),it("should apply default options",async()=>{let e=vi.fn();n(e,{waitMs:32}).call(),expect(e).toHaveBeenCalledTimes(0),await _chunkHC3HZK4Qcjs.a.call(void 0, 64),expect(e).toHaveBeenCalledTimes(1)}),it("should support a `leading` option",async()=>{let e=vi.fn(),t=vi.fn(),l=n(e,{waitMs:32,timing:"leading"});l.call(),expect(e).toHaveBeenCalledTimes(1);let i=n(t,{waitMs:32,timing:"both"});i.call(),i.call(),expect(t).toHaveBeenCalledTimes(1),await _chunkHC3HZK4Qcjs.a.call(void 0, 64),expect(t).toHaveBeenCalledTimes(2),l.call(),expect(e).toHaveBeenCalledTimes(2)}),it("subsequent leading debounced calls return the last `func` result",async()=>{let e=n(_chunkAQRYBCA3cjs.a.call(void 0, ),{waitMs:32,timing:"leading"});expect([e.call("a"),e.call("b")]).toStrictEqual(["a","a"]),await _chunkHC3HZK4Qcjs.a.call(void 0, 64),expect([e.call("c"),e.call("d")]).toStrictEqual(["c","c"])}),it("should support a `trailing` option",async()=>{let e=vi.fn();n(e,{waitMs:32,timing:"trailing"}).call(),expect(e).toHaveBeenCalledTimes(0),await _chunkHC3HZK4Qcjs.a.call(void 0, 64),expect(e).toHaveBeenCalledTimes(1)})});describe("optional param maxWaitMs",()=>{it("should support a `maxWait` option",async()=>{let e=vi.fn(_chunkAQRYBCA3cjs.a.call(void 0, )),t=n(e,{waitMs:32,maxWaitMs:64});t.call("a"),t.call("b"),expect(e).toHaveBeenCalledTimes(0),await _chunkHC3HZK4Qcjs.a.call(void 0, 128),expect(e).toHaveBeenCalledTimes(1),t.call("c"),t.call("d"),expect(e).toHaveBeenCalledTimes(1),await _chunkHC3HZK4Qcjs.a.call(void 0, 256),expect(e).toHaveBeenCalledTimes(2)}),it("should support `maxWait` in a tight loop",async()=>{let e=vi.fn(),t=vi.fn(),l=n(e,{waitMs:32,maxWaitMs:128}),i=n(t,{waitMs:96}),o=Date.now();for(;Date.now()-o<320;)l.call(),i.call();await _chunkHC3HZK4Qcjs.a.call(void 0, 1),expect(t).toHaveBeenCalledTimes(0),expect(e).not.toHaveBeenCalledTimes(0)}),it("should queue a trailing call for subsequent debounced calls after `maxWait`",async()=>{let e=vi.fn(),t=n(e,{waitMs:200,maxWaitMs:200});t.call(),setTimeout(()=>{t.call()},190),setTimeout(()=>{t.call()},200),setTimeout(()=>{t.call()},210),await _chunkHC3HZK4Qcjs.a.call(void 0, 500),expect(e).toHaveBeenCalledTimes(2)}),it("should cancel `maxDelayed` when `delayed` is invoked",async()=>{let e=vi.fn(),t=n(e,{waitMs:32,maxWaitMs:64});t.call(),await _chunkHC3HZK4Qcjs.a.call(void 0, 128),t.call(),expect(e).toHaveBeenCalledTimes(1),await _chunkHC3HZK4Qcjs.a.call(void 0, 192),expect(e).toHaveBeenCalledTimes(2)}),it("works like a leaky bucket when only maxWaitMs is set",async()=>{let e=vi.fn(),t=n(e,{maxWaitMs:32});t.call(),expect(e).toHaveBeenCalledTimes(0),await _chunkHC3HZK4Qcjs.a.call(void 0, 16),t.call(),expect(e).toHaveBeenCalledTimes(0),await _chunkHC3HZK4Qcjs.a.call(void 0, 17),expect(e).toHaveBeenCalledTimes(1)})});describe("additional functionality",()=>{it("can cancel before the timer starts",async()=>{let e=n(_chunkAQRYBCA3cjs.a.call(void 0, ),{waitMs:32});expect(()=>{e.cancel()}).not.toThrow(),expect(e.call("hello")).toBeUndefined(),await _chunkHC3HZK4Qcjs.a.call(void 0, 32),expect(e.call("world")).toBe("hello")}),it("can cancel the timer",async()=>{let e="Hello, World!",t=vi.fn(()=>e),l=n(t,{waitMs:32});expect(l.call()).toBeUndefined(),expect(t).toHaveBeenCalledTimes(0),await _chunkHC3HZK4Qcjs.a.call(void 0, 1),expect(l.call()).toBeUndefined(),expect(t).toHaveBeenCalledTimes(0),l.cancel(),await _chunkHC3HZK4Qcjs.a.call(void 0, 32),expect(l.call()).toBeUndefined(),expect(t).toHaveBeenCalledTimes(0),await _chunkHC3HZK4Qcjs.a.call(void 0, 32),expect(l.call()).toStrictEqual(e),expect(t).toHaveBeenCalledTimes(1)}),it("can cancel after the timer ends",async()=>{let e=n(_chunkAQRYBCA3cjs.a.call(void 0, ),{waitMs:32});expect(e.call("hello")).toBeUndefined(),await _chunkHC3HZK4Qcjs.a.call(void 0, 32),expect(e.call("world")).toBe("hello"),expect(()=>{e.cancel()}).not.toThrow()}),it("can cancel maxWait timer",async()=>{let e=n(_chunkAQRYBCA3cjs.a.call(void 0, ),{waitMs:16,maxWaitMs:32});expect(e.call("hello")).toBeUndefined(),await _chunkHC3HZK4Qcjs.a.call(void 0, 1),e.cancel(),await _chunkHC3HZK4Qcjs.a.call(void 0, 32),expect(e.call("world")).toBeUndefined()}),it("can return a cached value",()=>{let e=n(_chunkAQRYBCA3cjs.a.call(void 0, ),{timing:"leading",waitMs:32});expect(e.cachedValue).toBeUndefined(),expect(e.call("hello")).toBe("hello"),expect(e.cachedValue).toBe("hello")}),it("can check for inflight timers (trailing)",async()=>{let e=n(_chunkAQRYBCA3cjs.a.call(void 0, ),{waitMs:32});expect(e.isPending).toBe(!1),expect(e.call("hello")).toBeUndefined(),expect(e.isPending).toBe(!0),await _chunkHC3HZK4Qcjs.a.call(void 0, 1),expect(e.isPending).toBe(!0),await _chunkHC3HZK4Qcjs.a.call(void 0, 32),expect(e.isPending).toBe(!1)}),it("can check for inflight timers (leading)",async()=>{let e=n(_chunkAQRYBCA3cjs.a.call(void 0, ),{timing:"leading",waitMs:32});expect(e.isPending).toBe(!1),expect(e.call("hello")).toBe("hello"),expect(e.isPending).toBe(!0),await _chunkHC3HZK4Qcjs.a.call(void 0, 1),expect(e.isPending).toBe(!0),await _chunkHC3HZK4Qcjs.a.call(void 0, 32),expect(e.isPending).toBe(!1)}),it("can flush before a cool-down",async()=>{let e=n(_chunkAQRYBCA3cjs.a.call(void 0, ),{waitMs:32});expect(e.flush()).toBeUndefined(),expect(e.call("hello")).toBeUndefined(),await _chunkHC3HZK4Qcjs.a.call(void 0, 32),expect(e.call("world")).toBe("hello")}),it("can flush during a cool-down",async()=>{let e=n(_chunkAQRYBCA3cjs.a.call(void 0, ),{waitMs:32});expect(e.call("hello")).toBeUndefined(),await _chunkHC3HZK4Qcjs.a.call(void 0, 1),expect(e.call("world")).toBeUndefined(),await _chunkHC3HZK4Qcjs.a.call(void 0, 1),expect(e.flush()).toBe("world")}),it("can flush after a cool-down",async()=>{let e=n(_chunkAQRYBCA3cjs.a.call(void 0, ),{waitMs:32});expect(e.call("hello")).toBeUndefined(),await _chunkHC3HZK4Qcjs.a.call(void 0, 32),expect(e.flush()).toBe("hello")})});describe("errors",()=>{it("prevents maxWaitMs to be less then waitMs",()=>{expect(()=>n(_chunkAQRYBCA3cjs.a.call(void 0, ),{waitMs:32,maxWaitMs:16})).toThrow("debounce: maxWaitMs (16) cannot be less than waitMs (32)")})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c}from"./chunk-46GBCFAG.js";import{a}from"./chunk-6SYP2DRD.js";import{a as r}from"./chunk-AWXJSK4F.js";function n(e,{timing:t,waitMs:l,maxWaitMs:i}){if(i!==void 0&&l!==void 0&&i<l)throw new Error(`debounce: maxWaitMs (${i.toString()}) cannot be less than waitMs (${l.toString()})`);let o,s=r(d=>{o=e(...d)},{reducer:(d,...u)=>u,minQuietPeriodMs:l??i??0,...i!==void 0&&{maxBurstDurationMs:i},...t==="leading"?{triggerAt:"start"}:t==="both"?{triggerAt:"both"}:{triggerAt:"end"}});return{call:(...d)=>(s.call(...d),o),flush:()=>(s.flush(),o),cancel:()=>{s.cancel()},get isPending(){return!s.isIdle},get cachedValue(){return o}}}describe("main functionality",()=>{it("should debounce a function",async()=>{let e=vi.fn(c()),t=n(e,{waitMs:32});expect([t.call("a"),t.call("b"),t.call("c")]).toStrictEqual([void 0,void 0,void 0]),expect(e).toHaveBeenCalledTimes(0),await a(128),expect(e).toHaveBeenCalledTimes(1),expect([t.call("d"),t.call("e"),t.call("f")]).toStrictEqual(["c","c","c"]),expect(e).toHaveBeenCalledTimes(1),await a(256),expect(e).toHaveBeenCalledTimes(2)}),it("subsequent debounced calls return the last `func` result",async()=>{let e=n(c(),{waitMs:32});e.call("a"),await a(64),expect(e.call("b")).toBe("a"),await a(128),expect(e.call("c")).toBe("b")}),it("should not immediately call `func` when `wait` is `0`",async()=>{let e=vi.fn(),t=n(e,{});t.call(),t.call(),expect(e).toHaveBeenCalledTimes(0),await a(5),expect(e).toHaveBeenCalledTimes(1)}),it("should apply default options",async()=>{let e=vi.fn();n(e,{waitMs:32}).call(),expect(e).toHaveBeenCalledTimes(0),await a(64),expect(e).toHaveBeenCalledTimes(1)}),it("should support a `leading` option",async()=>{let e=vi.fn(),t=vi.fn(),l=n(e,{waitMs:32,timing:"leading"});l.call(),expect(e).toHaveBeenCalledTimes(1);let i=n(t,{waitMs:32,timing:"both"});i.call(),i.call(),expect(t).toHaveBeenCalledTimes(1),await a(64),expect(t).toHaveBeenCalledTimes(2),l.call(),expect(e).toHaveBeenCalledTimes(2)}),it("subsequent leading debounced calls return the last `func` result",async()=>{let e=n(c(),{waitMs:32,timing:"leading"});expect([e.call("a"),e.call("b")]).toStrictEqual(["a","a"]),await a(64),expect([e.call("c"),e.call("d")]).toStrictEqual(["c","c"])}),it("should support a `trailing` option",async()=>{let e=vi.fn();n(e,{waitMs:32,timing:"trailing"}).call(),expect(e).toHaveBeenCalledTimes(0),await a(64),expect(e).toHaveBeenCalledTimes(1)})});describe("optional param maxWaitMs",()=>{it("should support a `maxWait` option",async()=>{let e=vi.fn(c()),t=n(e,{waitMs:32,maxWaitMs:64});t.call("a"),t.call("b"),expect(e).toHaveBeenCalledTimes(0),await a(128),expect(e).toHaveBeenCalledTimes(1),t.call("c"),t.call("d"),expect(e).toHaveBeenCalledTimes(1),await a(256),expect(e).toHaveBeenCalledTimes(2)}),it("should support `maxWait` in a tight loop",async()=>{let e=vi.fn(),t=vi.fn(),l=n(e,{waitMs:32,maxWaitMs:128}),i=n(t,{waitMs:96}),o=Date.now();for(;Date.now()-o<320;)l.call(),i.call();await a(1),expect(t).toHaveBeenCalledTimes(0),expect(e).not.toHaveBeenCalledTimes(0)}),it("should queue a trailing call for subsequent debounced calls after `maxWait`",async()=>{let e=vi.fn(),t=n(e,{waitMs:200,maxWaitMs:200});t.call(),setTimeout(()=>{t.call()},190),setTimeout(()=>{t.call()},200),setTimeout(()=>{t.call()},210),await a(500),expect(e).toHaveBeenCalledTimes(2)}),it("should cancel `maxDelayed` when `delayed` is invoked",async()=>{let e=vi.fn(),t=n(e,{waitMs:32,maxWaitMs:64});t.call(),await a(128),t.call(),expect(e).toHaveBeenCalledTimes(1),await a(192),expect(e).toHaveBeenCalledTimes(2)}),it("works like a leaky bucket when only maxWaitMs is set",async()=>{let e=vi.fn(),t=n(e,{maxWaitMs:32});t.call(),expect(e).toHaveBeenCalledTimes(0),await a(16),t.call(),expect(e).toHaveBeenCalledTimes(0),await a(17),expect(e).toHaveBeenCalledTimes(1)})});describe("additional functionality",()=>{it("can cancel before the timer starts",async()=>{let e=n(c(),{waitMs:32});expect(()=>{e.cancel()}).not.toThrow(),expect(e.call("hello")).toBeUndefined(),await a(32),expect(e.call("world")).toBe("hello")}),it("can cancel the timer",async()=>{let e="Hello, World!",t=vi.fn(()=>e),l=n(t,{waitMs:32});expect(l.call()).toBeUndefined(),expect(t).toHaveBeenCalledTimes(0),await a(1),expect(l.call()).toBeUndefined(),expect(t).toHaveBeenCalledTimes(0),l.cancel(),await a(32),expect(l.call()).toBeUndefined(),expect(t).toHaveBeenCalledTimes(0),await a(32),expect(l.call()).toStrictEqual(e),expect(t).toHaveBeenCalledTimes(1)}),it("can cancel after the timer ends",async()=>{let e=n(c(),{waitMs:32});expect(e.call("hello")).toBeUndefined(),await a(32),expect(e.call("world")).toBe("hello"),expect(()=>{e.cancel()}).not.toThrow()}),it("can cancel maxWait timer",async()=>{let e=n(c(),{waitMs:16,maxWaitMs:32});expect(e.call("hello")).toBeUndefined(),await a(1),e.cancel(),await a(32),expect(e.call("world")).toBeUndefined()}),it("can return a cached value",()=>{let e=n(c(),{timing:"leading",waitMs:32});expect(e.cachedValue).toBeUndefined(),expect(e.call("hello")).toBe("hello"),expect(e.cachedValue).toBe("hello")}),it("can check for inflight timers (trailing)",async()=>{let e=n(c(),{waitMs:32});expect(e.isPending).toBe(!1),expect(e.call("hello")).toBeUndefined(),expect(e.isPending).toBe(!0),await a(1),expect(e.isPending).toBe(!0),await a(32),expect(e.isPending).toBe(!1)}),it("can check for inflight timers (leading)",async()=>{let e=n(c(),{timing:"leading",waitMs:32});expect(e.isPending).toBe(!1),expect(e.call("hello")).toBe("hello"),expect(e.isPending).toBe(!0),await a(1),expect(e.isPending).toBe(!0),await a(32),expect(e.isPending).toBe(!1)}),it("can flush before a cool-down",async()=>{let e=n(c(),{waitMs:32});expect(e.flush()).toBeUndefined(),expect(e.call("hello")).toBeUndefined(),await a(32),expect(e.call("world")).toBe("hello")}),it("can flush during a cool-down",async()=>{let e=n(c(),{waitMs:32});expect(e.call("hello")).toBeUndefined(),await a(1),expect(e.call("world")).toBeUndefined(),await a(1),expect(e.flush()).toBe("world")}),it("can flush after a cool-down",async()=>{let e=n(c(),{waitMs:32});expect(e.call("hello")).toBeUndefined(),await a(32),expect(e.flush()).toBe("hello")})});describe("errors",()=>{it("prevents maxWaitMs to be less then waitMs",()=>{expect(()=>n(c(),{waitMs:32,maxWaitMs:16})).toThrow("debounce: maxWaitMs (16) cannot be less than waitMs (32)")})});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { IsStringLiteral, Split, IsNumericLiteral, IsSymbolLiteral, KeysOfUnion } from 'type-fest';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Check if a type is guaranteed to be a bounded record: a record with a finite
|
|
5
|
-
* set of keys.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* IfBoundedRecord<{ a: 1, 1: "a" }>; //=> true
|
|
9
|
-
* IfBoundedRecord<Record<string | number, unknown>>; //=> false
|
|
10
|
-
* IfBoundedRecord<Record<`prefix_${number}`, unknown>>; //=> false
|
|
11
|
-
*/
|
|
12
|
-
type IfBoundedRecord<T, TypeIfBoundedRecord = true, TypeIfUnboundedRecord = false> = IsBoundedKey<KeysOfUnion<T>> extends true ? TypeIfBoundedRecord : TypeIfUnboundedRecord;
|
|
13
|
-
/**
|
|
14
|
-
* Checks if a type is a bounded key: a union of bounded strings, numeric
|
|
15
|
-
* literals, or symbol literals.
|
|
16
|
-
*/
|
|
17
|
-
type IsBoundedKey<T> = T extends unknown ? IsStringLiteral<T> extends true ? IsBoundedString<T> : IsNumericLiteral<T> extends true ? true : IsSymbolLiteral<T> : never;
|
|
18
|
-
/**
|
|
19
|
-
* Checks if a type is a bounded string: a type that only has a finite
|
|
20
|
-
* number of strings that are that type.
|
|
21
|
-
*
|
|
22
|
-
* Most relevant for template literals: IsBoundedString<`${1 | 2}_${3 | 4}`> is
|
|
23
|
-
* true, and IsBoundedString<`${1 | 2}_${number}`> is false.
|
|
24
|
-
*/
|
|
25
|
-
type IsBoundedString<T> = T extends string ? Split<T, ''>[number] extends infer U ? [
|
|
26
|
-
`${number}`
|
|
27
|
-
] extends [U] ? false : [string] extends [U] ? false : true : false : false;
|
|
28
|
-
|
|
29
|
-
export type { IfBoundedRecord as I };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { IsStringLiteral, Split, IsNumericLiteral, IsSymbolLiteral, KeysOfUnion } from 'type-fest';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Check if a type is guaranteed to be a bounded record: a record with a finite
|
|
5
|
-
* set of keys.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* IfBoundedRecord<{ a: 1, 1: "a" }>; //=> true
|
|
9
|
-
* IfBoundedRecord<Record<string | number, unknown>>; //=> false
|
|
10
|
-
* IfBoundedRecord<Record<`prefix_${number}`, unknown>>; //=> false
|
|
11
|
-
*/
|
|
12
|
-
type IfBoundedRecord<T, TypeIfBoundedRecord = true, TypeIfUnboundedRecord = false> = IsBoundedKey<KeysOfUnion<T>> extends true ? TypeIfBoundedRecord : TypeIfUnboundedRecord;
|
|
13
|
-
/**
|
|
14
|
-
* Checks if a type is a bounded key: a union of bounded strings, numeric
|
|
15
|
-
* literals, or symbol literals.
|
|
16
|
-
*/
|
|
17
|
-
type IsBoundedKey<T> = T extends unknown ? IsStringLiteral<T> extends true ? IsBoundedString<T> : IsNumericLiteral<T> extends true ? true : IsSymbolLiteral<T> : never;
|
|
18
|
-
/**
|
|
19
|
-
* Checks if a type is a bounded string: a type that only has a finite
|
|
20
|
-
* number of strings that are that type.
|
|
21
|
-
*
|
|
22
|
-
* Most relevant for template literals: IsBoundedString<`${1 | 2}_${3 | 4}`> is
|
|
23
|
-
* true, and IsBoundedString<`${1 | 2}_${number}`> is false.
|
|
24
|
-
*/
|
|
25
|
-
type IsBoundedString<T> = T extends string ? Split<T, ''>[number] extends infer U ? [
|
|
26
|
-
`${number}`
|
|
27
|
-
] extends [U] ? false : [string] extends [U] ? false : true : false : false;
|
|
28
|
-
|
|
29
|
-
export type { IfBoundedRecord as I };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { E as EnumerableStringKeyOf } from './enumerable-string-key-of-BQ4aR5ep.cjs';
|
|
2
|
-
import { E as EnumerableStringKeyedValueOf } from './enumerable-string-keyed-value-of-CLzltniW.cjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* This is the type you'd get from doing:
|
|
6
|
-
* `Object.fromEntries(Object.entries(x))`.
|
|
7
|
-
*/
|
|
8
|
-
type ReconstructedRecord<T> = Record<EnumerableStringKeyOf<T>, EnumerableStringKeyedValueOf<T>>;
|
|
9
|
-
|
|
10
|
-
export type { ReconstructedRecord as R };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { E as EnumerableStringKeyOf } from './enumerable-string-key-of-BQ4aR5ep.js';
|
|
2
|
-
import { E as EnumerableStringKeyedValueOf } from './enumerable-string-keyed-value-of-CLzltniW.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* This is the type you'd get from doing:
|
|
6
|
-
* `Object.fromEntries(Object.entries(x))`.
|
|
7
|
-
*/
|
|
8
|
-
type ReconstructedRecord<T> = Record<EnumerableStringKeyOf<T>, EnumerableStringKeyedValueOf<T>>;
|
|
9
|
-
|
|
10
|
-
export type { ReconstructedRecord as R };
|
|
File without changes
|
|
File without changes
|