@stryke/helpers 0.9.26 → 0.9.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/arg-identity.cjs +1 -1
- package/dist/arg-identity.d.cts +14 -2
- package/dist/arg-identity.d.cts.map +1 -0
- package/dist/arg-identity.d.mts +14 -2
- package/dist/arg-identity.d.mts.map +1 -0
- package/dist/arg-identity.mjs +2 -1
- package/dist/arg-identity.mjs.map +1 -0
- package/dist/convert/src/to-string-key.cjs +1 -0
- package/dist/convert/src/to-string-key.mjs +2 -0
- package/dist/convert/src/to-string-key.mjs.map +1 -0
- package/dist/debounce.cjs +1 -1
- package/dist/debounce.d.cts +47 -2
- package/dist/debounce.d.cts.map +1 -0
- package/dist/debounce.d.mts +47 -2
- package/dist/debounce.d.mts.map +1 -0
- package/dist/debounce.mjs +2 -1
- package/dist/debounce.mjs.map +1 -0
- package/dist/deep-clone.cjs +1 -1
- package/dist/deep-clone.d.cts +65 -2
- package/dist/deep-clone.d.cts.map +1 -0
- package/dist/deep-clone.d.mts +65 -2
- package/dist/deep-clone.d.mts.map +1 -0
- package/dist/deep-clone.mjs +2 -1
- package/dist/deep-clone.mjs.map +1 -0
- package/dist/deep-merge.cjs +1 -1
- package/dist/deep-merge.d.cts +26 -2
- package/dist/deep-merge.d.cts.map +1 -0
- package/dist/deep-merge.d.mts +26 -2
- package/dist/deep-merge.d.mts.map +1 -0
- package/dist/deep-merge.mjs +2 -1
- package/dist/deep-merge.mjs.map +1 -0
- package/dist/delay.cjs +1 -1
- package/dist/delay.d.cts +77 -2
- package/dist/delay.d.cts.map +1 -0
- package/dist/delay.d.mts +77 -2
- package/dist/delay.d.mts.map +1 -0
- package/dist/delay.mjs +2 -1
- package/dist/delay.mjs.map +1 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.mjs +2 -1
- package/dist/errors.mjs.map +1 -0
- package/dist/filter-empty.cjs +1 -1
- package/dist/filter-empty.d.cts +5 -2
- package/dist/filter-empty.d.cts.map +1 -0
- package/dist/filter-empty.d.mts +5 -2
- package/dist/filter-empty.d.mts.map +1 -0
- package/dist/filter-empty.mjs +2 -1
- package/dist/filter-empty.mjs.map +1 -0
- package/dist/flatten-object.cjs +1 -1
- package/dist/flatten-object.d.cts +35 -2
- package/dist/flatten-object.d.cts.map +1 -0
- package/dist/flatten-object.d.mts +35 -2
- package/dist/flatten-object.d.mts.map +1 -0
- package/dist/flatten-object.mjs +2 -1
- package/dist/flatten-object.mjs.map +1 -0
- package/dist/get-field.cjs +1 -1
- package/dist/get-field.d.cts +254 -2
- package/dist/get-field.d.cts.map +1 -0
- package/dist/get-field.d.mts +254 -2
- package/dist/get-field.d.mts.map +1 -0
- package/dist/get-field.mjs +2 -1
- package/dist/get-field.mjs.map +1 -0
- package/dist/get-ordered-by.cjs +1 -1
- package/dist/get-ordered-by.d.cts +39 -2
- package/dist/get-ordered-by.d.cts.map +1 -0
- package/dist/get-ordered-by.d.mts +39 -2
- package/dist/get-ordered-by.d.mts.map +1 -0
- package/dist/get-ordered-by.mjs +2 -1
- package/dist/get-ordered-by.mjs.map +1 -0
- package/dist/get-unique.cjs +1 -1
- package/dist/get-unique.d.cts +26 -2
- package/dist/get-unique.d.cts.map +1 -0
- package/dist/get-unique.d.mts +26 -2
- package/dist/get-unique.d.mts.map +1 -0
- package/dist/get-unique.mjs +2 -1
- package/dist/get-unique.mjs.map +1 -0
- package/dist/identity.cjs +1 -1
- package/dist/identity.d.cts +18 -2
- package/dist/identity.d.cts.map +1 -0
- package/dist/identity.d.mts +18 -2
- package/dist/identity.d.mts.map +1 -0
- package/dist/identity.mjs +2 -1
- package/dist/identity.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +31 -31
- package/dist/index.d.mts +31 -31
- package/dist/index.mjs +1 -1
- package/dist/is-equal.cjs +1 -1
- package/dist/is-equal.d.cts +22 -2
- package/dist/is-equal.d.cts.map +1 -0
- package/dist/is-equal.d.mts +22 -2
- package/dist/is-equal.d.mts.map +1 -0
- package/dist/is-equal.mjs +2 -1
- package/dist/is-equal.mjs.map +1 -0
- package/dist/lru-cache.cjs +1 -1
- package/dist/lru-cache.d.cts +103 -2
- package/dist/lru-cache.d.cts.map +1 -0
- package/dist/lru-cache.d.mts +103 -2
- package/dist/lru-cache.d.mts.map +1 -0
- package/dist/lru-cache.mjs +2 -1
- package/dist/lru-cache.mjs.map +1 -0
- package/dist/match-sorter.cjs +1 -1
- package/dist/match-sorter.d.cts +78 -2
- package/dist/match-sorter.d.cts.map +1 -0
- package/dist/match-sorter.d.mts +78 -2
- package/dist/match-sorter.d.mts.map +1 -0
- package/dist/match-sorter.mjs +2 -1
- package/dist/match-sorter.mjs.map +1 -0
- package/dist/memoize.cjs +1 -1
- package/dist/memoize.d.cts +11 -2
- package/dist/memoize.d.cts.map +1 -0
- package/dist/memoize.d.mts +11 -2
- package/dist/memoize.d.mts.map +1 -0
- package/dist/memoize.mjs +2 -1
- package/dist/memoize.mjs.map +1 -0
- package/dist/mutex.cjs +1 -1
- package/dist/mutex.d.cts +72 -2
- package/dist/mutex.d.cts.map +1 -0
- package/dist/mutex.d.mts +72 -2
- package/dist/mutex.d.mts.map +1 -0
- package/dist/mutex.mjs +2 -1
- package/dist/mutex.mjs.map +1 -0
- package/dist/noop.cjs +1 -1
- package/dist/noop.d.cts +22 -2
- package/dist/noop.d.cts.map +1 -0
- package/dist/noop.d.mts +22 -2
- package/dist/noop.d.mts.map +1 -0
- package/dist/noop.mjs +2 -1
- package/dist/noop.mjs.map +1 -0
- package/dist/omit.cjs +1 -1
- package/dist/omit.d.cts +22 -2
- package/dist/omit.d.cts.map +1 -0
- package/dist/omit.d.mts +22 -2
- package/dist/omit.d.mts.map +1 -0
- package/dist/omit.mjs +2 -1
- package/dist/omit.mjs.map +1 -0
- package/dist/once.cjs +1 -1
- package/dist/once.d.cts +13 -2
- package/dist/once.d.cts.map +1 -0
- package/dist/once.d.mts +13 -2
- package/dist/once.d.mts.map +1 -0
- package/dist/once.mjs +2 -1
- package/dist/once.mjs.map +1 -0
- package/dist/pick.cjs +1 -1
- package/dist/pick.d.cts +22 -2
- package/dist/pick.d.cts.map +1 -0
- package/dist/pick.d.mts +22 -2
- package/dist/pick.d.mts.map +1 -0
- package/dist/pick.mjs +2 -1
- package/dist/pick.mjs.map +1 -0
- package/dist/remove-accents.cjs +1 -1
- package/dist/remove-accents.d.cts +12 -2
- package/dist/remove-accents.d.cts.map +1 -0
- package/dist/remove-accents.d.mts +12 -2
- package/dist/remove-accents.d.mts.map +1 -0
- package/dist/remove-accents.mjs +2 -1
- package/dist/remove-accents.mjs.map +1 -0
- package/dist/remove-empty-items.cjs +1 -1
- package/dist/remove-empty-items.d.cts +11 -2
- package/dist/remove-empty-items.d.cts.map +1 -0
- package/dist/remove-empty-items.d.mts +11 -2
- package/dist/remove-empty-items.d.mts.map +1 -0
- package/dist/remove-empty-items.mjs +2 -1
- package/dist/remove-empty-items.mjs.map +1 -0
- package/dist/semaphore.cjs +1 -1
- package/dist/semaphore.d.cts +86 -2
- package/dist/semaphore.d.cts.map +1 -0
- package/dist/semaphore.d.mts +86 -2
- package/dist/semaphore.d.mts.map +1 -0
- package/dist/semaphore.mjs +2 -1
- package/dist/semaphore.mjs.map +1 -0
- package/dist/set-field.cjs +1 -1
- package/dist/set-field.d.cts +16 -2
- package/dist/set-field.d.cts.map +1 -0
- package/dist/set-field.d.mts +16 -2
- package/dist/set-field.d.mts.map +1 -0
- package/dist/set-field.mjs +2 -1
- package/dist/set-field.mjs.map +1 -0
- package/dist/throttle.cjs +1 -1
- package/dist/throttle.d.cts +32 -2
- package/dist/throttle.d.cts.map +1 -0
- package/dist/throttle.d.mts +32 -2
- package/dist/throttle.d.mts.map +1 -0
- package/dist/throttle.mjs +2 -1
- package/dist/throttle.mjs.map +1 -0
- package/dist/timeout.cjs +1 -1
- package/dist/timeout.d.cts +12 -2
- package/dist/timeout.d.cts.map +1 -0
- package/dist/timeout.d.mts +12 -2
- package/dist/timeout.d.mts.map +1 -0
- package/dist/timeout.mjs +2 -1
- package/dist/timeout.mjs.map +1 -0
- package/dist/to-deep-key.cjs +1 -1
- package/dist/to-deep-key.d.cts +42 -2
- package/dist/to-deep-key.d.cts.map +1 -0
- package/dist/to-deep-key.d.mts +42 -2
- package/dist/to-deep-key.d.mts.map +1 -0
- package/dist/to-deep-key.mjs +2 -1
- package/dist/to-deep-key.mjs.map +1 -0
- package/dist/to-path.cjs +1 -1
- package/dist/to-path.d.cts +24 -2
- package/dist/to-path.d.cts.map +1 -0
- package/dist/to-path.d.mts +24 -2
- package/dist/to-path.d.mts.map +1 -0
- package/dist/to-path.mjs +2 -1
- package/dist/to-path.mjs.map +1 -0
- package/dist/type-checks/src/get-object-tag.cjs +1 -0
- package/dist/type-checks/src/get-object-tag.mjs +2 -0
- package/dist/type-checks/src/get-object-tag.mjs.map +1 -0
- package/dist/type-checks/src/is-deep-key.cjs +1 -0
- package/dist/type-checks/src/is-deep-key.mjs +2 -0
- package/dist/type-checks/src/is-deep-key.mjs.map +1 -0
- package/dist/type-checks/src/is-empty.cjs +1 -0
- package/dist/type-checks/src/is-empty.mjs +2 -0
- package/dist/type-checks/src/is-empty.mjs.map +1 -0
- package/dist/type-checks/src/is-function.cjs +1 -0
- package/dist/type-checks/src/is-function.mjs +2 -0
- package/dist/type-checks/src/is-function.mjs.map +1 -0
- package/dist/type-checks/src/is-mergeable-object.cjs +1 -0
- package/dist/type-checks/src/is-mergeable-object.mjs +2 -0
- package/dist/type-checks/src/is-mergeable-object.mjs.map +1 -0
- package/dist/type-checks/src/is-non-null-object.cjs +1 -0
- package/dist/type-checks/src/is-non-null-object.mjs +2 -0
- package/dist/type-checks/src/is-non-null-object.mjs.map +1 -0
- package/dist/type-checks/src/is-null.cjs +1 -0
- package/dist/type-checks/src/is-null.mjs +2 -0
- package/dist/type-checks/src/is-null.mjs.map +1 -0
- package/dist/type-checks/src/is-number.cjs +1 -0
- package/dist/type-checks/src/is-number.mjs +2 -0
- package/dist/type-checks/src/is-number.mjs.map +1 -0
- package/dist/type-checks/src/is-object-index.cjs +1 -0
- package/dist/type-checks/src/is-object-index.mjs +2 -0
- package/dist/type-checks/src/is-object-index.mjs.map +1 -0
- package/dist/type-checks/src/is-object.cjs +1 -0
- package/dist/type-checks/src/is-object.mjs +2 -0
- package/dist/type-checks/src/is-object.mjs.map +1 -0
- package/dist/type-checks/src/is-plain-object.cjs +1 -0
- package/dist/type-checks/src/is-plain-object.mjs +2 -0
- package/dist/type-checks/src/is-plain-object.mjs.map +1 -0
- package/dist/type-checks/src/is-primitive.cjs +1 -0
- package/dist/type-checks/src/is-primitive.mjs +2 -0
- package/dist/type-checks/src/is-primitive.mjs.map +1 -0
- package/dist/type-checks/src/is-react-element.cjs +1 -0
- package/dist/type-checks/src/is-react-element.mjs +2 -0
- package/dist/type-checks/src/is-react-element.mjs.map +1 -0
- package/dist/type-checks/src/is-set-string.cjs +1 -0
- package/dist/type-checks/src/is-set-string.mjs +2 -0
- package/dist/type-checks/src/is-set-string.mjs.map +1 -0
- package/dist/type-checks/src/is-set.cjs +1 -0
- package/dist/type-checks/src/is-set.mjs +2 -0
- package/dist/type-checks/src/is-set.mjs.map +1 -0
- package/dist/{is-string-CvmuuuDj.mjs → type-checks/src/is-string.cjs} +1 -2
- package/dist/type-checks/src/is-string.mjs +2 -0
- package/dist/type-checks/src/is-string.mjs.map +1 -0
- package/dist/type-checks/src/is-typed-array.cjs +1 -0
- package/dist/type-checks/src/is-typed-array.mjs +2 -0
- package/dist/type-checks/src/is-typed-array.mjs.map +1 -0
- package/dist/type-checks/src/is-undefined.cjs +1 -0
- package/dist/type-checks/src/is-undefined.mjs +2 -0
- package/dist/type-checks/src/is-undefined.mjs.map +1 -0
- package/dist/type-checks/src/property-exists.cjs +1 -0
- package/dist/type-checks/src/property-exists.mjs +2 -0
- package/dist/type-checks/src/property-exists.mjs.map +1 -0
- package/dist/types/src/base.d.cts +6 -0
- package/dist/types/src/base.d.cts.map +1 -0
- package/dist/types/src/base.d.mts +6 -0
- package/dist/types/src/base.d.mts.map +1 -0
- package/dist/types/src/json.d.cts +28 -0
- package/dist/types/src/json.d.cts.map +1 -0
- package/dist/types/src/json.d.mts +28 -0
- package/dist/types/src/json.d.mts.map +1 -0
- package/dist/{object-CHmrmQna.d.mts → types/src/object.d.cts} +6 -40
- package/dist/types/src/object.d.cts.map +1 -0
- package/dist/{object-D8HGAGMr.d.cts → types/src/object.d.mts} +6 -40
- package/dist/types/src/object.d.mts.map +1 -0
- package/dist/types/src/string.d.cts +6 -0
- package/dist/types/src/string.d.cts.map +1 -0
- package/dist/types/src/string.d.mts +6 -0
- package/dist/types/src/string.d.mts.map +1 -0
- package/dist/types/src/utilities.d.cts +7 -0
- package/dist/types/src/utilities.d.cts.map +1 -0
- package/dist/types/src/utilities.d.mts +7 -0
- package/dist/types/src/utilities.d.mts.map +1 -0
- package/dist/unflatten-object.cjs +1 -1
- package/dist/unflatten-object.d.cts +35 -2
- package/dist/unflatten-object.d.cts.map +1 -0
- package/dist/unflatten-object.d.mts +35 -2
- package/dist/unflatten-object.d.mts.map +1 -0
- package/dist/unflatten-object.mjs +2 -1
- package/dist/unflatten-object.mjs.map +1 -0
- package/dist/union.cjs +1 -1
- package/dist/union.d.cts +24 -2
- package/dist/union.d.cts.map +1 -0
- package/dist/union.d.mts +24 -2
- package/dist/union.d.mts.map +1 -0
- package/dist/union.mjs +2 -1
- package/dist/union.mjs.map +1 -0
- package/dist/with-timeout.cjs +1 -1
- package/dist/with-timeout.d.cts +24 -2
- package/dist/with-timeout.d.cts.map +1 -0
- package/dist/with-timeout.d.mts +24 -2
- package/dist/with-timeout.d.mts.map +1 -0
- package/dist/with-timeout.mjs +2 -1
- package/dist/with-timeout.mjs.map +1 -0
- package/package.json +3 -3
- package/dist/arg-identity-BIir8uzO.d.mts +0 -14
- package/dist/arg-identity-BIir8uzO.d.mts.map +0 -1
- package/dist/arg-identity-BfviduMt.mjs +0 -2
- package/dist/arg-identity-BfviduMt.mjs.map +0 -1
- package/dist/arg-identity-C-pVjd0u.d.cts +0 -14
- package/dist/arg-identity-C-pVjd0u.d.cts.map +0 -1
- package/dist/arg-identity-dlKw6BsD.cjs +0 -1
- package/dist/debounce-C5O3IDKy.mjs +0 -2
- package/dist/debounce-C5O3IDKy.mjs.map +0 -1
- package/dist/debounce-CIMf8-Yr.d.mts +0 -47
- package/dist/debounce-CIMf8-Yr.d.mts.map +0 -1
- package/dist/debounce-CLb-VvJv.d.cts +0 -47
- package/dist/debounce-CLb-VvJv.d.cts.map +0 -1
- package/dist/debounce-SIYbhEOF.cjs +0 -1
- package/dist/deep-clone-BlN5QTtW.mjs +0 -2
- package/dist/deep-clone-BlN5QTtW.mjs.map +0 -1
- package/dist/deep-clone-CoUy-Hrt.cjs +0 -1
- package/dist/deep-clone-CpLJcTgz.d.mts +0 -65
- package/dist/deep-clone-CpLJcTgz.d.mts.map +0 -1
- package/dist/deep-clone-jRNy1xoj.d.cts +0 -65
- package/dist/deep-clone-jRNy1xoj.d.cts.map +0 -1
- package/dist/deep-merge-BDZ6c79O.mjs +0 -2
- package/dist/deep-merge-BDZ6c79O.mjs.map +0 -1
- package/dist/deep-merge-BpFjvumi.cjs +0 -1
- package/dist/deep-merge-C9qDSleg.d.cts +0 -26
- package/dist/deep-merge-C9qDSleg.d.cts.map +0 -1
- package/dist/deep-merge-eCT712Cv.d.mts +0 -26
- package/dist/deep-merge-eCT712Cv.d.mts.map +0 -1
- package/dist/delay-Bd_sGzMj.d.mts +0 -77
- package/dist/delay-Bd_sGzMj.d.mts.map +0 -1
- package/dist/delay-UwR_fCwt.cjs +0 -1
- package/dist/delay-VkcrQf1l.d.cts +0 -77
- package/dist/delay-VkcrQf1l.d.cts.map +0 -1
- package/dist/delay-wdNbY6sk.mjs +0 -2
- package/dist/delay-wdNbY6sk.mjs.map +0 -1
- package/dist/errors-BXYY8wXj.cjs +0 -1
- package/dist/errors-DWX9ET_b.mjs +0 -2
- package/dist/errors-DWX9ET_b.mjs.map +0 -1
- package/dist/filter-empty-5_nMg04e.cjs +0 -1
- package/dist/filter-empty-BMtd0K07.d.mts +0 -5
- package/dist/filter-empty-BMtd0K07.d.mts.map +0 -1
- package/dist/filter-empty-C2fq9M7o.d.cts +0 -5
- package/dist/filter-empty-C2fq9M7o.d.cts.map +0 -1
- package/dist/filter-empty-Dsc1ymCj.mjs +0 -2
- package/dist/filter-empty-Dsc1ymCj.mjs.map +0 -1
- package/dist/flatten-object-Bk2VT-b2.d.mts +0 -35
- package/dist/flatten-object-Bk2VT-b2.d.mts.map +0 -1
- package/dist/flatten-object-D-EbEZqR.cjs +0 -1
- package/dist/flatten-object-DFCZmly9.mjs +0 -2
- package/dist/flatten-object-DFCZmly9.mjs.map +0 -1
- package/dist/flatten-object-DjaJJaY0.d.cts +0 -35
- package/dist/flatten-object-DjaJJaY0.d.cts.map +0 -1
- package/dist/get-field-5XqtknPs.d.mts +0 -254
- package/dist/get-field-5XqtknPs.d.mts.map +0 -1
- package/dist/get-field-D4F_p-Ov.cjs +0 -1
- package/dist/get-field-ngQ9O38X.mjs +0 -2
- package/dist/get-field-ngQ9O38X.mjs.map +0 -1
- package/dist/get-field-oltWWNRO.d.cts +0 -254
- package/dist/get-field-oltWWNRO.d.cts.map +0 -1
- package/dist/get-object-tag-D53RvMgo.cjs +0 -1
- package/dist/get-object-tag-oBoWkttN.mjs +0 -2
- package/dist/get-object-tag-oBoWkttN.mjs.map +0 -1
- package/dist/get-ordered-by-C45FfW2T.d.mts +0 -39
- package/dist/get-ordered-by-C45FfW2T.d.mts.map +0 -1
- package/dist/get-ordered-by-CBKKJr4R.mjs +0 -2
- package/dist/get-ordered-by-CBKKJr4R.mjs.map +0 -1
- package/dist/get-ordered-by-D2Sr6vUN.cjs +0 -1
- package/dist/get-ordered-by-DuD7QRma.d.cts +0 -39
- package/dist/get-ordered-by-DuD7QRma.d.cts.map +0 -1
- package/dist/get-unique-BOiakY6A.cjs +0 -1
- package/dist/get-unique-C0SBPUBv.d.cts +0 -26
- package/dist/get-unique-C0SBPUBv.d.cts.map +0 -1
- package/dist/get-unique-DZ6E1Kvc.d.mts +0 -26
- package/dist/get-unique-DZ6E1Kvc.d.mts.map +0 -1
- package/dist/get-unique-DzZ7Z34U.mjs +0 -2
- package/dist/get-unique-DzZ7Z34U.mjs.map +0 -1
- package/dist/identity-B_cGeF8o.d.mts +0 -18
- package/dist/identity-B_cGeF8o.d.mts.map +0 -1
- package/dist/identity-DBwwvmGU.mjs +0 -2
- package/dist/identity-DBwwvmGU.mjs.map +0 -1
- package/dist/identity-DRhIvbPG.d.cts +0 -18
- package/dist/identity-DRhIvbPG.d.cts.map +0 -1
- package/dist/identity-z2xaIqpe.cjs +0 -1
- package/dist/is-empty-C7vlSVFD.mjs +0 -2
- package/dist/is-empty-C7vlSVFD.mjs.map +0 -1
- package/dist/is-empty-DZZDqzjD.cjs +0 -1
- package/dist/is-equal-0Z-K2uIG.mjs +0 -2
- package/dist/is-equal-0Z-K2uIG.mjs.map +0 -1
- package/dist/is-equal-BJgVhUVS.cjs +0 -1
- package/dist/is-equal-BMlMHlVi.d.cts +0 -22
- package/dist/is-equal-BMlMHlVi.d.cts.map +0 -1
- package/dist/is-equal-Baqurdpn.d.mts +0 -22
- package/dist/is-equal-Baqurdpn.d.mts.map +0 -1
- package/dist/is-number-BcjxCzDM.cjs +0 -1
- package/dist/is-number-bwhfkHlC.mjs +0 -2
- package/dist/is-number-bwhfkHlC.mjs.map +0 -1
- package/dist/is-plain-object-BQuFhL4M.cjs +0 -1
- package/dist/is-plain-object-D8GSMOhY.mjs +0 -2
- package/dist/is-plain-object-D8GSMOhY.mjs.map +0 -1
- package/dist/is-set-B9o0NIT4.mjs +0 -2
- package/dist/is-set-B9o0NIT4.mjs.map +0 -1
- package/dist/is-set-ByJOY6h2.cjs +0 -1
- package/dist/is-set-string-48_jZFw0.cjs +0 -1
- package/dist/is-set-string-Dr1MlMk0.mjs +0 -2
- package/dist/is-set-string-Dr1MlMk0.mjs.map +0 -1
- package/dist/is-string-CvmuuuDj.mjs.map +0 -1
- package/dist/is-string-DPanLeA_.cjs +0 -1
- package/dist/lru-cache-CzQ_kKXk.d.mts +0 -103
- package/dist/lru-cache-CzQ_kKXk.d.mts.map +0 -1
- package/dist/lru-cache-D4VEIgtR.d.cts +0 -103
- package/dist/lru-cache-D4VEIgtR.d.cts.map +0 -1
- package/dist/lru-cache-DLY_yZRN.mjs +0 -2
- package/dist/lru-cache-DLY_yZRN.mjs.map +0 -1
- package/dist/lru-cache-DgTSGx5W.cjs +0 -1
- package/dist/match-sorter-B9_7YvTo.mjs +0 -2
- package/dist/match-sorter-B9_7YvTo.mjs.map +0 -1
- package/dist/match-sorter-BjnWjkKu.cjs +0 -1
- package/dist/match-sorter-CMYN3GuY.d.cts +0 -78
- package/dist/match-sorter-CMYN3GuY.d.cts.map +0 -1
- package/dist/match-sorter-DCRerxVe.d.mts +0 -78
- package/dist/match-sorter-DCRerxVe.d.mts.map +0 -1
- package/dist/memoize-Cr5jFKxi.mjs +0 -2
- package/dist/memoize-Cr5jFKxi.mjs.map +0 -1
- package/dist/memoize-TyrmWrfR.d.mts +0 -11
- package/dist/memoize-TyrmWrfR.d.mts.map +0 -1
- package/dist/memoize-qxvbI-0y.cjs +0 -1
- package/dist/memoize-tSTYY522.d.cts +0 -11
- package/dist/memoize-tSTYY522.d.cts.map +0 -1
- package/dist/mutex-CnQQBndt.cjs +0 -1
- package/dist/mutex-DAZduiSP.d.mts +0 -72
- package/dist/mutex-DAZduiSP.d.mts.map +0 -1
- package/dist/mutex-DCyX7B66.d.cts +0 -72
- package/dist/mutex-DCyX7B66.d.cts.map +0 -1
- package/dist/mutex-TqoKHosg.mjs +0 -2
- package/dist/mutex-TqoKHosg.mjs.map +0 -1
- package/dist/noop-B7OetrhD.mjs +0 -2
- package/dist/noop-B7OetrhD.mjs.map +0 -1
- package/dist/noop-BnXKMH6Z.d.mts +0 -22
- package/dist/noop-BnXKMH6Z.d.mts.map +0 -1
- package/dist/noop-CnJXOCpF.d.cts +0 -22
- package/dist/noop-CnJXOCpF.d.cts.map +0 -1
- package/dist/noop-Dpf7hIui.cjs +0 -1
- package/dist/object-CHmrmQna.d.mts.map +0 -1
- package/dist/object-D8HGAGMr.d.cts.map +0 -1
- package/dist/omit-A0uVyAS4.cjs +0 -1
- package/dist/omit-BROsDK0D.mjs +0 -2
- package/dist/omit-BROsDK0D.mjs.map +0 -1
- package/dist/omit-D1FKiOYz.d.cts +0 -22
- package/dist/omit-D1FKiOYz.d.cts.map +0 -1
- package/dist/omit-DpqOAtKt.d.mts +0 -22
- package/dist/omit-DpqOAtKt.d.mts.map +0 -1
- package/dist/once-DNPPQd3P.d.mts +0 -13
- package/dist/once-DNPPQd3P.d.mts.map +0 -1
- package/dist/once-DZCwmdkv.cjs +0 -1
- package/dist/once-DqmxXwEB.d.cts +0 -13
- package/dist/once-DqmxXwEB.d.cts.map +0 -1
- package/dist/once-txoW63yJ.mjs +0 -2
- package/dist/once-txoW63yJ.mjs.map +0 -1
- package/dist/pick-CuXTvXaw.mjs +0 -2
- package/dist/pick-CuXTvXaw.mjs.map +0 -1
- package/dist/pick-DXREvZBr.d.cts +0 -22
- package/dist/pick-DXREvZBr.d.cts.map +0 -1
- package/dist/pick-GDOwAh6I.cjs +0 -1
- package/dist/pick-ZrWD4de2.d.mts +0 -22
- package/dist/pick-ZrWD4de2.d.mts.map +0 -1
- package/dist/remove-accents-BFmyvTRZ.mjs +0 -2
- package/dist/remove-accents-BFmyvTRZ.mjs.map +0 -1
- package/dist/remove-accents-C4C0A2ex.d.mts +0 -12
- package/dist/remove-accents-C4C0A2ex.d.mts.map +0 -1
- package/dist/remove-accents-CXBUC-Id.cjs +0 -1
- package/dist/remove-accents-Yo3-2jWO.d.cts +0 -12
- package/dist/remove-accents-Yo3-2jWO.d.cts.map +0 -1
- package/dist/remove-empty-items-BglsRCyG.d.cts +0 -11
- package/dist/remove-empty-items-BglsRCyG.d.cts.map +0 -1
- package/dist/remove-empty-items-BzI9Vid9.mjs +0 -2
- package/dist/remove-empty-items-BzI9Vid9.mjs.map +0 -1
- package/dist/remove-empty-items-COwdCPHC.d.mts +0 -11
- package/dist/remove-empty-items-COwdCPHC.d.mts.map +0 -1
- package/dist/remove-empty-items-CjTxJuyS.cjs +0 -1
- package/dist/semaphore-4zJqtox8.mjs +0 -2
- package/dist/semaphore-4zJqtox8.mjs.map +0 -1
- package/dist/semaphore-CsGTxqsW.d.cts +0 -86
- package/dist/semaphore-CsGTxqsW.d.cts.map +0 -1
- package/dist/semaphore-DkHqPlow.cjs +0 -1
- package/dist/semaphore-WaZBtCk5.d.mts +0 -86
- package/dist/semaphore-WaZBtCk5.d.mts.map +0 -1
- package/dist/set-field-CUgbKEjW.mjs +0 -2
- package/dist/set-field-CUgbKEjW.mjs.map +0 -1
- package/dist/set-field-CcCiXZNl.d.cts +0 -16
- package/dist/set-field-CcCiXZNl.d.cts.map +0 -1
- package/dist/set-field-DyvXgpNP.d.mts +0 -16
- package/dist/set-field-DyvXgpNP.d.mts.map +0 -1
- package/dist/set-field-mr4GkhFb.cjs +0 -1
- package/dist/throttle-BOKOTo3m.cjs +0 -1
- package/dist/throttle-BWPQuZty.d.cts +0 -32
- package/dist/throttle-BWPQuZty.d.cts.map +0 -1
- package/dist/throttle-BgU4k6qs.d.mts +0 -32
- package/dist/throttle-BgU4k6qs.d.mts.map +0 -1
- package/dist/throttle-CYK3F0mZ.mjs +0 -2
- package/dist/throttle-CYK3F0mZ.mjs.map +0 -1
- package/dist/timeout-43rG9ETK.mjs +0 -2
- package/dist/timeout-43rG9ETK.mjs.map +0 -1
- package/dist/timeout-CLhwG-oo.d.mts +0 -12
- package/dist/timeout-CLhwG-oo.d.mts.map +0 -1
- package/dist/timeout-CoYbhliP.cjs +0 -1
- package/dist/timeout-DC38jHR8.d.cts +0 -12
- package/dist/timeout-DC38jHR8.d.cts.map +0 -1
- package/dist/to-deep-key-Cma9aiEz.cjs +0 -1
- package/dist/to-deep-key-D8uDBd6T.mjs +0 -2
- package/dist/to-deep-key-D8uDBd6T.mjs.map +0 -1
- package/dist/to-deep-key-DO-Z0Zjs.d.mts +0 -42
- package/dist/to-deep-key-DO-Z0Zjs.d.mts.map +0 -1
- package/dist/to-deep-key-DlsE4ziE.d.cts +0 -42
- package/dist/to-deep-key-DlsE4ziE.d.cts.map +0 -1
- package/dist/to-path-BajxeMmo.d.mts +0 -24
- package/dist/to-path-BajxeMmo.d.mts.map +0 -1
- package/dist/to-path-CdOFd4od.cjs +0 -1
- package/dist/to-path-D2zWXeYc.d.cts +0 -24
- package/dist/to-path-D2zWXeYc.d.cts.map +0 -1
- package/dist/to-path-Dm1fe-Ix.mjs +0 -2
- package/dist/to-path-Dm1fe-Ix.mjs.map +0 -1
- package/dist/unflatten-object-C7TE8J80.mjs +0 -2
- package/dist/unflatten-object-C7TE8J80.mjs.map +0 -1
- package/dist/unflatten-object-CPJIUozj.d.mts +0 -35
- package/dist/unflatten-object-CPJIUozj.d.mts.map +0 -1
- package/dist/unflatten-object-CvZj41LG.cjs +0 -1
- package/dist/unflatten-object-Cvbj7Q__.d.cts +0 -35
- package/dist/unflatten-object-Cvbj7Q__.d.cts.map +0 -1
- package/dist/union-BMOMEzO-.d.cts +0 -24
- package/dist/union-BMOMEzO-.d.cts.map +0 -1
- package/dist/union-C-2CRoFc.mjs +0 -2
- package/dist/union-C-2CRoFc.mjs.map +0 -1
- package/dist/union-D4bbjM2i.d.mts +0 -24
- package/dist/union-D4bbjM2i.d.mts.map +0 -1
- package/dist/union-EwdcZzNT.cjs +0 -1
- package/dist/with-timeout-BPaAIZtS.d.cts +0 -24
- package/dist/with-timeout-BPaAIZtS.d.cts.map +0 -1
- package/dist/with-timeout-BoZYdcOg.d.mts +0 -24
- package/dist/with-timeout-BoZYdcOg.d.mts.map +0 -1
- package/dist/with-timeout-CAuUr1ck.mjs +0 -2
- package/dist/with-timeout-CAuUr1ck.mjs.map +0 -1
- package/dist/with-timeout-CPUBGT4X.cjs +0 -1
package/dist/pick.d.mts
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/pick.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a new object composed of the picked object properties.
|
|
4
|
+
*
|
|
5
|
+
* This function takes an object and an array of keys, and returns a new object that
|
|
6
|
+
* includes only the properties corresponding to the specified keys.
|
|
7
|
+
*
|
|
8
|
+
* @param obj - The object to pick keys from.
|
|
9
|
+
* @param keys - An array of keys to be picked from the object.
|
|
10
|
+
* @returns A new object with the specified keys picked.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const obj = { a: 1, b: 2, c: 3 };
|
|
15
|
+
* const result = pick(obj, ['a', 'c']);
|
|
16
|
+
* // result will be { a: 1, c: 3 }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare function pick<T extends Record<string, any>, K extends keyof T>(obj: T, keys: readonly K[]): Pick<T, K>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { pick };
|
|
22
|
+
//# sourceMappingURL=pick.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pick.d.mts","names":[],"sources":["../src/pick.ts"],"sourcesContent":[],"mappings":";;AAmCA;;;;;;;;;;;;;;;;iBAAgB,eAAe,qCAAqC,QAC7D,kBACU,MACd,KAAK,GAAG"}
|
package/dist/pick.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e,t){let n={};for(let r=0;r<t.length;r++){let i=t[r];i&&Object.hasOwn(e,i)&&(n[i]=e[i])}return n}export{e as pick};
|
|
2
|
+
//# sourceMappingURL=pick.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pick.mjs","names":[],"sources":["../src/pick.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software \n\n This code was released as part of a Storm Software project. The project\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/license.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software\n Documentation: https://stormsoftware.com/docs\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Creates a new object composed of the picked object properties.\n *\n * This function takes an object and an array of keys, and returns a new object that\n * includes only the properties corresponding to the specified keys.\n *\n * @param obj - The object to pick keys from.\n * @param keys - An array of keys to be picked from the object.\n * @returns A new object with the specified keys picked.\n *\n * @example\n * ```typescript\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = pick(obj, ['a', 'c']);\n * // result will be { a: 1, c: 3 }\n * ```\n */\nexport function pick<T extends Record<string, any>, K extends keyof T>(\n obj: T,\n keys: readonly K[]\n): Pick<T, K> {\n const result = {} as Pick<T, K>;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n\n if (key && Object.hasOwn(obj, key)) {\n result[key] = obj[key];\n }\n }\n\n return result;\n}\n"],"mappings":"AAmCA,SAAgB,EACd,EACA,EACY,CACZ,IAAM,EAAS,EAAE,CAEjB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAK,OAAQ,IAAK,CACpC,IAAM,EAAM,EAAK,GAEb,GAAO,OAAO,OAAO,EAAK,EAAI,GAChC,EAAO,GAAO,EAAI,IAItB,OAAO"}
|
package/dist/remove-accents.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=
|
|
1
|
+
const e={À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,Ấ:`A`,Ắ:`A`,Ẳ:`A`,Ẵ:`A`,Ặ:`A`,Æ:`AE`,Ầ:`A`,Ằ:`A`,Ȃ:`A`,Ç:`C`,Ḉ:`C`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,Ế:`E`,Ḗ:`E`,Ề:`E`,Ḕ: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,M̧:`M`,m̧:`m`,O̧:`O`,o̧:`o`,Q̧:`Q`,q̧:`q`,U̧:`U`,u̧:`u`,X̧:`X`,x̧:`x`,Z̧:`Z`,z̧:`z`},t=Object.keys(e).join(`|`),n=new RegExp(t,`g`),r=t=>t.replace(n,t=>e[t]);exports.characterMap=e,exports.removeAccents=r;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/remove-accents.d.ts
|
|
2
|
+
declare const characterMap: Record<string, string>;
|
|
3
|
+
/**
|
|
4
|
+
* Removes accents from a string.
|
|
5
|
+
*
|
|
6
|
+
* @param str - The string to remove accents from
|
|
7
|
+
* @returns The string without accents
|
|
8
|
+
*/
|
|
9
|
+
declare const removeAccents: (str: string) => string;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { characterMap, removeAccents };
|
|
12
|
+
//# sourceMappingURL=remove-accents.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-accents.d.cts","names":[],"sources":["../src/remove-accents.ts"],"sourcesContent":[],"mappings":";cAiBa,cAAc;AAA3B;AA2ZA;;;;;cAAa"}
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/remove-accents.d.ts
|
|
2
|
+
declare const characterMap: Record<string, string>;
|
|
3
|
+
/**
|
|
4
|
+
* Removes accents from a string.
|
|
5
|
+
*
|
|
6
|
+
* @param str - The string to remove accents from
|
|
7
|
+
* @returns The string without accents
|
|
8
|
+
*/
|
|
9
|
+
declare const removeAccents: (str: string) => string;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { characterMap, removeAccents };
|
|
12
|
+
//# sourceMappingURL=remove-accents.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-accents.d.mts","names":[],"sources":["../src/remove-accents.ts"],"sourcesContent":[],"mappings":";cAiBa,cAAc;AAA3B;AA2ZA;;;;;cAAa"}
|
package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Q`,q̌:`q`,Ř̩:`R`,ř̩:`r`,Ṧ:`S`,ṧ:`s`,V̌:`V`,v̌:`v`,W̌:`W`,w̌:`w`,X̌:`X`,x̌:`x`,Y̌:`Y`,y̌:`y`,A̧:`A`,a̧:`a`,B̧:`B`,b̧:`b`,Ḑ:`D`,ḑ:`d`,Ȩ:`E`,ȩ:`e`,Ɛ̧:`E`,ɛ̧:`e`,Ḩ:`H`,ḩ:`h`,I̧:`I`,i̧:`i`,Ɨ̧:`I`,ɨ̧:`i`,M̧:`M`,m̧:`m`,O̧:`O`,o̧:`o`,Q̧:`Q`,q̧:`q`,U̧:`U`,u̧:`u`,X̧:`X`,x̧:`x`,Z̧:`Z`,z̧:`z`},t=Object.keys(e).join(`|`),n=new RegExp(t,`g`),r=t=>t.replace(n,t=>e[t]);export{e as characterMap,r as removeAccents};
|
|
2
|
+
//# sourceMappingURL=remove-accents.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-accents.mjs","names":["characterMap: Record<string, string>"],"sources":["../src/remove-accents.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://stormsoftware.com/projects/stryke/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/stryke/license\n\n ------------------------------------------------------------------- */\n\nexport const characterMap: Record<string, string> = {\n À: \"A\",\n Á: \"A\",\n Â: \"A\",\n Ã: \"A\",\n Ä: \"A\",\n Å: \"A\",\n Ấ: \"A\",\n Ắ: \"A\",\n Ẳ: \"A\",\n Ẵ: \"A\",\n Ặ: \"A\",\n Æ: \"AE\",\n Ầ: \"A\",\n Ằ: \"A\",\n Ȃ: \"A\",\n Ç: \"C\",\n Ḉ: \"C\",\n È: \"E\",\n É: \"E\",\n Ê: \"E\",\n Ë: \"E\",\n Ế: \"E\",\n Ḗ: \"E\",\n Ề: \"E\",\n Ḕ: \"E\",\n Ḝ: \"E\",\n Ȇ: \"E\",\n Ì: \"I\",\n Í: \"I\",\n Î: \"I\",\n Ï: \"I\",\n Ḯ: \"I\",\n Ȋ: \"I\",\n Ð: \"D\",\n Ñ: \"N\",\n Ò: \"O\",\n Ó: \"O\",\n Ô: \"O\",\n Õ: \"O\",\n Ö: \"O\",\n Ø: \"O\",\n Ố: \"O\",\n Ṍ: \"O\",\n Ṓ: \"O\",\n Ȏ: \"O\",\n Ù: \"U\",\n Ú: \"U\",\n Û: \"U\",\n Ü: \"U\",\n Ý: \"Y\",\n à: \"a\",\n á: \"a\",\n â: \"a\",\n ã: \"a\",\n ä: \"a\",\n å: \"a\",\n ấ: \"a\",\n ắ: \"a\",\n ẳ: \"a\",\n ẵ: \"a\",\n ặ: \"a\",\n æ: \"ae\",\n ầ: \"a\",\n ằ: \"a\",\n ȃ: \"a\",\n ç: \"c\",\n ḉ: \"c\",\n è: \"e\",\n é: \"e\",\n ê: \"e\",\n ë: \"e\",\n ế: \"e\",\n ḗ: \"e\",\n ề: \"e\",\n ḕ: \"e\",\n ḝ: \"e\",\n ȇ: \"e\",\n ì: \"i\",\n í: \"i\",\n î: \"i\",\n ï: \"i\",\n ḯ: \"i\",\n ȋ: \"i\",\n ð: \"d\",\n ñ: \"n\",\n ò: \"o\",\n ó: \"o\",\n ô: \"o\",\n õ: \"o\",\n ö: \"o\",\n ø: \"o\",\n ố: \"o\",\n ṍ: \"o\",\n ṓ: \"o\",\n ȏ: \"o\",\n ù: \"u\",\n ú: \"u\",\n û: \"u\",\n ü: \"u\",\n ý: \"y\",\n ÿ: \"y\",\n Ā: \"A\",\n ā: \"a\",\n Ă: \"A\",\n ă: \"a\",\n Ą: \"A\",\n ą: \"a\",\n Ć: \"C\",\n ć: \"c\",\n Ĉ: \"C\",\n ĉ: \"c\",\n Ċ: \"C\",\n ċ: \"c\",\n Č: \"C\",\n č: \"c\",\n C̆: \"C\",\n c̆: \"c\",\n Ď: \"D\",\n ď: \"d\",\n Đ: \"D\",\n đ: \"d\",\n Ē: \"E\",\n ē: \"e\",\n Ĕ: \"E\",\n ĕ: \"e\",\n Ė: \"E\",\n ė: \"e\",\n Ę: \"E\",\n ę: \"e\",\n Ě: \"E\",\n ě: \"e\",\n Ĝ: \"G\",\n Ǵ: \"G\",\n ĝ: \"g\",\n ǵ: \"g\",\n Ğ: \"G\",\n ğ: \"g\",\n Ġ: \"G\",\n ġ: \"g\",\n Ģ: \"G\",\n ģ: \"g\",\n Ĥ: \"H\",\n ĥ: \"h\",\n Ħ: \"H\",\n ħ: \"h\",\n Ḫ: \"H\",\n ḫ: \"h\",\n Ĩ: \"I\",\n ĩ: \"i\",\n Ī: \"I\",\n ī: \"i\",\n Ĭ: \"I\",\n ĭ: \"i\",\n Į: \"I\",\n į: \"i\",\n İ: \"I\",\n ı: \"i\",\n IJ: \"IJ\",\n ij: \"ij\",\n Ĵ: \"J\",\n ĵ: \"j\",\n Ķ: \"K\",\n ķ: \"k\",\n Ḱ: \"K\",\n ḱ: \"k\",\n K̆: \"K\",\n k̆: \"k\",\n Ĺ: \"L\",\n ĺ: \"l\",\n Ļ: \"L\",\n ļ: \"l\",\n Ľ: \"L\",\n ľ: \"l\",\n Ŀ: \"L\",\n ŀ: \"l\",\n Ł: \"l\",\n ł: \"l\",\n Ḿ: \"M\",\n ḿ: \"m\",\n M̆: \"M\",\n m̆: \"m\",\n Ń: \"N\",\n ń: \"n\",\n Ņ: \"N\",\n ņ: \"n\",\n Ň: \"N\",\n ň: \"n\",\n ʼn: \"n\",\n N̆: \"N\",\n n̆: \"n\",\n Ō: \"O\",\n ō: \"o\",\n Ŏ: \"O\",\n ŏ: \"o\",\n Ő: \"O\",\n ő: \"o\",\n Œ: \"OE\",\n œ: \"oe\",\n P̆: \"P\",\n p̆: \"p\",\n Ŕ: \"R\",\n ŕ: \"r\",\n Ŗ: \"R\",\n ŗ: \"r\",\n Ř: \"R\",\n ř: \"r\",\n R̆: \"R\",\n r̆: \"r\",\n Ȓ: \"R\",\n ȓ: \"r\",\n Ś: \"S\",\n ś: \"s\",\n Ŝ: \"S\",\n ŝ: \"s\",\n Ş: \"S\",\n Ș: \"S\",\n ș: \"s\",\n ş: \"s\",\n Š: \"S\",\n š: \"s\",\n Ţ: \"T\",\n ţ: \"t\",\n ț: \"t\",\n Ț: \"T\",\n Ť: \"T\",\n ť: \"t\",\n Ŧ: \"T\",\n ŧ: \"t\",\n T̆: \"T\",\n t̆: \"t\",\n Ũ: \"U\",\n ũ: \"u\",\n Ū: \"U\",\n ū: \"u\",\n Ŭ: \"U\",\n ŭ: \"u\",\n Ů: \"U\",\n ů: \"u\",\n Ű: \"U\",\n ű: \"u\",\n Ų: \"U\",\n ų: \"u\",\n Ȗ: \"U\",\n ȗ: \"u\",\n V̆: \"V\",\n v̆: \"v\",\n Ŵ: \"W\",\n ŵ: \"w\",\n Ẃ: \"W\",\n ẃ: \"w\",\n X̆: \"X\",\n x̆: \"x\",\n Ŷ: \"Y\",\n ŷ: \"y\",\n Ÿ: \"Y\",\n Y̆: \"Y\",\n y̆: \"y\",\n Ź: \"Z\",\n ź: \"z\",\n Ż: \"Z\",\n ż: \"z\",\n Ž: \"Z\",\n ž: \"z\",\n ſ: \"s\",\n ƒ: \"f\",\n Ơ: \"O\",\n ơ: \"o\",\n Ư: \"U\",\n ư: \"u\",\n Ǎ: \"A\",\n ǎ: \"a\",\n Ǐ: \"I\",\n ǐ: \"i\",\n Ǒ: \"O\",\n ǒ: \"o\",\n Ǔ: \"U\",\n ǔ: \"u\",\n Ǖ: \"U\",\n ǖ: \"u\",\n Ǘ: \"U\",\n ǘ: \"u\",\n Ǚ: \"U\",\n ǚ: \"u\",\n Ǜ: \"U\",\n ǜ: \"u\",\n Ứ: \"U\",\n ứ: \"u\",\n Ṹ: \"U\",\n ṹ: \"u\",\n Ǻ: \"A\",\n ǻ: \"a\",\n Ǽ: \"AE\",\n ǽ: \"ae\",\n Ǿ: \"O\",\n ǿ: \"o\",\n Þ: \"TH\",\n þ: \"th\",\n Ṕ: \"P\",\n ṕ: \"p\",\n Ṥ: \"S\",\n ṥ: \"s\",\n X́: \"X\",\n x́: \"x\",\n Ѓ: \"Г\",\n ѓ: \"г\",\n Ќ: \"К\",\n ќ: \"к\",\n A̋: \"A\",\n a̋: \"a\",\n E̋: \"E\",\n e̋: \"e\",\n I̋: \"I\",\n i̋: \"i\",\n Ǹ: \"N\",\n ǹ: \"n\",\n Ồ: \"O\",\n ồ: \"o\",\n Ṑ: \"O\",\n ṑ: \"o\",\n Ừ: \"U\",\n ừ: \"u\",\n Ẁ: \"W\",\n ẁ: \"w\",\n Ỳ: \"Y\",\n ỳ: \"y\",\n Ȁ: \"A\",\n ȁ: \"a\",\n Ȅ: \"E\",\n ȅ: \"e\",\n Ȉ: \"I\",\n ȉ: \"i\",\n Ȍ: \"O\",\n ȍ: \"o\",\n Ȑ: \"R\",\n ȑ: \"r\",\n Ȕ: \"U\",\n ȕ: \"u\",\n B̌: \"B\",\n b̌: \"b\",\n Č̣: \"C\",\n č̣: \"c\",\n Ê̌: \"E\",\n ê̌: \"e\",\n F̌: \"F\",\n f̌: \"f\",\n Ǧ: \"G\",\n ǧ: \"g\",\n Ȟ: \"H\",\n ȟ: \"h\",\n J̌: \"J\",\n ǰ: \"j\",\n Ǩ: \"K\",\n ǩ: \"k\",\n M̌: \"M\",\n m̌: \"m\",\n P̌: \"P\",\n p̌: \"p\",\n Q̌: \"Q\",\n q̌: \"q\",\n Ř̩: \"R\",\n ř̩: \"r\",\n Ṧ: \"S\",\n ṧ: \"s\",\n V̌: \"V\",\n v̌: \"v\",\n W̌: \"W\",\n w̌: \"w\",\n X̌: \"X\",\n x̌: \"x\",\n Y̌: \"Y\",\n y̌: \"y\",\n A̧: \"A\",\n a̧: \"a\",\n B̧: \"B\",\n b̧: \"b\",\n Ḑ: \"D\",\n ḑ: \"d\",\n Ȩ: \"E\",\n ȩ: \"e\",\n Ɛ̧: \"E\",\n ɛ̧: \"e\",\n Ḩ: \"H\",\n ḩ: \"h\",\n I̧: \"I\",\n i̧: \"i\",\n Ɨ̧: \"I\",\n ɨ̧: \"i\",\n M̧: \"M\",\n m̧: \"m\",\n O̧: \"O\",\n o̧: \"o\",\n Q̧: \"Q\",\n q̧: \"q\",\n U̧: \"U\",\n u̧: \"u\",\n X̧: \"X\",\n x̧: \"x\",\n Z̧: \"Z\",\n z̧: \"z\"\n};\n\nconst chars = Object.keys(characterMap).join(\"|\");\nconst allAccents = new RegExp(chars, \"g\");\n\n/**\n * Removes accents from a string.\n *\n * @param str - The string to remove accents from\n * @returns The string without accents\n */\nexport const removeAccents = (str: string) =>\n str.replace(allAccents, match => characterMap[match]!);\n"],"mappings":"AAiBA,MAAaA,EAAuC,CAClD,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,GAAI,IACJ,GAAI,IACJ,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KACH,EAAG,KACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,GAAI,IACJ,GAAI,IACJ,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,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,IACJ,GAAI,IACL,CAEK,EAAQ,OAAO,KAAK,EAAa,CAAC,KAAK,IAAI,CAC3C,EAAa,IAAI,OAAO,EAAO,IAAI,CAQ5B,EAAiB,GAC5B,EAAI,QAAQ,EAAY,GAAS,EAAa,GAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=
|
|
1
|
+
const e=e=>e.filter(Boolean);exports.removeEmptyItems=e;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/remove-empty-items.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Removes empty items from an array
|
|
4
|
+
*
|
|
5
|
+
* @param arr - The array to remove empty items from
|
|
6
|
+
* @returns The array with empty items removed
|
|
7
|
+
*/
|
|
8
|
+
declare const removeEmptyItems: <T = any>(arr: (T | undefined | null)[]) => NonNullable<T>[];
|
|
9
|
+
//#endregion
|
|
10
|
+
export { removeEmptyItems };
|
|
11
|
+
//# sourceMappingURL=remove-empty-items.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-empty-items.d.cts","names":[],"sources":["../src/remove-empty-items.ts"],"sourcesContent":[],"mappings":";;AAuBA;;;;;cAAa,kCACL,4BACL,YAAY"}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/remove-empty-items.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Removes empty items from an array
|
|
4
|
+
*
|
|
5
|
+
* @param arr - The array to remove empty items from
|
|
6
|
+
* @returns The array with empty items removed
|
|
7
|
+
*/
|
|
8
|
+
declare const removeEmptyItems: <T = any>(arr: (T | undefined | null)[]) => NonNullable<T>[];
|
|
9
|
+
//#endregion
|
|
10
|
+
export { removeEmptyItems };
|
|
11
|
+
//# sourceMappingURL=remove-empty-items.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-empty-items.d.mts","names":[],"sources":["../src/remove-empty-items.ts"],"sourcesContent":[],"mappings":";;AAuBA;;;;;cAAa,kCACL,4BACL,YAAY"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
const e=e=>e.filter(Boolean);export{e as removeEmptyItems};
|
|
2
|
+
//# sourceMappingURL=remove-empty-items.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-empty-items.mjs","names":[],"sources":["../src/remove-empty-items.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://stormsoftware.com/projects/stryke/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/stryke/license\n\n ------------------------------------------------------------------- */\n\n/**\n * Removes empty items from an array\n *\n * @param arr - The array to remove empty items from\n * @returns The array with empty items removed\n */\nexport const removeEmptyItems = <T = any>(\n arr: (T | undefined | null)[]\n): NonNullable<T>[] => arr.filter(Boolean) as NonNullable<T>[];\n"],"mappings":"AAuBA,MAAa,EACX,GACqB,EAAI,OAAO,QAAQ"}
|
package/dist/semaphore.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var e=class{capacity;available;deferredTasks=[];constructor(e){this.capacity=e,this.available=e}async acquire(){if(this.available>0){this.available--;return}return new Promise(e=>{this.deferredTasks.push(e)})}release(){let e=this.deferredTasks.shift();if(e!=null){e();return}this.available<this.capacity&&this.available++}};exports.Semaphore=e;
|
package/dist/semaphore.d.cts
CHANGED
|
@@ -1,2 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/semaphore.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A counting semaphore for async functions that manages available permits.
|
|
4
|
+
* Semaphores are mainly used to limit the number of concurrent async tasks.
|
|
5
|
+
*
|
|
6
|
+
* Each `acquire` operation takes a permit or waits until one is available.
|
|
7
|
+
* Each `release` operation adds a permit, potentially allowing a waiting task to proceed.
|
|
8
|
+
*
|
|
9
|
+
* The semaphore ensures fairness by maintaining a FIFO (First In, First Out) order for acquirers.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const sema = new Semaphore(2);
|
|
13
|
+
*
|
|
14
|
+
* async function task() {
|
|
15
|
+
* await sema.acquire();
|
|
16
|
+
* try {
|
|
17
|
+
* // This code can only be executed by two tasks at the same time
|
|
18
|
+
* } finally {
|
|
19
|
+
* sema.release();
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* task();
|
|
24
|
+
* task();
|
|
25
|
+
* task(); // This task will wait until one of the previous tasks releases the semaphore.
|
|
26
|
+
*/
|
|
27
|
+
declare class Semaphore {
|
|
28
|
+
/**
|
|
29
|
+
* The maximum number of concurrent operations allowed.
|
|
30
|
+
*/
|
|
31
|
+
capacity: number;
|
|
32
|
+
/**
|
|
33
|
+
* The number of available permits.
|
|
34
|
+
*/
|
|
35
|
+
available: number;
|
|
36
|
+
private deferredTasks;
|
|
37
|
+
/**
|
|
38
|
+
* Creates an instance of Semaphore.
|
|
39
|
+
* @param capacity - The maximum number of concurrent operations allowed.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const sema = new Semaphore(3); // Allows up to 3 concurrent operations.
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
constructor(capacity: number);
|
|
47
|
+
/**
|
|
48
|
+
* Acquires a semaphore, blocking if necessary until one is available.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const sema = new Semaphore(1);
|
|
53
|
+
*
|
|
54
|
+
* async function criticalSection() {
|
|
55
|
+
* await sema.acquire();
|
|
56
|
+
* try {
|
|
57
|
+
* // This code section cannot be executed simultaneously
|
|
58
|
+
* } finally {
|
|
59
|
+
* sema.release();
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @returns A promise that resolves when the semaphore is acquired.
|
|
65
|
+
*/
|
|
66
|
+
acquire(): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Releases a semaphore, allowing one more operation to proceed.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* const sema = new Semaphore(1);
|
|
72
|
+
*
|
|
73
|
+
* async function task() {
|
|
74
|
+
* await sema.acquire();
|
|
75
|
+
* try {
|
|
76
|
+
* // This code can only be executed by two tasks at the same time
|
|
77
|
+
* } finally {
|
|
78
|
+
* sema.release(); // Allows another waiting task to proceed.
|
|
79
|
+
* }
|
|
80
|
+
* }
|
|
81
|
+
*/
|
|
82
|
+
release(): void;
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
export { Semaphore };
|
|
86
|
+
//# sourceMappingURL=semaphore.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semaphore.d.cts","names":[],"sources":["../src/semaphore.ts"],"sourcesContent":[],"mappings":";;AA0CA;;;;;;;;;;;;;;;;;;;;;;;;cAAa,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA8CM"}
|
package/dist/semaphore.d.mts
CHANGED
|
@@ -1,2 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/semaphore.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A counting semaphore for async functions that manages available permits.
|
|
4
|
+
* Semaphores are mainly used to limit the number of concurrent async tasks.
|
|
5
|
+
*
|
|
6
|
+
* Each `acquire` operation takes a permit or waits until one is available.
|
|
7
|
+
* Each `release` operation adds a permit, potentially allowing a waiting task to proceed.
|
|
8
|
+
*
|
|
9
|
+
* The semaphore ensures fairness by maintaining a FIFO (First In, First Out) order for acquirers.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const sema = new Semaphore(2);
|
|
13
|
+
*
|
|
14
|
+
* async function task() {
|
|
15
|
+
* await sema.acquire();
|
|
16
|
+
* try {
|
|
17
|
+
* // This code can only be executed by two tasks at the same time
|
|
18
|
+
* } finally {
|
|
19
|
+
* sema.release();
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* task();
|
|
24
|
+
* task();
|
|
25
|
+
* task(); // This task will wait until one of the previous tasks releases the semaphore.
|
|
26
|
+
*/
|
|
27
|
+
declare class Semaphore {
|
|
28
|
+
/**
|
|
29
|
+
* The maximum number of concurrent operations allowed.
|
|
30
|
+
*/
|
|
31
|
+
capacity: number;
|
|
32
|
+
/**
|
|
33
|
+
* The number of available permits.
|
|
34
|
+
*/
|
|
35
|
+
available: number;
|
|
36
|
+
private deferredTasks;
|
|
37
|
+
/**
|
|
38
|
+
* Creates an instance of Semaphore.
|
|
39
|
+
* @param capacity - The maximum number of concurrent operations allowed.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const sema = new Semaphore(3); // Allows up to 3 concurrent operations.
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
constructor(capacity: number);
|
|
47
|
+
/**
|
|
48
|
+
* Acquires a semaphore, blocking if necessary until one is available.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const sema = new Semaphore(1);
|
|
53
|
+
*
|
|
54
|
+
* async function criticalSection() {
|
|
55
|
+
* await sema.acquire();
|
|
56
|
+
* try {
|
|
57
|
+
* // This code section cannot be executed simultaneously
|
|
58
|
+
* } finally {
|
|
59
|
+
* sema.release();
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @returns A promise that resolves when the semaphore is acquired.
|
|
65
|
+
*/
|
|
66
|
+
acquire(): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Releases a semaphore, allowing one more operation to proceed.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* const sema = new Semaphore(1);
|
|
72
|
+
*
|
|
73
|
+
* async function task() {
|
|
74
|
+
* await sema.acquire();
|
|
75
|
+
* try {
|
|
76
|
+
* // This code can only be executed by two tasks at the same time
|
|
77
|
+
* } finally {
|
|
78
|
+
* sema.release(); // Allows another waiting task to proceed.
|
|
79
|
+
* }
|
|
80
|
+
* }
|
|
81
|
+
*/
|
|
82
|
+
release(): void;
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
export { Semaphore };
|
|
86
|
+
//# sourceMappingURL=semaphore.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semaphore.d.mts","names":[],"sources":["../src/semaphore.ts"],"sourcesContent":[],"mappings":";;AA0CA;;;;;;;;;;;;;;;;;;;;;;;;cAAa,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA8CM"}
|
package/dist/semaphore.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
var e=class{capacity;available;deferredTasks=[];constructor(e){this.capacity=e,this.available=e}async acquire(){if(this.available>0){this.available--;return}return new Promise(e=>{this.deferredTasks.push(e)})}release(){let e=this.deferredTasks.shift();if(e!=null){e();return}this.available<this.capacity&&this.available++}};export{e as Semaphore};
|
|
2
|
+
//# sourceMappingURL=semaphore.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semaphore.mjs","names":[],"sources":["../src/semaphore.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://stormsoftware.com/projects/stryke/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/stryke/license\n\n ------------------------------------------------------------------- */\n\n/**\n * A counting semaphore for async functions that manages available permits.\n * Semaphores are mainly used to limit the number of concurrent async tasks.\n *\n * Each `acquire` operation takes a permit or waits until one is available.\n * Each `release` operation adds a permit, potentially allowing a waiting task to proceed.\n *\n * The semaphore ensures fairness by maintaining a FIFO (First In, First Out) order for acquirers.\n *\n * @example\n * const sema = new Semaphore(2);\n *\n * async function task() {\n * await sema.acquire();\n * try {\n * // This code can only be executed by two tasks at the same time\n * } finally {\n * sema.release();\n * }\n * }\n *\n * task();\n * task();\n * task(); // This task will wait until one of the previous tasks releases the semaphore.\n */\nexport class Semaphore {\n /**\n * The maximum number of concurrent operations allowed.\n */\n public capacity: number;\n\n /**\n * The number of available permits.\n */\n public available: number;\n\n private deferredTasks: Array<() => void> = [];\n\n /**\n * Creates an instance of Semaphore.\n * @param capacity - The maximum number of concurrent operations allowed.\n *\n * @example\n * ```ts\n * const sema = new Semaphore(3); // Allows up to 3 concurrent operations.\n * ```\n */\n constructor(capacity: number) {\n this.capacity = capacity;\n this.available = capacity;\n }\n\n /**\n * Acquires a semaphore, blocking if necessary until one is available.\n *\n * @example\n * ```ts\n * const sema = new Semaphore(1);\n *\n * async function criticalSection() {\n * await sema.acquire();\n * try {\n * // This code section cannot be executed simultaneously\n * } finally {\n * sema.release();\n * }\n * }\n * ```\n *\n * @returns A promise that resolves when the semaphore is acquired.\n */\n async acquire(): Promise<void> {\n if (this.available > 0) {\n this.available--;\n return;\n }\n\n return new Promise<void>(resolve => {\n this.deferredTasks.push(resolve);\n });\n }\n\n /**\n * Releases a semaphore, allowing one more operation to proceed.\n *\n * @example\n * const sema = new Semaphore(1);\n *\n * async function task() {\n * await sema.acquire();\n * try {\n * // This code can only be executed by two tasks at the same time\n * } finally {\n * sema.release(); // Allows another waiting task to proceed.\n * }\n * }\n */\n release(): void {\n const deferredTask = this.deferredTasks.shift();\n\n if (deferredTask != null) {\n deferredTask();\n return;\n }\n\n if (this.available < this.capacity) {\n this.available++;\n }\n }\n}\n"],"mappings":"AA0CA,IAAa,EAAb,KAAuB,CAIrB,SAKA,UAEA,cAA2C,EAAE,CAW7C,YAAY,EAAkB,CAC5B,KAAK,SAAW,EAChB,KAAK,UAAY,EAsBnB,MAAM,SAAyB,CAC7B,GAAI,KAAK,UAAY,EAAG,CACtB,KAAK,YACL,OAGF,OAAO,IAAI,QAAc,GAAW,CAClC,KAAK,cAAc,KAAK,EAAQ,EAChC,CAkBJ,SAAgB,CACd,IAAM,EAAe,KAAK,cAAc,OAAO,CAE/C,GAAI,GAAgB,KAAM,CACxB,GAAc,CACd,OAGE,KAAK,UAAY,KAAK,UACxB,KAAK"}
|
package/dist/set-field.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./to-path-
|
|
1
|
+
const e=require(`./to-path.cjs`),t=require(`./type-checks/src/is-string.cjs`),n=require(`./type-checks/src/is-object-index.cjs`);function r(r,i,a){let o=Array.isArray(i)?i:t.isString(i)?e.toPath(i):[i];for(let e of o)if(e===`__proto__`||e===`constructor`||e===`prototype`)throw Error(`Invalid key in path: ${e}`);let s=r;for(let e=0;e<o.length-1;e++){let t=o[e],r=o[e+1];s[t]===null&&(s[t]=n.isObjectIndex(r)?[]:{}),s=s[t]}let c=o.at(-1);return c&&(s[c]=a),r}exports.setField=r;
|
package/dist/set-field.d.cts
CHANGED
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { DeepKey } from "./types/src/object.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/set-field.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Sets a value at a given deep path in an object.
|
|
7
|
+
*
|
|
8
|
+
* @param object - The object to set the value in.
|
|
9
|
+
* @param path - The deep path to set the value at.
|
|
10
|
+
* @param value - The value to set.
|
|
11
|
+
* @returns The object with the value set at the given deep path.
|
|
12
|
+
*/
|
|
13
|
+
declare function setField<TObject extends Record<string, any> = Record<string, any>>(object: TObject, path: DeepKey<TObject>, value: unknown): TObject;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { setField };
|
|
16
|
+
//# sourceMappingURL=set-field.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-field.d.cts","names":[],"sources":["../src/set-field.ts"],"sourcesContent":[],"mappings":";;;;;;AA8BA;;;;;;AAE4D,iBAF5C,QAE4C,CAAA,gBAD1C,MAC0C,CAAA,MAAA,EAAA,GAAA,CAAA,GADpB,MACoB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,MAAA,EAAlD,OAAkD,EAAA,IAAA,EAAnC,OAAmC,CAA3B,OAA2B,CAAA,EAAA,KAAA,EAAA,OAAA,CAAA,EAAA,OAAA"}
|
package/dist/set-field.d.mts
CHANGED
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { DeepKey } from "./types/src/object.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/set-field.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Sets a value at a given deep path in an object.
|
|
7
|
+
*
|
|
8
|
+
* @param object - The object to set the value in.
|
|
9
|
+
* @param path - The deep path to set the value at.
|
|
10
|
+
* @param value - The value to set.
|
|
11
|
+
* @returns The object with the value set at the given deep path.
|
|
12
|
+
*/
|
|
13
|
+
declare function setField<TObject extends Record<string, any> = Record<string, any>>(object: TObject, path: DeepKey<TObject>, value: unknown): TObject;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { setField };
|
|
16
|
+
//# sourceMappingURL=set-field.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-field.d.mts","names":[],"sources":["../src/set-field.ts"],"sourcesContent":[],"mappings":";;;;;;AA8BA;;;;;;AAE4D,iBAF5C,QAE4C,CAAA,gBAD1C,MAC0C,CAAA,MAAA,EAAA,GAAA,CAAA,GADpB,MACoB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,MAAA,EAAlD,OAAkD,EAAA,IAAA,EAAnC,OAAmC,CAA3B,OAA2B,CAAA,EAAA,KAAA,EAAA,OAAA,CAAA,EAAA,OAAA"}
|
package/dist/set-field.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import"./to-path-
|
|
1
|
+
import{toPath as e}from"./to-path.mjs";import{isString as t}from"./type-checks/src/is-string.mjs";import{isObjectIndex as n}from"./type-checks/src/is-object-index.mjs";function r(r,i,a){let o=Array.isArray(i)?i:t(i)?e(i):[i];for(let e of o)if(e===`__proto__`||e===`constructor`||e===`prototype`)throw Error(`Invalid key in path: ${e}`);let s=r;for(let e=0;e<o.length-1;e++){let t=o[e],r=o[e+1];s[t]===null&&(s[t]=n(r)?[]:{}),s=s[t]}let c=o.at(-1);return c&&(s[c]=a),r}export{r as setField};
|
|
2
|
+
//# sourceMappingURL=set-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-field.mjs","names":["current: any"],"sources":["../src/set-field.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://stormsoftware.com/projects/stryke/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/stryke/license\n\n ------------------------------------------------------------------- */\n\nimport { isObjectIndex } from \"@stryke/type-checks/is-object-index\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport type { DeepKey } from \"@stryke/types/object\";\nimport { toPath } from \"./to-path\";\n\n/**\n * Sets a value at a given deep path in an object.\n *\n * @param object - The object to set the value in.\n * @param path - The deep path to set the value at.\n * @param value - The value to set.\n * @returns The object with the value set at the given deep path.\n */\nexport function setField<\n TObject extends Record<string, any> = Record<string, any>\n>(object: TObject, path: DeepKey<TObject>, value: unknown): TObject {\n const resolvedPath = Array.isArray(path)\n ? path\n : isString(path)\n ? toPath(path)\n : [path];\n\n // Validate resolvedPath to prevent prototype pollution\n for (const key of resolvedPath) {\n if (key === \"__proto__\" || key === \"constructor\" || key === \"prototype\") {\n throw new Error(`Invalid key in path: ${key}`);\n }\n }\n\n let current: any = object;\n for (let i = 0; i < resolvedPath.length - 1; i++) {\n const key = resolvedPath[i];\n const nextKey = resolvedPath[i + 1];\n\n if (current[key] === null) {\n current[key] = isObjectIndex(nextKey) ? [] : {};\n }\n\n current = current[key];\n }\n\n const lastKey = resolvedPath.at(-1);\n if (lastKey) {\n current[lastKey] = value;\n }\n\n return object;\n}\n"],"mappings":"wKA8BA,SAAgB,EAEd,EAAiB,EAAwB,EAAyB,CAClE,IAAM,EAAe,MAAM,QAAQ,EAAK,CACpC,EACA,EAAS,EAAK,CACZ,EAAO,EAAK,CACZ,CAAC,EAAK,CAGZ,IAAK,IAAM,KAAO,EAChB,GAAI,IAAQ,aAAe,IAAQ,eAAiB,IAAQ,YAC1D,MAAU,MAAM,wBAAwB,IAAM,CAIlD,IAAIA,EAAe,EACnB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAa,OAAS,EAAG,IAAK,CAChD,IAAM,EAAM,EAAa,GACnB,EAAU,EAAa,EAAI,GAE7B,EAAQ,KAAS,OACnB,EAAQ,GAAO,EAAc,EAAQ,CAAG,EAAE,CAAG,EAAE,EAGjD,EAAU,EAAQ,GAGpB,IAAM,EAAU,EAAa,GAAG,GAAG,CAKnC,OAJI,IACF,EAAQ,GAAW,GAGd"}
|
package/dist/throttle.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e,t){let n;return((...r)=>{let i=Date.now();(n==null||i-n>=t)&&(n=i,e(...r))})}exports.throttle=e;
|
package/dist/throttle.d.cts
CHANGED
|
@@ -1,2 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/throttle.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a throttled function that only invokes the provided function at most once
|
|
4
|
+
* per every `throttleMs` milliseconds. Subsequent calls to the throttled function
|
|
5
|
+
* within the wait time will not trigger the execution of the original function.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const throttledFunction = throttle(() => {
|
|
10
|
+
* console.log('Function executed');
|
|
11
|
+
* }, 1000);
|
|
12
|
+
*
|
|
13
|
+
* // Will log 'Function executed' immediately
|
|
14
|
+
* throttledFunction();
|
|
15
|
+
*
|
|
16
|
+
* // Will not log anything as it is within the throttle time
|
|
17
|
+
* throttledFunction();
|
|
18
|
+
*
|
|
19
|
+
* // After 1 second
|
|
20
|
+
* setTimeout(() => {
|
|
21
|
+
* throttledFunction(); // Will log 'Function executed'
|
|
22
|
+
* }, 1000);
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param func - The function to throttle.
|
|
26
|
+
* @param throttleMs - The number of milliseconds to throttle executions to.
|
|
27
|
+
* @returns A new throttled function that accepts the same parameters as the original function.
|
|
28
|
+
*/
|
|
29
|
+
declare function throttle<F extends (...args: any[]) => void>(func: F, throttleMs: number): F;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { throttle };
|
|
32
|
+
//# sourceMappingURL=throttle.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"throttle.d.cts","names":[],"sources":["../src/throttle.ts"],"sourcesContent":[],"mappings":";;AA4CA;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,mDACR,wBAEL"}
|
package/dist/throttle.d.mts
CHANGED
|
@@ -1,2 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/throttle.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a throttled function that only invokes the provided function at most once
|
|
4
|
+
* per every `throttleMs` milliseconds. Subsequent calls to the throttled function
|
|
5
|
+
* within the wait time will not trigger the execution of the original function.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const throttledFunction = throttle(() => {
|
|
10
|
+
* console.log('Function executed');
|
|
11
|
+
* }, 1000);
|
|
12
|
+
*
|
|
13
|
+
* // Will log 'Function executed' immediately
|
|
14
|
+
* throttledFunction();
|
|
15
|
+
*
|
|
16
|
+
* // Will not log anything as it is within the throttle time
|
|
17
|
+
* throttledFunction();
|
|
18
|
+
*
|
|
19
|
+
* // After 1 second
|
|
20
|
+
* setTimeout(() => {
|
|
21
|
+
* throttledFunction(); // Will log 'Function executed'
|
|
22
|
+
* }, 1000);
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param func - The function to throttle.
|
|
26
|
+
* @param throttleMs - The number of milliseconds to throttle executions to.
|
|
27
|
+
* @returns A new throttled function that accepts the same parameters as the original function.
|
|
28
|
+
*/
|
|
29
|
+
declare function throttle<F extends (...args: any[]) => void>(func: F, throttleMs: number): F;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { throttle };
|
|
32
|
+
//# sourceMappingURL=throttle.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"throttle.d.mts","names":[],"sources":["../src/throttle.ts"],"sourcesContent":[],"mappings":";;AA4CA;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,mDACR,wBAEL"}
|
package/dist/throttle.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e,t){let n;return((...r)=>{let i=Date.now();(n==null||i-n>=t)&&(n=i,e(...r))})}export{e as throttle};
|
|
2
|
+
//# sourceMappingURL=throttle.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"throttle.mjs","names":["lastCallTime: number | null"],"sources":["../src/throttle.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://stormsoftware.com/projects/stryke/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/stryke/license\n\n ------------------------------------------------------------------- */\n\n/**\n * Creates a throttled function that only invokes the provided function at most once\n * per every `throttleMs` milliseconds. Subsequent calls to the throttled function\n * within the wait time will not trigger the execution of the original function.\n *\n * @example\n * ```typescript\n * const throttledFunction = throttle(() => {\n * console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' immediately\n * throttledFunction();\n *\n * // Will not log anything as it is within the throttle time\n * throttledFunction();\n *\n * // After 1 second\n * setTimeout(() => {\n * throttledFunction(); // Will log 'Function executed'\n * }, 1000);\n * ```\n *\n * @param func - The function to throttle.\n * @param throttleMs - The number of milliseconds to throttle executions to.\n * @returns A new throttled function that accepts the same parameters as the original function.\n */\nexport function throttle<F extends (...args: any[]) => void>(\n func: F,\n throttleMs: number\n): F {\n let lastCallTime: number | null;\n\n const throttledFunction = ((...args: Parameters<F>) => {\n const now = Date.now();\n\n if (lastCallTime == null || now - lastCallTime >= throttleMs) {\n lastCallTime = now;\n func(...args);\n }\n }) as F;\n\n return throttledFunction;\n}\n"],"mappings":"AA4CA,SAAgB,EACd,EACA,EACG,CACH,IAAIA,EAWJ,QAT4B,GAAG,IAAwB,CACrD,IAAM,EAAM,KAAK,KAAK,EAElB,GAAgB,MAAQ,EAAM,GAAgB,KAChD,EAAe,EACf,EAAK,GAAG,EAAK"}
|
package/dist/timeout.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./
|
|
1
|
+
const e=require(`./errors.cjs`),t=require(`./delay.cjs`);async function n(n){throw await t.delay(n),new e.TimeoutError}exports.timeout=n;
|
package/dist/timeout.d.cts
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/timeout.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Returns a promise that rejects with a `TimeoutError` after a specified delay.
|
|
4
|
+
*
|
|
5
|
+
* @param ms - The delay duration in milliseconds.
|
|
6
|
+
* @returns A promise that rejects with a `TimeoutError` after the specified delay.
|
|
7
|
+
* @throws Throws a `TimeoutError` after the specified delay.
|
|
8
|
+
*/
|
|
9
|
+
declare function timeout(ms: number): Promise<never>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { timeout };
|
|
12
|
+
//# sourceMappingURL=timeout.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeout.d.cts","names":[],"sources":["../src/timeout.ts"],"sourcesContent":[],"mappings":";;AA2BA;;;;;;iBAAsB,OAAA,cAAqB"}
|
package/dist/timeout.d.mts
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/timeout.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Returns a promise that rejects with a `TimeoutError` after a specified delay.
|
|
4
|
+
*
|
|
5
|
+
* @param ms - The delay duration in milliseconds.
|
|
6
|
+
* @returns A promise that rejects with a `TimeoutError` after the specified delay.
|
|
7
|
+
* @throws Throws a `TimeoutError` after the specified delay.
|
|
8
|
+
*/
|
|
9
|
+
declare function timeout(ms: number): Promise<never>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { timeout };
|
|
12
|
+
//# sourceMappingURL=timeout.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeout.d.mts","names":[],"sources":["../src/timeout.ts"],"sourcesContent":[],"mappings":";;AA2BA;;;;;;iBAAsB,OAAA,cAAqB"}
|
package/dist/timeout.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{TimeoutError as e}from"./errors.mjs";import{delay as t}from"./delay.mjs";async function n(n){throw await t(n),new e}export{n as timeout};
|
|
2
|
+
//# sourceMappingURL=timeout.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeout.mjs","names":[],"sources":["../src/timeout.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://stormsoftware.com/projects/stryke/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/stryke/license\n\n ------------------------------------------------------------------- */\n\nimport { delay } from \"./delay\";\nimport { TimeoutError } from \"./errors\";\n\n/**\n * Returns a promise that rejects with a `TimeoutError` after a specified delay.\n *\n * @param ms - The delay duration in milliseconds.\n * @returns A promise that rejects with a `TimeoutError` after the specified delay.\n * @throws Throws a `TimeoutError` after the specified delay.\n */\nexport async function timeout(ms: number): Promise<never> {\n await delay(ms);\n throw new TimeoutError();\n}\n"],"mappings":"gFA2BA,eAAsB,EAAQ,EAA4B,CAExD,MADA,MAAM,EAAM,EAAG,CACT,IAAI"}
|
package/dist/to-deep-key.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./
|
|
1
|
+
const e=require(`./type-checks/src/is-number.cjs`),t=require(`./type-checks/src/is-set-string.cjs`);function n(e){return e.reduce((e,t)=>r(e,t))}function r(n,r){return e.isNumber(r)||Number.isInteger(r)?`${n}[${r}]`:t.isSetString(r)?`${n}.${r}`:n}exports.addPathToDeepKey=r,exports.toDeepKey=n;
|