@stryke/helpers 0.9.14 → 0.9.22
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 +419 -0
- package/README.md +33 -25
- package/dist/{arg-identity.d.ts → arg-identity-BIir8uzO.d.mts} +5 -1
- package/dist/arg-identity-BIir8uzO.d.mts.map +1 -0
- package/dist/arg-identity-BfviduMt.mjs +2 -0
- package/dist/arg-identity-BfviduMt.mjs.map +1 -0
- package/dist/arg-identity-C-pVjd0u.d.cts +14 -0
- package/dist/arg-identity-C-pVjd0u.d.cts.map +1 -0
- package/dist/arg-identity-dlKw6BsD.cjs +1 -0
- package/dist/arg-identity.cjs +1 -9
- package/dist/arg-identity.d.cts +2 -0
- package/dist/arg-identity.d.mts +2 -0
- package/dist/arg-identity.mjs +1 -1
- package/dist/debounce-C5O3IDKy.mjs +2 -0
- package/dist/debounce-C5O3IDKy.mjs.map +1 -0
- package/dist/{debounce.d.ts → debounce-CIMf8-Yr.d.mts} +10 -4
- package/dist/debounce-CIMf8-Yr.d.mts.map +1 -0
- package/dist/debounce-CLb-VvJv.d.cts +47 -0
- package/dist/debounce-CLb-VvJv.d.cts.map +1 -0
- package/dist/debounce-SIYbhEOF.cjs +1 -0
- package/dist/debounce.cjs +1 -24
- package/dist/debounce.d.cts +2 -0
- package/dist/debounce.d.mts +2 -0
- package/dist/debounce.mjs +1 -1
- package/dist/deep-clone-BlN5QTtW.mjs +2 -0
- package/dist/deep-clone-BlN5QTtW.mjs.map +1 -0
- package/dist/deep-clone-CoUy-Hrt.cjs +1 -0
- package/dist/{deep-clone.d.ts → deep-clone-CpLJcTgz.d.mts} +11 -12
- package/dist/deep-clone-CpLJcTgz.d.mts.map +1 -0
- package/dist/deep-clone-jRNy1xoj.d.cts +65 -0
- package/dist/deep-clone-jRNy1xoj.d.cts.map +1 -0
- package/dist/deep-clone.cjs +1 -62
- package/dist/deep-clone.d.cts +2 -0
- package/dist/deep-clone.d.mts +2 -0
- package/dist/deep-clone.mjs +1 -1
- package/dist/deep-merge-BDZ6c79O.mjs +2 -0
- package/dist/deep-merge-BDZ6c79O.mjs.map +1 -0
- package/dist/deep-merge-BpFjvumi.cjs +1 -0
- package/dist/deep-merge-C9qDSleg.d.cts +26 -0
- package/dist/deep-merge-C9qDSleg.d.cts.map +1 -0
- package/dist/deep-merge-eCT712Cv.d.mts +26 -0
- package/dist/deep-merge-eCT712Cv.d.mts.map +1 -0
- package/dist/deep-merge.cjs +1 -36
- package/dist/deep-merge.d.cts +2 -0
- package/dist/deep-merge.d.mts +2 -0
- package/dist/deep-merge.mjs +1 -1
- package/dist/{delay.d.ts → delay-Bd_sGzMj.d.mts} +9 -4
- package/dist/delay-Bd_sGzMj.d.mts.map +1 -0
- package/dist/delay-UwR_fCwt.cjs +1 -0
- package/dist/delay-VkcrQf1l.d.cts +77 -0
- package/dist/delay-VkcrQf1l.d.cts.map +1 -0
- package/dist/delay-wdNbY6sk.mjs +2 -0
- package/dist/delay-wdNbY6sk.mjs.map +1 -0
- package/dist/delay.cjs +1 -28
- package/dist/delay.d.cts +2 -0
- package/dist/delay.d.mts +2 -0
- package/dist/delay.mjs +1 -1
- package/dist/errors-BXYY8wXj.cjs +1 -0
- package/dist/errors-DWX9ET_b.mjs +2 -0
- package/dist/errors-DWX9ET_b.mjs.map +1 -0
- package/dist/errors.cjs +1 -18
- package/dist/errors.d.cts +16 -0
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.mts +16 -0
- package/dist/errors.d.mts.map +1 -0
- package/dist/errors.mjs +1 -1
- package/dist/filter-empty-5_nMg04e.cjs +1 -0
- package/dist/filter-empty-BMtd0K07.d.mts +5 -0
- package/dist/filter-empty-BMtd0K07.d.mts.map +1 -0
- package/dist/filter-empty-C2fq9M7o.d.cts +5 -0
- package/dist/filter-empty-C2fq9M7o.d.cts.map +1 -0
- package/dist/filter-empty-Dsc1ymCj.mjs +2 -0
- package/dist/filter-empty-Dsc1ymCj.mjs.map +1 -0
- package/dist/filter-empty.cjs +1 -9
- package/dist/filter-empty.d.cts +2 -0
- package/dist/filter-empty.d.mts +2 -0
- package/dist/filter-empty.mjs +1 -1
- package/dist/{flatten-object.d.ts → flatten-object-Bk2VT-b2.d.mts} +8 -6
- package/dist/flatten-object-Bk2VT-b2.d.mts.map +1 -0
- package/dist/flatten-object-D-EbEZqR.cjs +1 -0
- package/dist/flatten-object-DFCZmly9.mjs +2 -0
- package/dist/flatten-object-DFCZmly9.mjs.map +1 -0
- package/dist/{unflatten-object.d.ts → flatten-object-DjaJJaY0.d.cts} +8 -6
- package/dist/flatten-object-DjaJJaY0.d.cts.map +1 -0
- package/dist/flatten-object.cjs +1 -20
- package/dist/flatten-object.d.cts +2 -0
- package/dist/flatten-object.d.mts +2 -0
- package/dist/flatten-object.mjs +1 -1
- package/dist/{get-field.d.ts → get-field-5XqtknPs.d.mts} +25 -22
- package/dist/get-field-5XqtknPs.d.mts.map +1 -0
- package/dist/get-field-D4F_p-Ov.cjs +1 -0
- package/dist/get-field-ngQ9O38X.mjs +2 -0
- package/dist/get-field-ngQ9O38X.mjs.map +1 -0
- package/dist/get-field-oltWWNRO.d.cts +254 -0
- package/dist/get-field-oltWWNRO.d.cts.map +1 -0
- package/dist/get-field.cjs +1 -43
- package/dist/get-field.d.cts +2 -0
- package/dist/get-field.d.mts +2 -0
- package/dist/get-field.mjs +1 -1
- package/dist/get-object-tag-D53RvMgo.cjs +1 -0
- package/dist/get-object-tag-oBoWkttN.mjs +2 -0
- package/dist/get-object-tag-oBoWkttN.mjs.map +1 -0
- package/dist/{get-ordered-by.d.ts → get-ordered-by-C45FfW2T.d.mts} +5 -2
- package/dist/get-ordered-by-C45FfW2T.d.mts.map +1 -0
- package/dist/get-ordered-by-CBKKJr4R.mjs +2 -0
- package/dist/get-ordered-by-CBKKJr4R.mjs.map +1 -0
- package/dist/get-ordered-by-D2Sr6vUN.cjs +1 -0
- package/dist/get-ordered-by-DuD7QRma.d.cts +39 -0
- package/dist/get-ordered-by-DuD7QRma.d.cts.map +1 -0
- package/dist/get-ordered-by.cjs +1 -18
- package/dist/get-ordered-by.d.cts +2 -0
- package/dist/get-ordered-by.d.mts +2 -0
- package/dist/get-ordered-by.mjs +1 -1
- package/dist/get-unique-BOiakY6A.cjs +1 -0
- package/dist/{get-unique.d.ts → get-unique-C0SBPUBv.d.cts} +6 -2
- package/dist/get-unique-C0SBPUBv.d.cts.map +1 -0
- package/dist/get-unique-DZ6E1Kvc.d.mts +26 -0
- package/dist/get-unique-DZ6E1Kvc.d.mts.map +1 -0
- package/dist/get-unique-DzZ7Z34U.mjs +2 -0
- package/dist/get-unique-DzZ7Z34U.mjs.map +1 -0
- package/dist/get-unique.cjs +1 -17
- package/dist/get-unique.d.cts +2 -0
- package/dist/get-unique.d.mts +2 -0
- package/dist/get-unique.mjs +1 -1
- package/dist/{identity.d.ts → identity-B_cGeF8o.d.mts} +5 -1
- package/dist/identity-B_cGeF8o.d.mts.map +1 -0
- package/dist/identity-DBwwvmGU.mjs +2 -0
- package/dist/identity-DBwwvmGU.mjs.map +1 -0
- package/dist/identity-DRhIvbPG.d.cts +18 -0
- package/dist/identity-DRhIvbPG.d.cts.map +1 -0
- package/dist/identity-z2xaIqpe.cjs +1 -0
- package/dist/identity.cjs +1 -9
- package/dist/identity.d.cts +2 -0
- package/dist/identity.d.mts +2 -0
- package/dist/identity.mjs +1 -1
- package/dist/index.cjs +1 -346
- package/dist/index.d.cts +32 -0
- package/dist/index.d.mts +32 -0
- package/dist/index.mjs +1 -1
- package/dist/is-empty-C7vlSVFD.mjs +2 -0
- package/dist/is-empty-C7vlSVFD.mjs.map +1 -0
- package/dist/is-empty-DZZDqzjD.cjs +1 -0
- package/dist/is-equal-0Z-K2uIG.mjs +2 -0
- package/dist/is-equal-0Z-K2uIG.mjs.map +1 -0
- package/dist/is-equal-BJgVhUVS.cjs +1 -0
- package/dist/{is-equal.d.ts → is-equal-BMlMHlVi.d.cts} +5 -1
- package/dist/is-equal-BMlMHlVi.d.cts.map +1 -0
- package/dist/is-equal-Baqurdpn.d.mts +22 -0
- package/dist/is-equal-Baqurdpn.d.mts.map +1 -0
- package/dist/is-equal.cjs +1 -61
- package/dist/is-equal.d.cts +2 -0
- package/dist/is-equal.d.mts +2 -0
- package/dist/is-equal.mjs +1 -1
- package/dist/is-number-BcjxCzDM.cjs +1 -0
- package/dist/is-number-bwhfkHlC.mjs +2 -0
- package/dist/is-number-bwhfkHlC.mjs.map +1 -0
- package/dist/is-plain-object-BQuFhL4M.cjs +1 -0
- package/dist/is-plain-object-D8GSMOhY.mjs +2 -0
- package/dist/is-plain-object-D8GSMOhY.mjs.map +1 -0
- package/dist/is-set-B9o0NIT4.mjs +2 -0
- package/dist/is-set-B9o0NIT4.mjs.map +1 -0
- package/dist/is-set-ByJOY6h2.cjs +1 -0
- package/dist/is-set-string-48_jZFw0.cjs +1 -0
- package/dist/is-set-string-Dr1MlMk0.mjs +2 -0
- package/dist/is-set-string-Dr1MlMk0.mjs.map +1 -0
- package/dist/is-string-CvmuuuDj.mjs +2 -0
- package/dist/is-string-CvmuuuDj.mjs.map +1 -0
- package/dist/is-string-DPanLeA_.cjs +1 -0
- package/dist/lru-cache-CzQ_kKXk.d.mts +103 -0
- package/dist/lru-cache-CzQ_kKXk.d.mts.map +1 -0
- package/dist/lru-cache-D4VEIgtR.d.cts +103 -0
- package/dist/lru-cache-D4VEIgtR.d.cts.map +1 -0
- package/dist/lru-cache-DLY_yZRN.mjs +2 -0
- package/dist/lru-cache-DLY_yZRN.mjs.map +1 -0
- package/dist/lru-cache-DgTSGx5W.cjs +1 -0
- package/dist/lru-cache.cjs +1 -82
- package/dist/lru-cache.d.cts +2 -0
- package/dist/lru-cache.d.mts +2 -0
- package/dist/lru-cache.mjs +1 -1
- package/dist/match-sorter-B9_7YvTo.mjs +2 -0
- package/dist/match-sorter-B9_7YvTo.mjs.map +1 -0
- package/dist/match-sorter-BjnWjkKu.cjs +1 -0
- package/dist/{match-sorter.d.ts → match-sorter-CMYN3GuY.d.cts} +44 -43
- package/dist/match-sorter-CMYN3GuY.d.cts.map +1 -0
- package/dist/match-sorter-DCRerxVe.d.mts +78 -0
- package/dist/match-sorter-DCRerxVe.d.mts.map +1 -0
- package/dist/match-sorter.cjs +1 -184
- package/dist/match-sorter.d.cts +2 -0
- package/dist/match-sorter.d.mts +2 -0
- package/dist/match-sorter.mjs +1 -1
- package/dist/memoize-Cr5jFKxi.mjs +2 -0
- package/dist/memoize-Cr5jFKxi.mjs.map +1 -0
- package/dist/memoize-TyrmWrfR.d.mts +11 -0
- package/dist/memoize-TyrmWrfR.d.mts.map +1 -0
- package/dist/memoize-qxvbI-0y.cjs +1 -0
- package/dist/memoize-tSTYY522.d.cts +11 -0
- package/dist/memoize-tSTYY522.d.cts.map +1 -0
- package/dist/memoize.cjs +1 -12
- package/dist/memoize.d.cts +2 -0
- package/dist/memoize.d.mts +2 -0
- package/dist/memoize.mjs +1 -1
- package/dist/mutex-CnQQBndt.cjs +1 -0
- package/dist/mutex-DAZduiSP.d.mts +72 -0
- package/dist/mutex-DAZduiSP.d.mts.map +1 -0
- package/dist/mutex-DCyX7B66.d.cts +72 -0
- package/dist/mutex-DCyX7B66.d.cts.map +1 -0
- package/dist/mutex-TqoKHosg.mjs +2 -0
- package/dist/mutex-TqoKHosg.mjs.map +1 -0
- package/dist/mutex.cjs +1 -20
- package/dist/mutex.d.cts +2 -0
- package/dist/mutex.d.mts +2 -0
- package/dist/mutex.mjs +1 -1
- package/dist/noop-B7OetrhD.mjs +2 -0
- package/dist/noop-B7OetrhD.mjs.map +1 -0
- package/dist/{noop.d.ts → noop-BnXKMH6Z.d.mts} +6 -2
- package/dist/noop-BnXKMH6Z.d.mts.map +1 -0
- package/dist/noop-CnJXOCpF.d.cts +22 -0
- package/dist/noop-CnJXOCpF.d.cts.map +1 -0
- package/dist/noop-Dpf7hIui.cjs +1 -0
- package/dist/noop.cjs +1 -10
- package/dist/noop.d.cts +2 -0
- package/dist/noop.d.mts +2 -0
- package/dist/noop.mjs +1 -1
- package/dist/object-CHmrmQna.d.mts +160 -0
- package/dist/object-CHmrmQna.d.mts.map +1 -0
- package/dist/object-D8HGAGMr.d.cts +160 -0
- package/dist/object-D8HGAGMr.d.cts.map +1 -0
- package/dist/omit-A0uVyAS4.cjs +1 -0
- package/dist/omit-BROsDK0D.mjs +2 -0
- package/dist/omit-BROsDK0D.mjs.map +1 -0
- package/dist/{omit.d.ts → omit-D1FKiOYz.d.cts} +5 -1
- package/dist/omit-D1FKiOYz.d.cts.map +1 -0
- package/dist/omit-DpqOAtKt.d.mts +22 -0
- package/dist/omit-DpqOAtKt.d.mts.map +1 -0
- package/dist/omit.cjs +1 -16
- package/dist/omit.d.cts +2 -0
- package/dist/omit.d.mts +2 -0
- package/dist/omit.mjs +1 -1
- package/dist/once-DNPPQd3P.d.mts +13 -0
- package/dist/once-DNPPQd3P.d.mts.map +1 -0
- package/dist/once-DZCwmdkv.cjs +1 -0
- package/dist/once-DqmxXwEB.d.cts +13 -0
- package/dist/once-DqmxXwEB.d.cts.map +1 -0
- package/dist/once-txoW63yJ.mjs +2 -0
- package/dist/once-txoW63yJ.mjs.map +1 -0
- package/dist/once.cjs +1 -17
- package/dist/once.d.cts +2 -0
- package/dist/once.d.mts +2 -0
- package/dist/once.mjs +1 -1
- package/dist/pick-CuXTvXaw.mjs +2 -0
- package/dist/pick-CuXTvXaw.mjs.map +1 -0
- package/dist/{pick.d.ts → pick-DXREvZBr.d.cts} +5 -1
- package/dist/pick-DXREvZBr.d.cts.map +1 -0
- package/dist/pick-GDOwAh6I.cjs +1 -0
- package/dist/pick-ZrWD4de2.d.mts +22 -0
- package/dist/pick-ZrWD4de2.d.mts.map +1 -0
- package/dist/pick.cjs +1 -14
- package/dist/pick.d.cts +2 -0
- package/dist/pick.d.mts +2 -0
- package/dist/pick.mjs +1 -1
- package/dist/remove-accents-BFmyvTRZ.mjs +2 -0
- package/dist/remove-accents-BFmyvTRZ.mjs.map +1 -0
- package/dist/remove-accents-C4C0A2ex.d.mts +12 -0
- package/dist/remove-accents-C4C0A2ex.d.mts.map +1 -0
- package/dist/remove-accents-CXBUC-Id.cjs +1 -0
- package/dist/remove-accents-Yo3-2jWO.d.cts +12 -0
- package/dist/remove-accents-Yo3-2jWO.d.cts.map +1 -0
- package/dist/remove-accents.cjs +1 -411
- package/dist/remove-accents.d.cts +2 -0
- package/dist/remove-accents.d.mts +2 -0
- package/dist/remove-accents.mjs +1 -1
- package/dist/remove-empty-items-BglsRCyG.d.cts +11 -0
- package/dist/remove-empty-items-BglsRCyG.d.cts.map +1 -0
- package/dist/remove-empty-items-BzI9Vid9.mjs +2 -0
- package/dist/remove-empty-items-BzI9Vid9.mjs.map +1 -0
- package/dist/remove-empty-items-COwdCPHC.d.mts +11 -0
- package/dist/remove-empty-items-COwdCPHC.d.mts.map +1 -0
- package/dist/remove-empty-items-CjTxJuyS.cjs +1 -0
- package/dist/remove-empty-items.cjs +1 -8
- package/dist/remove-empty-items.d.cts +2 -0
- package/dist/remove-empty-items.d.mts +2 -0
- package/dist/remove-empty-items.mjs +1 -1
- package/dist/semaphore-4zJqtox8.mjs +2 -0
- package/dist/semaphore-4zJqtox8.mjs.map +1 -0
- package/dist/semaphore-CsGTxqsW.d.cts +86 -0
- package/dist/semaphore-CsGTxqsW.d.cts.map +1 -0
- package/dist/semaphore-DkHqPlow.cjs +1 -0
- package/dist/semaphore-WaZBtCk5.d.mts +86 -0
- package/dist/semaphore-WaZBtCk5.d.mts.map +1 -0
- package/dist/semaphore.cjs +1 -32
- package/dist/semaphore.d.cts +2 -0
- package/dist/semaphore.d.mts +2 -0
- package/dist/semaphore.mjs +1 -1
- package/dist/set-field-CUgbKEjW.mjs +2 -0
- package/dist/set-field-CUgbKEjW.mjs.map +1 -0
- package/dist/set-field-CcCiXZNl.d.cts +16 -0
- package/dist/set-field-CcCiXZNl.d.cts.map +1 -0
- package/dist/set-field-DyvXgpNP.d.mts +16 -0
- package/dist/set-field-DyvXgpNP.d.mts.map +1 -0
- package/dist/set-field-mr4GkhFb.cjs +1 -0
- package/dist/set-field.cjs +1 -21
- package/dist/set-field.d.cts +2 -0
- package/dist/set-field.d.mts +2 -0
- package/dist/set-field.mjs +1 -1
- package/dist/throttle-BOKOTo3m.cjs +1 -0
- package/dist/{throttle.d.ts → throttle-BWPQuZty.d.cts} +5 -1
- package/dist/throttle-BWPQuZty.d.cts.map +1 -0
- package/dist/throttle-BgU4k6qs.d.mts +32 -0
- package/dist/throttle-BgU4k6qs.d.mts.map +1 -0
- package/dist/throttle-CYK3F0mZ.mjs +2 -0
- package/dist/throttle-CYK3F0mZ.mjs.map +1 -0
- package/dist/throttle.cjs +1 -13
- package/dist/throttle.d.cts +2 -0
- package/dist/throttle.d.mts +2 -0
- package/dist/throttle.mjs +1 -1
- package/dist/timeout-43rG9ETK.mjs +2 -0
- package/dist/timeout-43rG9ETK.mjs.map +1 -0
- package/dist/{timeout.d.ts → timeout-CLhwG-oo.d.mts} +5 -1
- package/dist/timeout-CLhwG-oo.d.mts.map +1 -0
- package/dist/timeout-CoYbhliP.cjs +1 -0
- package/dist/timeout-DC38jHR8.d.cts +12 -0
- package/dist/timeout-DC38jHR8.d.cts.map +1 -0
- package/dist/timeout.cjs +1 -11
- package/dist/timeout.d.cts +2 -0
- package/dist/timeout.d.mts +2 -0
- package/dist/timeout.mjs +1 -1
- package/dist/to-deep-key-Cma9aiEz.cjs +1 -0
- package/dist/to-deep-key-D8uDBd6T.mjs +2 -0
- package/dist/to-deep-key-D8uDBd6T.mjs.map +1 -0
- package/dist/{to-deep-key.d.ts → to-deep-key-DO-Z0Zjs.d.mts} +6 -2
- package/dist/to-deep-key-DO-Z0Zjs.d.mts.map +1 -0
- package/dist/to-deep-key-DlsE4ziE.d.cts +42 -0
- package/dist/to-deep-key-DlsE4ziE.d.cts.map +1 -0
- package/dist/to-deep-key.cjs +1 -15
- package/dist/to-deep-key.d.cts +2 -0
- package/dist/to-deep-key.d.mts +2 -0
- package/dist/to-deep-key.mjs +1 -1
- package/dist/{to-path.d.ts → to-path-BajxeMmo.d.mts} +5 -1
- package/dist/to-path-BajxeMmo.d.mts.map +1 -0
- package/dist/to-path-CdOFd4od.cjs +1 -0
- package/dist/to-path-D2zWXeYc.d.cts +24 -0
- package/dist/to-path-D2zWXeYc.d.cts.map +1 -0
- package/dist/to-path-Dm1fe-Ix.mjs +2 -0
- package/dist/to-path-Dm1fe-Ix.mjs.map +1 -0
- package/dist/to-path.cjs +1 -23
- package/dist/to-path.d.cts +2 -0
- package/dist/to-path.d.mts +2 -0
- package/dist/to-path.mjs +1 -1
- package/dist/unflatten-object-C7TE8J80.mjs +2 -0
- package/dist/unflatten-object-C7TE8J80.mjs.map +1 -0
- package/dist/unflatten-object-CPJIUozj.d.mts +35 -0
- package/dist/unflatten-object-CPJIUozj.d.mts.map +1 -0
- package/dist/unflatten-object-CvZj41LG.cjs +1 -0
- package/dist/unflatten-object-Cvbj7Q__.d.cts +35 -0
- package/dist/unflatten-object-Cvbj7Q__.d.cts.map +1 -0
- package/dist/unflatten-object.cjs +1 -10
- package/dist/unflatten-object.d.cts +2 -0
- package/dist/unflatten-object.d.mts +2 -0
- package/dist/unflatten-object.mjs +1 -1
- package/dist/{union.d.ts → union-BMOMEzO-.d.cts} +5 -1
- package/dist/union-BMOMEzO-.d.cts.map +1 -0
- package/dist/union-C-2CRoFc.mjs +2 -0
- package/dist/union-C-2CRoFc.mjs.map +1 -0
- package/dist/union-D4bbjM2i.d.mts +24 -0
- package/dist/union-D4bbjM2i.d.mts.map +1 -0
- package/dist/union-EwdcZzNT.cjs +1 -0
- package/dist/union.cjs +1 -10
- package/dist/union.d.cts +2 -0
- package/dist/union.d.mts +2 -0
- package/dist/union.mjs +1 -1
- package/dist/{with-timeout.d.ts → with-timeout-BPaAIZtS.d.cts} +5 -1
- package/dist/with-timeout-BPaAIZtS.d.cts.map +1 -0
- package/dist/with-timeout-BoZYdcOg.d.mts +24 -0
- package/dist/with-timeout-BoZYdcOg.d.mts.map +1 -0
- package/dist/with-timeout-CAuUr1ck.mjs +2 -0
- package/dist/with-timeout-CAuUr1ck.mjs.map +1 -0
- package/dist/with-timeout-CPUBGT4X.cjs +1 -0
- package/dist/with-timeout.cjs +1 -10
- package/dist/with-timeout.d.cts +2 -0
- package/dist/with-timeout.d.mts +2 -0
- package/dist/with-timeout.mjs +1 -1
- package/package.json +91 -440
- package/dist/deep-merge.d.ts +0 -22
- package/dist/errors.d.ts +0 -12
- package/dist/filter-empty.d.ts +0 -1
- package/dist/index.d.ts +0 -31
- package/dist/lru-cache.d.ts +0 -99
- package/dist/memoize.d.ts +0 -7
- package/dist/mutex.d.ts +0 -68
- package/dist/once.d.ts +0 -9
- package/dist/remove-accents.d.ts +0 -8
- package/dist/remove-empty-items.d.ts +0 -7
- package/dist/semaphore.d.ts +0 -82
- package/dist/set-field.d.ts +0 -10
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
//#region src/match-sorter.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Forked from match-sorter by Kent C. Dodds
|
|
4
|
+
*/
|
|
5
|
+
interface KeyAttributes {
|
|
6
|
+
threshold?: Ranking;
|
|
7
|
+
maxRanking: Ranking;
|
|
8
|
+
minRanking: Ranking;
|
|
9
|
+
}
|
|
10
|
+
interface RankingInfo {
|
|
11
|
+
rankedValue: string;
|
|
12
|
+
rank: Ranking;
|
|
13
|
+
keyIndex: number;
|
|
14
|
+
keyThreshold: Ranking | undefined;
|
|
15
|
+
}
|
|
16
|
+
interface ValueGetterKey<ItemType> {
|
|
17
|
+
(item: ItemType): string | Array<string>;
|
|
18
|
+
}
|
|
19
|
+
interface IndexedItem<ItemType> {
|
|
20
|
+
item: ItemType;
|
|
21
|
+
index: number;
|
|
22
|
+
}
|
|
23
|
+
interface RankedItem<ItemType> extends RankingInfo, IndexedItem<ItemType> {}
|
|
24
|
+
interface BaseSorter<ItemType> {
|
|
25
|
+
(a: RankedItem<ItemType>, b: RankedItem<ItemType>): number;
|
|
26
|
+
}
|
|
27
|
+
interface Sorter<ItemType> {
|
|
28
|
+
(matchItems: Array<RankedItem<ItemType>>): Array<RankedItem<ItemType>>;
|
|
29
|
+
}
|
|
30
|
+
interface KeyAttributesOptions<ItemType> {
|
|
31
|
+
key?: string | ValueGetterKey<ItemType>;
|
|
32
|
+
threshold?: Ranking;
|
|
33
|
+
maxRanking?: Ranking;
|
|
34
|
+
minRanking?: Ranking;
|
|
35
|
+
}
|
|
36
|
+
type KeyOption<ItemType> = KeyAttributesOptions<ItemType> | ValueGetterKey<ItemType> | string;
|
|
37
|
+
interface MatchSorterOptions<ItemType = unknown> {
|
|
38
|
+
keys?: ReadonlyArray<KeyOption<ItemType>>;
|
|
39
|
+
threshold?: Ranking;
|
|
40
|
+
baseSort?: BaseSorter<ItemType>;
|
|
41
|
+
keepDiacritics?: boolean;
|
|
42
|
+
sorter?: Sorter<ItemType>;
|
|
43
|
+
}
|
|
44
|
+
declare const rankings: {
|
|
45
|
+
readonly CASE_SENSITIVE_EQUAL: 7;
|
|
46
|
+
readonly EQUAL: 6;
|
|
47
|
+
readonly STARTS_WITH: 5;
|
|
48
|
+
readonly WORD_STARTS_WITH: 4;
|
|
49
|
+
readonly CONTAINS: 3;
|
|
50
|
+
readonly ACRONYM: 2;
|
|
51
|
+
readonly MATCHES: 1;
|
|
52
|
+
readonly NO_MATCH: 0;
|
|
53
|
+
};
|
|
54
|
+
type Ranking = (typeof rankings)[keyof typeof rankings];
|
|
55
|
+
declare const defaultBaseSortFn: BaseSorter<unknown>;
|
|
56
|
+
/**
|
|
57
|
+
* Takes an array of items and a value and returns a new array with the items that match the given value
|
|
58
|
+
* @param items - the items to sort
|
|
59
|
+
* @param value - the value to use for ranking
|
|
60
|
+
* @param options - Some options to configure the sorter
|
|
61
|
+
* @returns - the new sorted array
|
|
62
|
+
*/
|
|
63
|
+
declare function matchSorter<ItemType = string>(items: ReadonlyArray<ItemType>, value: string, options?: MatchSorterOptions<ItemType>): Array<ItemType>;
|
|
64
|
+
declare namespace matchSorter {
|
|
65
|
+
var rankings: {
|
|
66
|
+
readonly CASE_SENSITIVE_EQUAL: 7;
|
|
67
|
+
readonly EQUAL: 6;
|
|
68
|
+
readonly STARTS_WITH: 5;
|
|
69
|
+
readonly WORD_STARTS_WITH: 4;
|
|
70
|
+
readonly CONTAINS: 3;
|
|
71
|
+
readonly ACRONYM: 2;
|
|
72
|
+
readonly MATCHES: 1;
|
|
73
|
+
readonly NO_MATCH: 0;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { RankingInfo as a, matchSorter as c, MatchSorterOptions as i, rankings as l, KeyAttributesOptions as n, ValueGetterKey as o, KeyOption as r, defaultBaseSortFn as s, KeyAttributes as t };
|
|
78
|
+
//# sourceMappingURL=match-sorter-DCRerxVe.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match-sorter-DCRerxVe.d.mts","names":[],"sources":["../src/match-sorter.ts"],"sourcesContent":[],"mappings":";;;;UAyBU,aAAA,CAEI;EACA,SAAA,CAAA,EAFA,OAEA;EAAO,UAAA,EADP,OACO;EAEX,UAAA,EAFI,OAEO;AAIE;AAIW,UARxB,WAAA,CAUW;EAIX,WAAA,EAAU,MAAA;EAA4C,IAAA,EAZxD,OAYwD;EAAzB,QAAA,EAAA,MAAA;EAAa,YAAA,EAVpC,OAUoC,GAAA,SAAA;;AAAW,UAPrD,cASU,CAAA,QAAA,CAAA,CAAA;EACH,CAAA,IAAA,EATR,QASQ,CAAA,EAAA,MAAA,GATY,KASZ,CAAA,MAAA,CAAA;;UAPP,WAOgC,CAAA,QAAA,CAAA,CAAA;EAAX,IAAA,EANvB,QAMuB;EAAU,KAAA,EAAA,MAAA;AAAA;UAH/B,UAOsB,CAAA,QAAA,CAAA,SAPO,WAOP,EAPoB,WAOpB,CAPgC,QAOhC,CAAA,CAAA;UALtB,UAKK,CAAA,QAAA,CAAA,CAAA;EAA+C,CAAA,CAAA,EAJxD,UAIwD,CAJ7C,QAI6C,CAAA,EAAA,CAAA,EAJ/B,UAI+B,CAJpB,QAIoB,CAAA,CAAA,EAAA,MAAA;;UADpD,MACmC,CAAA,QAAA,CAAA,CAAA;EAAK,CAAA,UAAA,EAAnC,KAAmC,CAA7B,UAA6B,CAAlB,QAAkB,CAAA,CAAA,CAAA,EAAL,KAAK,CAAC,UAAD,CAAY,QAAZ,CAAA,CAAA;AAAA;UAGxC,oBACsB,CAAA,QAAA,CAAA,CAAA;EAAf,GAAA,CAAA,EAAA,MAAA,GAAA,cAAA,CAAe,QAAf,CAAA;EACH,SAAA,CAAA,EAAA,OAAA;EACC,UAAA,CAAA,EAAA,OAAA;EACA,UAAA,CAAA,EAAA,OAAA;;AAAO,KAGjB,SAAA,CAAA,QAAS,CAAA,GACV,oBADU,CACW,QADX,CAAA,GAEV,cAFU,CAEK,QAFL,CAAA,GAAA,MAAA;UAKJ,kBAJe,CAAA,WAAA,OAAA,CAAA,CAAA;EAArB,IAAA,CAAA,EAKK,aALL,CAKmB,SALnB,CAK6B,QAL7B,CAAA,CAAA;EACe,SAAA,CAAA,EAKL,OALK;EAAf,QAAA,CAAA,EAMS,UANT,CAMoB,QANpB,CAAA;EAAc,cAAA,CAAA,EAAA,OAAA;EAGR,MAAA,CAAA,EAKC,MALD,CAKQ,QALU,CAAA;;cAStB,QARiB,EAAA;EAAd,SAAA,oBAAA,EAAA,CAAA;EACK,SAAA,KAAA,EAAA,CAAA;EACU,SAAA,WAAA,EAAA,CAAA;EAAX,SAAA,gBAAA,EAAA,CAAA;EAEK,SAAA,QAAA,EAAA,CAAA;EAAP,SAAA,OAAA,EAAA,CAAA;EAAM,SAAA,OAAA,EAAA,CAAA;EAIX,SAAA,QASI,EAAA,CAAA;AAAA,CAAA;AAE4C,KAAjD,OAAA,GAEC,CAAA,OAFiB,QAGqC,CAAA,CAAA,MADnC,OAFqB,QAEX,CAAA;AAAA,cAA7B,iBAUc,EAVK,UAUL,CAAA,OAAA,CAAA;;;;;;;;AAIZ,iBAJC,WAAW,CAAA,WAAA,MAAA,CAAA,CAAA,KAAA,EACX,aADW,CACG,QADH,CAAA,EAAA,KAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAGT,kBAHS,CAGU,QAHV,CAAA,CAAA,EAIjB,KAJiB,CAIX,QAJW,CAAA;kBAAX,WAAA"}
|
package/dist/match-sorter.cjs
CHANGED
|
@@ -1,184 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.defaultBaseSortFn = void 0;
|
|
7
|
-
exports.matchSorter = T;
|
|
8
|
-
exports.rankings = void 0;
|
|
9
|
-
var _removeAccents = require("./remove-accents.cjs");
|
|
10
|
-
const I = exports.rankings = {
|
|
11
|
-
CASE_SENSITIVE_EQUAL: 7,
|
|
12
|
-
EQUAL: 6,
|
|
13
|
-
STARTS_WITH: 5,
|
|
14
|
-
WORD_STARTS_WITH: 4,
|
|
15
|
-
CONTAINS: 3,
|
|
16
|
-
ACRONYM: 2,
|
|
17
|
-
MATCHES: 1,
|
|
18
|
-
NO_MATCH: 0
|
|
19
|
-
},
|
|
20
|
-
g = (n, e) => String(n.rankedValue).localeCompare(String(e.rankedValue));
|
|
21
|
-
exports.defaultBaseSortFn = g;
|
|
22
|
-
function T(n, e, t = {}) {
|
|
23
|
-
const {
|
|
24
|
-
keys: r,
|
|
25
|
-
threshold: c = I.MATCHES,
|
|
26
|
-
baseSort: s = g,
|
|
27
|
-
sorter: y = i => i.sort((o, l) => V(o, l, s))
|
|
28
|
-
} = t,
|
|
29
|
-
u = n.reduce((i, o, l) => a(i, o, l), []);
|
|
30
|
-
return y(u).map(({
|
|
31
|
-
item: i
|
|
32
|
-
}) => i);
|
|
33
|
-
function a(i, o, l) {
|
|
34
|
-
const m = O(o, r, e, t),
|
|
35
|
-
{
|
|
36
|
-
rank: p,
|
|
37
|
-
keyThreshold: f = c
|
|
38
|
-
} = m;
|
|
39
|
-
return p >= f && i.push({
|
|
40
|
-
...m,
|
|
41
|
-
item: o,
|
|
42
|
-
index: l
|
|
43
|
-
}), i;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
T.rankings = I;
|
|
47
|
-
function O(n, e, t, r) {
|
|
48
|
-
if (!e) {
|
|
49
|
-
const s = n;
|
|
50
|
-
return {
|
|
51
|
-
rankedValue: s,
|
|
52
|
-
rank: k(s, t, r),
|
|
53
|
-
keyIndex: -1,
|
|
54
|
-
keyThreshold: r.threshold
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
return M(n, e).reduce(({
|
|
58
|
-
rank: s,
|
|
59
|
-
rankedValue: y,
|
|
60
|
-
keyIndex: u,
|
|
61
|
-
keyThreshold: a
|
|
62
|
-
}, {
|
|
63
|
-
itemValue: i,
|
|
64
|
-
attributes: o
|
|
65
|
-
}, l) => {
|
|
66
|
-
let m = k(i, t, r),
|
|
67
|
-
p = y;
|
|
68
|
-
const {
|
|
69
|
-
minRanking: f,
|
|
70
|
-
maxRanking: d,
|
|
71
|
-
threshold: R
|
|
72
|
-
} = o;
|
|
73
|
-
return m < f && m >= I.MATCHES ? m = f : m > d && (m = d), m > s && (s = m, u = l, a = R, p = i), {
|
|
74
|
-
rankedValue: p,
|
|
75
|
-
rank: s,
|
|
76
|
-
keyIndex: u,
|
|
77
|
-
keyThreshold: a
|
|
78
|
-
};
|
|
79
|
-
}, {
|
|
80
|
-
rankedValue: n,
|
|
81
|
-
rank: I.NO_MATCH,
|
|
82
|
-
keyIndex: -1,
|
|
83
|
-
keyThreshold: r.threshold
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function k(n, e, t) {
|
|
87
|
-
return n = A(n, t), e = A(e, t), e.length > n.length ? I.NO_MATCH : n === e ? I.CASE_SENSITIVE_EQUAL : (n = n.toLowerCase(), e = e.toLowerCase(), n === e ? I.EQUAL : n.startsWith(e) ? I.STARTS_WITH : n.includes(` ${e}`) ? I.WORD_STARTS_WITH : n.includes(e) ? I.CONTAINS : e.length === 1 ? I.NO_MATCH : S(n).includes(e) ? I.ACRONYM : C(n, e));
|
|
88
|
-
}
|
|
89
|
-
function S(n) {
|
|
90
|
-
let e = "";
|
|
91
|
-
const t = n.split(" ");
|
|
92
|
-
for (const r of t) {
|
|
93
|
-
const c = r.split("-");
|
|
94
|
-
for (const s of c) e += s.slice(0, 1);
|
|
95
|
-
}
|
|
96
|
-
return e;
|
|
97
|
-
}
|
|
98
|
-
function C(n, e) {
|
|
99
|
-
let t = 0,
|
|
100
|
-
r = 0;
|
|
101
|
-
function c(a, i, o) {
|
|
102
|
-
for (let l = o, m = i.length; l < m; l++) if (i[l] === a) return t += 1, l + 1;
|
|
103
|
-
return -1;
|
|
104
|
-
}
|
|
105
|
-
function s(a) {
|
|
106
|
-
const i = 1 / a,
|
|
107
|
-
o = t / e.length;
|
|
108
|
-
return I.MATCHES + o * i;
|
|
109
|
-
}
|
|
110
|
-
const y = c(e[0], n, 0);
|
|
111
|
-
if (y < 0) return I.NO_MATCH;
|
|
112
|
-
r = y;
|
|
113
|
-
for (let a = 1, i = e.length; a < i; a++) {
|
|
114
|
-
const o = e[a];
|
|
115
|
-
if (r = c(o, n, r), !(r > -1)) return I.NO_MATCH;
|
|
116
|
-
}
|
|
117
|
-
const u = r - y;
|
|
118
|
-
return s(u);
|
|
119
|
-
}
|
|
120
|
-
function V(n, e, t) {
|
|
121
|
-
const {
|
|
122
|
-
rank: s,
|
|
123
|
-
keyIndex: y
|
|
124
|
-
} = n,
|
|
125
|
-
{
|
|
126
|
-
rank: u,
|
|
127
|
-
keyIndex: a
|
|
128
|
-
} = e;
|
|
129
|
-
return s === u ? y === a ? t(n, e) : y < a ? -1 : 1 : s > u ? -1 : 1;
|
|
130
|
-
}
|
|
131
|
-
function A(n, {
|
|
132
|
-
keepDiacritics: e
|
|
133
|
-
}) {
|
|
134
|
-
return n = `${n}`, e || (n = (0, _removeAccents.removeAccents)(n)), n;
|
|
135
|
-
}
|
|
136
|
-
function K(n, e) {
|
|
137
|
-
typeof e == "object" && (e = e.key);
|
|
138
|
-
let t;
|
|
139
|
-
if (typeof e == "function") t = e(n);else if (n === null) t = null;else if (Object.hasOwnProperty.call(n, e)) t = n[e];else {
|
|
140
|
-
if (e.includes(".")) return x(e, n);
|
|
141
|
-
t = null;
|
|
142
|
-
}
|
|
143
|
-
return t === null ? [] : Array.isArray(t) ? t : [String(t)];
|
|
144
|
-
}
|
|
145
|
-
function x(n, e) {
|
|
146
|
-
const t = n.split(".");
|
|
147
|
-
let r = [e];
|
|
148
|
-
for (let c = 0, s = t.length; c < s; c++) {
|
|
149
|
-
const y = t[c];
|
|
150
|
-
let u = [];
|
|
151
|
-
for (let a = 0, i = r.length; a < i; a++) {
|
|
152
|
-
const o = r[a];
|
|
153
|
-
if (o !== null) if (y && Object.hasOwnProperty.call(o, y)) {
|
|
154
|
-
const l = o[y];
|
|
155
|
-
l !== null && u.push(l);
|
|
156
|
-
} else o && y === "*" && (u = [...u, o]);
|
|
157
|
-
}
|
|
158
|
-
r = u;
|
|
159
|
-
}
|
|
160
|
-
return Array.isArray(r[0]) ? [].concat(...r) : r;
|
|
161
|
-
}
|
|
162
|
-
function M(n, e) {
|
|
163
|
-
const t = [];
|
|
164
|
-
for (let r = 0, c = e.length; r < c; r++) {
|
|
165
|
-
const s = e[r],
|
|
166
|
-
y = H(s),
|
|
167
|
-
u = K(n, s);
|
|
168
|
-
for (let a = 0, i = u.length; a < i; a++) t.push({
|
|
169
|
-
itemValue: u[a],
|
|
170
|
-
attributes: y
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
return t;
|
|
174
|
-
}
|
|
175
|
-
const h = {
|
|
176
|
-
maxRanking: 1 / 0,
|
|
177
|
-
minRanking: -1 / 0
|
|
178
|
-
};
|
|
179
|
-
function H(n) {
|
|
180
|
-
return typeof n == "string" ? h : {
|
|
181
|
-
...h,
|
|
182
|
-
...n
|
|
183
|
-
};
|
|
184
|
-
}
|
|
1
|
+
require(`./remove-accents-CXBUC-Id.cjs`);const e=require(`./match-sorter-BjnWjkKu.cjs`);exports.defaultBaseSortFn=e.t,exports.matchSorter=e.n,exports.rankings=e.r;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as RankingInfo, c as matchSorter, i as MatchSorterOptions, l as rankings, n as KeyAttributesOptions, o as ValueGetterKey, r as KeyOption, s as defaultBaseSortFn, t as KeyAttributes } from "./match-sorter-CMYN3GuY.cjs";
|
|
2
|
+
export { KeyAttributes, KeyAttributesOptions, KeyOption, MatchSorterOptions, RankingInfo, ValueGetterKey, defaultBaseSortFn, matchSorter, rankings };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as RankingInfo, c as matchSorter, i as MatchSorterOptions, l as rankings, n as KeyAttributesOptions, o as ValueGetterKey, r as KeyOption, s as defaultBaseSortFn, t as KeyAttributes } from "./match-sorter-DCRerxVe.mjs";
|
|
2
|
+
export { KeyAttributes, KeyAttributesOptions, KeyOption, MatchSorterOptions, RankingInfo, ValueGetterKey, defaultBaseSortFn, matchSorter, rankings };
|
package/dist/match-sorter.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"./remove-accents-BFmyvTRZ.mjs";import{n as e,r as t,t as n}from"./match-sorter-B9_7YvTo.mjs";export{n as defaultBaseSortFn,e as matchSorter,t as rankings};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memoize-Cr5jFKxi.mjs","names":["results: Record<string, T>"],"sources":["../src/memoize.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 at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Memoizes a function based on its string identifier.\n *\n * @param fn - The function to memoize.\n * @returns A memoized version of the input function.\n */\nexport const memoizeOnId = <T>(fn: (id: string) => T) => {\n // eslint-disable-next-line ts/unbound-method\n const hasOwnProperty = Object.prototype.hasOwnProperty;\n const results: Record<string, T> = {};\n\n const memoizedFn = (id: string) => {\n if (hasOwnProperty.call(results, id)) {\n return results[id];\n }\n return (results[id] = fn(id));\n };\n\n return memoizedFn;\n};\n"],"mappings":"AAwBA,MAAa,EAAkB,GAA0B,CAEvD,IAAM,EAAiB,OAAO,UAAU,eAClCA,EAA6B,EAAE,CASrC,MAPoB,IACd,EAAe,KAAK,EAAS,EAAG,CAC3B,EAAQ,GAET,EAAQ,GAAM,EAAG,EAAG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/memoize.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Memoizes a function based on its string identifier.
|
|
4
|
+
*
|
|
5
|
+
* @param fn - The function to memoize.
|
|
6
|
+
* @returns A memoized version of the input function.
|
|
7
|
+
*/
|
|
8
|
+
declare const memoizeOnId: <T>(fn: (id: string) => T) => (id: string) => T | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { memoizeOnId as t };
|
|
11
|
+
//# sourceMappingURL=memoize-TyrmWrfR.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memoize-TyrmWrfR.d.mts","names":[],"sources":["../src/memoize.ts"],"sourcesContent":[],"mappings":";;AAwBA;;;;;cAAa,qCAAsC,sBAKnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>{let t=Object.prototype.hasOwnProperty,n={};return r=>t.call(n,r)?n[r]:n[r]=e(r)};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/memoize.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Memoizes a function based on its string identifier.
|
|
4
|
+
*
|
|
5
|
+
* @param fn - The function to memoize.
|
|
6
|
+
* @returns A memoized version of the input function.
|
|
7
|
+
*/
|
|
8
|
+
declare const memoizeOnId: <T>(fn: (id: string) => T) => (id: string) => T | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { memoizeOnId as t };
|
|
11
|
+
//# sourceMappingURL=memoize-tSTYY522.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memoize-tSTYY522.d.cts","names":[],"sources":["../src/memoize.ts"],"sourcesContent":[],"mappings":";;AAwBA;;;;;cAAa,qCAAsC,sBAKnB"}
|
package/dist/memoize.cjs
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.memoizeOnId = void 0;
|
|
7
|
-
const memoizeOnId = e => {
|
|
8
|
-
const n = Object.prototype.hasOwnProperty,
|
|
9
|
-
t = {};
|
|
10
|
-
return r => n.call(t, r) ? t[r] : t[r] = e(r);
|
|
11
|
-
};
|
|
12
|
-
exports.memoizeOnId = memoizeOnId;
|
|
1
|
+
const e=require(`./memoize-qxvbI-0y.cjs`);exports.memoizeOnId=e.t;
|
package/dist/memoize.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{t as e}from"./memoize-Cr5jFKxi.mjs";export{e as memoizeOnId};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./semaphore-DkHqPlow.cjs`);var t=class{semaphore=new e.t(1);get isLocked(){return this.semaphore.available===0}async acquire(){return this.semaphore.acquire()}release(){this.semaphore.release()}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
//#region src/mutex.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A Mutex (mutual exclusion lock) for async functions.
|
|
4
|
+
* It allows only one async task to access a critical section at a time.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const mutex = new Mutex();
|
|
9
|
+
*
|
|
10
|
+
* async function criticalSection() {
|
|
11
|
+
* await mutex.acquire();
|
|
12
|
+
* try {
|
|
13
|
+
* // This code section cannot be executed simultaneously
|
|
14
|
+
* } finally {
|
|
15
|
+
* mutex.release();
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* criticalSection();
|
|
20
|
+
* criticalSection(); // This call will wait until the first call releases the mutex.
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare class Mutex {
|
|
24
|
+
private semaphore;
|
|
25
|
+
/**
|
|
26
|
+
* Checks if the mutex is currently locked.
|
|
27
|
+
* @returns True if the mutex is locked, false otherwise.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const mutex = new Mutex();
|
|
31
|
+
* console.log(mutex.isLocked); // false
|
|
32
|
+
* await mutex.acquire();
|
|
33
|
+
* console.log(mutex.isLocked); // true
|
|
34
|
+
* mutex.release();
|
|
35
|
+
* console.log(mutex.isLocked); // false
|
|
36
|
+
*/
|
|
37
|
+
get isLocked(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Acquires the mutex, blocking if necessary until it is available.
|
|
40
|
+
* @returns A promise that resolves when the mutex is acquired.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const mutex = new Mutex();
|
|
45
|
+
* await mutex.acquire();
|
|
46
|
+
* try {
|
|
47
|
+
* // This code section cannot be executed simultaneously
|
|
48
|
+
* } finally {
|
|
49
|
+
* mutex.release();
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
acquire(): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Releases the mutex, allowing another waiting task to proceed.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const mutex = new Mutex();
|
|
60
|
+
* await mutex.acquire();
|
|
61
|
+
* try {
|
|
62
|
+
* // This code section cannot be executed simultaneously
|
|
63
|
+
* } finally {
|
|
64
|
+
* mutex.release(); // Allows another waiting task to proceed.
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
release(): void;
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { Mutex as t };
|
|
72
|
+
//# sourceMappingURL=mutex-DAZduiSP.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutex-DAZduiSP.d.mts","names":[],"sources":["../src/mutex.ts"],"sourcesContent":[],"mappings":";;AAyCA;;;;;;;;;;;;;;;;;;;;cAAa,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAkCa"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
//#region src/mutex.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A Mutex (mutual exclusion lock) for async functions.
|
|
4
|
+
* It allows only one async task to access a critical section at a time.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const mutex = new Mutex();
|
|
9
|
+
*
|
|
10
|
+
* async function criticalSection() {
|
|
11
|
+
* await mutex.acquire();
|
|
12
|
+
* try {
|
|
13
|
+
* // This code section cannot be executed simultaneously
|
|
14
|
+
* } finally {
|
|
15
|
+
* mutex.release();
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* criticalSection();
|
|
20
|
+
* criticalSection(); // This call will wait until the first call releases the mutex.
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare class Mutex {
|
|
24
|
+
private semaphore;
|
|
25
|
+
/**
|
|
26
|
+
* Checks if the mutex is currently locked.
|
|
27
|
+
* @returns True if the mutex is locked, false otherwise.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const mutex = new Mutex();
|
|
31
|
+
* console.log(mutex.isLocked); // false
|
|
32
|
+
* await mutex.acquire();
|
|
33
|
+
* console.log(mutex.isLocked); // true
|
|
34
|
+
* mutex.release();
|
|
35
|
+
* console.log(mutex.isLocked); // false
|
|
36
|
+
*/
|
|
37
|
+
get isLocked(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Acquires the mutex, blocking if necessary until it is available.
|
|
40
|
+
* @returns A promise that resolves when the mutex is acquired.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const mutex = new Mutex();
|
|
45
|
+
* await mutex.acquire();
|
|
46
|
+
* try {
|
|
47
|
+
* // This code section cannot be executed simultaneously
|
|
48
|
+
* } finally {
|
|
49
|
+
* mutex.release();
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
acquire(): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Releases the mutex, allowing another waiting task to proceed.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const mutex = new Mutex();
|
|
60
|
+
* await mutex.acquire();
|
|
61
|
+
* try {
|
|
62
|
+
* // This code section cannot be executed simultaneously
|
|
63
|
+
* } finally {
|
|
64
|
+
* mutex.release(); // Allows another waiting task to proceed.
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
release(): void;
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { Mutex as t };
|
|
72
|
+
//# sourceMappingURL=mutex-DCyX7B66.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutex-DCyX7B66.d.cts","names":[],"sources":["../src/mutex.ts"],"sourcesContent":[],"mappings":";;AAyCA;;;;;;;;;;;;;;;;;;;;cAAa,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAkCa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutex-TqoKHosg.mjs","names":[],"sources":["../src/mutex.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 at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Semaphore } from \"./semaphore\";\n\n/**\n * A Mutex (mutual exclusion lock) for async functions.\n * It allows only one async task to access a critical section at a time.\n *\n * @example\n * ```typescript\n * const mutex = new Mutex();\n *\n * async function criticalSection() {\n * await mutex.acquire();\n * try {\n * // This code section cannot be executed simultaneously\n * } finally {\n * mutex.release();\n * }\n * }\n *\n * criticalSection();\n * criticalSection(); // This call will wait until the first call releases the mutex.\n * ```\n */\nexport class Mutex {\n private semaphore = new Semaphore(1);\n\n /**\n * Checks if the mutex is currently locked.\n * @returns True if the mutex is locked, false otherwise.\n *\n * @example\n * const mutex = new Mutex();\n * console.log(mutex.isLocked); // false\n * await mutex.acquire();\n * console.log(mutex.isLocked); // true\n * mutex.release();\n * console.log(mutex.isLocked); // false\n */\n public get isLocked(): boolean {\n return this.semaphore.available === 0;\n }\n\n /**\n * Acquires the mutex, blocking if necessary until it is available.\n * @returns A promise that resolves when the mutex is acquired.\n *\n * @example\n * ```typescript\n * const mutex = new Mutex();\n * await mutex.acquire();\n * try {\n * // This code section cannot be executed simultaneously\n * } finally {\n * mutex.release();\n * }\n * ```\n */\n public async acquire(): Promise<void> {\n return this.semaphore.acquire();\n }\n\n /**\n * Releases the mutex, allowing another waiting task to proceed.\n *\n * @example\n * ```typescript\n * const mutex = new Mutex();\n * await mutex.acquire();\n * try {\n * // This code section cannot be executed simultaneously\n * } finally {\n * mutex.release(); // Allows another waiting task to proceed.\n * }\n * ```\n */\n public release(): void {\n this.semaphore.release();\n }\n}\n"],"mappings":"6CAyCA,IAAa,EAAb,KAAmB,CACjB,UAAoB,IAAI,EAAU,EAAE,CAcpC,IAAW,UAAoB,CAC7B,OAAO,KAAK,UAAU,YAAc,EAkBtC,MAAa,SAAyB,CACpC,OAAO,KAAK,UAAU,SAAS,CAiBjC,SAAuB,CACrB,KAAK,UAAU,SAAS"}
|
package/dist/mutex.cjs
CHANGED
|
@@ -1,20 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Mutex = void 0;
|
|
7
|
-
var _semaphore = require("./semaphore.cjs");
|
|
8
|
-
class Mutex {
|
|
9
|
-
semaphore = new _semaphore.Semaphore(1);
|
|
10
|
-
get isLocked() {
|
|
11
|
-
return this.semaphore.available === 0;
|
|
12
|
-
}
|
|
13
|
-
async acquire() {
|
|
14
|
-
return this.semaphore.acquire();
|
|
15
|
-
}
|
|
16
|
-
release() {
|
|
17
|
-
this.semaphore.release();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.Mutex = Mutex;
|
|
1
|
+
const e=require(`./mutex-CnQQBndt.cjs`);exports.Mutex=e.t;
|
package/dist/mutex.d.cts
ADDED
package/dist/mutex.d.mts
ADDED
package/dist/mutex.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"./mutex-TqoKHosg.mjs";export{e as Mutex};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noop-B7OetrhD.mjs","names":[],"sources":["../src/noop.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 no op, or no-op, function for no operation\n *\n * @remarks Please see {@link https://dev.to/praneshpsg239/noop-in-javascript-478h | this article} for more information.\n *\n * @param _params - An optional parameter passed to the function. It can be anything (but is not used in any way)\n */\nexport const noop = (_params?: unknown): void => {};\n\n/**\n * An asynchronous no-operation function that does nothing.\n * This can be used as a placeholder or default function.\n *\n * @example\n * asyncNoop(); // Does nothing\n *\n * @returns This function returns a Promise that resolves to undefined.\n */\nexport async function asyncNoop(_params?: unknown): Promise<void> {}\n"],"mappings":"AAwBA,MAAa,EAAQ,GAA4B,GAWjD,eAAsB,EAAU,EAAkC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/noop.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* A no op, or no-op, function for no operation
|
|
3
4
|
*
|
|
@@ -5,7 +6,7 @@
|
|
|
5
6
|
*
|
|
6
7
|
* @param _params - An optional parameter passed to the function. It can be anything (but is not used in any way)
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
+
declare const noop: (_params?: unknown) => void;
|
|
9
10
|
/**
|
|
10
11
|
* An asynchronous no-operation function that does nothing.
|
|
11
12
|
* This can be used as a placeholder or default function.
|
|
@@ -15,4 +16,7 @@ export declare const noop: (_params?: unknown) => void;
|
|
|
15
16
|
*
|
|
16
17
|
* @returns This function returns a Promise that resolves to undefined.
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
+
declare function asyncNoop(_params?: unknown): Promise<void>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { noop as n, asyncNoop as t };
|
|
22
|
+
//# sourceMappingURL=noop-BnXKMH6Z.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noop-BnXKMH6Z.d.mts","names":[],"sources":["../src/noop.ts"],"sourcesContent":[],"mappings":";;AAwBA;AAWA;;;;;cAXa;;;;;;;;;;iBAWS,SAAA,qBAA8B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/noop.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A no op, or no-op, function for no operation
|
|
4
|
+
*
|
|
5
|
+
* @remarks Please see {@link https://dev.to/praneshpsg239/noop-in-javascript-478h | this article} for more information.
|
|
6
|
+
*
|
|
7
|
+
* @param _params - An optional parameter passed to the function. It can be anything (but is not used in any way)
|
|
8
|
+
*/
|
|
9
|
+
declare const noop: (_params?: unknown) => void;
|
|
10
|
+
/**
|
|
11
|
+
* An asynchronous no-operation function that does nothing.
|
|
12
|
+
* This can be used as a placeholder or default function.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* asyncNoop(); // Does nothing
|
|
16
|
+
*
|
|
17
|
+
* @returns This function returns a Promise that resolves to undefined.
|
|
18
|
+
*/
|
|
19
|
+
declare function asyncNoop(_params?: unknown): Promise<void>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { noop as n, asyncNoop as t };
|
|
22
|
+
//# sourceMappingURL=noop-CnJXOCpF.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noop-CnJXOCpF.d.cts","names":[],"sources":["../src/noop.ts"],"sourcesContent":[],"mappings":";;AAwBA;AAWA;;;;;cAXa;;;;;;;;;;iBAWS,SAAA,qBAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>{};async function t(e){}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
package/dist/noop.cjs
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.asyncNoop = asyncNoop;
|
|
7
|
-
exports.noop = void 0;
|
|
8
|
-
const noop = o => {};
|
|
9
|
-
exports.noop = noop;
|
|
10
|
-
async function asyncNoop(o) {}
|
|
1
|
+
const e=require(`./noop-Dpf7hIui.cjs`);exports.asyncNoop=e.t,exports.noop=e.n;
|
package/dist/noop.d.cts
ADDED
package/dist/noop.d.mts
ADDED
package/dist/noop.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{n as e,t}from"./noop-B7OetrhD.mjs";export{t as asyncNoop,e as noop};
|