@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,160 @@
|
|
|
1
|
+
//#region ../types/src/base.d.ts
|
|
2
|
+
|
|
3
|
+
type Nullish = undefined | null;
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region ../types/src/json.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Get keys of the given type as strings.
|
|
9
|
+
*
|
|
10
|
+
* Number keys are converted to strings.
|
|
11
|
+
*
|
|
12
|
+
* Use-cases:
|
|
13
|
+
* - Get string keys from a type which may have number keys.
|
|
14
|
+
* - Makes it possible to index using strings retrieved from template types.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```
|
|
18
|
+
* import type {StringKeyOf} from 'type-fest';
|
|
19
|
+
*
|
|
20
|
+
* type Foo = {
|
|
21
|
+
* 1: number,
|
|
22
|
+
* stringKey: string,
|
|
23
|
+
* };
|
|
24
|
+
*
|
|
25
|
+
* type StringKeysOfFoo = StringKeyOf<Foo>;
|
|
26
|
+
* //=> '1' | 'stringKey'
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
type StringKeyOf<BaseType> = `${Extract<keyof BaseType, string | number>}`;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region ../types/src/string.d.ts
|
|
32
|
+
|
|
33
|
+
type StringDigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region ../types/src/utilities.d.ts
|
|
36
|
+
|
|
37
|
+
type ComputeRange<N extends number, Result extends unknown[] = []> = Result["length"] extends N ? Result : ComputeRange<N, [...Result, Result["length"]]>;
|
|
38
|
+
type Index40 = ComputeRange<40>[number];
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region ../types/src/object.d.ts
|
|
41
|
+
|
|
42
|
+
interface GetOptions {
|
|
43
|
+
/**
|
|
44
|
+
* Include `undefined` in the return type when accessing properties.
|
|
45
|
+
*
|
|
46
|
+
* Setting this to `false` is not recommended.
|
|
47
|
+
*
|
|
48
|
+
* @defaultValue `true`
|
|
49
|
+
*/
|
|
50
|
+
strict?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Like the `Get` type but receives an array of strings as a path parameter.
|
|
54
|
+
*/
|
|
55
|
+
type GetWithPath<BaseType, Keys extends readonly string[], Options extends GetOptions = {}> = Keys extends readonly [] ? BaseType : Keys extends readonly [infer Head, ...infer Tail] ? GetWithPath<PropertyOf<BaseType, Extract<Head, string>, Options>, Extract<Tail, string[]>, Options> : never;
|
|
56
|
+
/**
|
|
57
|
+
* Adds `undefined` to `Type` if `strict` is enabled.
|
|
58
|
+
*/
|
|
59
|
+
type Strictify<Type, Options extends GetOptions> = Options["strict"] extends false ? Type : Type | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* If `Options['strict']` is `true`, includes `undefined` in the returned type when accessing properties on `Record<string, any>`.
|
|
62
|
+
*
|
|
63
|
+
* Known limitations:
|
|
64
|
+
* - Does not include `undefined` in the type on object types with an index signature (for example, `{a: string; [key: string]: string}`).
|
|
65
|
+
*/
|
|
66
|
+
type StrictPropertyOf<BaseType, Key$1 extends keyof BaseType, Options extends GetOptions> = Record<string, any> extends BaseType ? string extends keyof BaseType ? Strictify<BaseType[Key$1], Options> : BaseType[Key$1] : BaseType[Key$1];
|
|
67
|
+
/**
|
|
68
|
+
* Represents an array of strings split using a given character or character set.
|
|
69
|
+
*
|
|
70
|
+
* Use-case: Defining the return type of a method like `String.prototype.split`.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```
|
|
74
|
+
* import type {Split} from 'type-fest';
|
|
75
|
+
*
|
|
76
|
+
* declare function split<S extends string, D extends string>(string: S, separator: D): Split<S, D>;
|
|
77
|
+
*
|
|
78
|
+
* type Item = 'foo' | 'bar' | 'baz' | 'waldo';
|
|
79
|
+
* const items = 'foo,bar,baz,waldo';
|
|
80
|
+
* let array: Item[];
|
|
81
|
+
*
|
|
82
|
+
* array = split(items, ',');
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
type Split<S extends string, Delimiter extends string> = S extends `${infer Head}${Delimiter}${infer Tail}` ? [Head, ...Split<Tail, Delimiter>] : S extends Delimiter ? [] : [S];
|
|
86
|
+
/**
|
|
87
|
+
* Splits a dot-prop style path into a tuple comprised of the properties in the path. Handles square-bracket notation.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```
|
|
91
|
+
* ToPath<'foo.bar.baz'>
|
|
92
|
+
* //=> ['foo', 'bar', 'baz']
|
|
93
|
+
*
|
|
94
|
+
* ToPath<'foo[0].bar.baz'>
|
|
95
|
+
* //=> ['foo', '0', 'bar', 'baz']
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
type ToPath<S extends string> = Split<FixPathSquareBrackets<S>, ".">;
|
|
99
|
+
/**
|
|
100
|
+
* Replaces square-bracketed dot notation with dots, for example, `foo[0].bar` -\> `foo.0.bar`.
|
|
101
|
+
*/
|
|
102
|
+
type FixPathSquareBrackets<Path extends string> = Path extends `[${infer Head}]${infer Tail}` ? Tail extends `[${string}` ? `${Head}.${FixPathSquareBrackets<Tail>}` : `${Head}${FixPathSquareBrackets<Tail>}` : Path extends `${infer Head}[${infer Middle}]${infer Tail}` ? `${Head}.${FixPathSquareBrackets<`[${Middle}]${Tail}`>}` : Path;
|
|
103
|
+
/**
|
|
104
|
+
* Returns true if `LongString` is made up out of `Substring` repeated 0 or more times.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```ts
|
|
108
|
+
* ConsistsOnlyOf<'aaa', 'a'> //=> true
|
|
109
|
+
* ConsistsOnlyOf<'ababab', 'ab'> //=> true
|
|
110
|
+
* ConsistsOnlyOf<'aBa', 'a'> //=> false
|
|
111
|
+
* ConsistsOnlyOf<'', 'a'> //=> true
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
*/
|
|
115
|
+
type ConsistsOnlyOf<LongString extends string, Substring extends string> = LongString extends "" ? true : LongString extends `${Substring}${infer Tail}` ? ConsistsOnlyOf<Tail, Substring> : false;
|
|
116
|
+
/**
|
|
117
|
+
* Convert a type which may have number keys to one with string keys, making it possible to index using strings retrieved from template types.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
*
|
|
121
|
+
* ```ts
|
|
122
|
+
* type WithNumbers = {foo: string; 0: boolean};
|
|
123
|
+
* type WithStrings = WithStringKeys<WithNumbers>;
|
|
124
|
+
*
|
|
125
|
+
* type WithNumbersKeys = keyof WithNumbers;
|
|
126
|
+
* //=> 'foo' | 0
|
|
127
|
+
* type WithStringsKeys = keyof WithStrings;
|
|
128
|
+
* //=> 'foo' | '0'
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
*/
|
|
132
|
+
type WithStringKeys<BaseType> = { [Key in StringKeyOf<BaseType>]: UncheckedIndex<BaseType, Key> };
|
|
133
|
+
/**
|
|
134
|
+
Perform a `T[U]` operation if `T` supports indexing.
|
|
135
|
+
*/
|
|
136
|
+
type UncheckedIndex<T, U$1 extends number | string> = [T] extends [Record<number | string, any>] ? T[U$1] : never;
|
|
137
|
+
/**
|
|
138
|
+
* Get a property of an object or array. Works when indexing arrays using number-literal-strings, for example, `PropertyOf<number[], '0'> = number`, and when indexing objects with number keys.
|
|
139
|
+
*
|
|
140
|
+
* Note:
|
|
141
|
+
* - Returns `unknown` if `Key` is not a property of `BaseType`, since TypeScript uses structural typing, and it cannot be guaranteed that extra properties unknown to the type system will exist at runtime.
|
|
142
|
+
* - Returns `undefined` from nullish values, to match the behavior of most deep-key libraries like `lodash`, `dot-prop`, etc.
|
|
143
|
+
*/
|
|
144
|
+
type PropertyOf<BaseType, Key$1 extends string, Options extends GetOptions = {}> = BaseType extends Nullish ? undefined : Key$1 extends keyof BaseType ? StrictPropertyOf<BaseType, Key$1, Options> : BaseType extends readonly [] | readonly [unknown, ...unknown[]] ? unknown : BaseType extends {
|
|
145
|
+
[n: number]: infer Item;
|
|
146
|
+
length: number;
|
|
147
|
+
} ? ConsistsOnlyOf<Key$1, StringDigit> extends true ? Strictify<Item, Options> : unknown : Key$1 extends keyof WithStringKeys<BaseType> ? StrictPropertyOf<WithStringKeys<BaseType>, Key$1, Options> : unknown;
|
|
148
|
+
type IsTuple<T> = T extends {
|
|
149
|
+
length: infer Length;
|
|
150
|
+
} & readonly any[] ? Length extends Index40 ? T : never : never;
|
|
151
|
+
type AllowedIndexes<Tuple extends readonly any[], Keys extends number = never> = Tuple extends readonly [] ? Keys : Tuple extends readonly [infer _First, ...infer Tail] ? AllowedIndexes<Tail, Keys | Tail["length"]> : Keys;
|
|
152
|
+
type PrefixArrayAccessor<T extends any[], TDepth extends any[]> = { [K in keyof T]: `[${number}]${DeepKey<T[K], TDepth>}` }[number];
|
|
153
|
+
type PrefixTupleAccessor<T extends any[], TIndex extends number, TDepth extends any[]> = { [K in TIndex]: `[${K}]${DeepKey<T[K], TDepth>}` | `[${K}]` }[TIndex];
|
|
154
|
+
type PrefixObjectAccessor<T extends object, TDepth extends any[]> = { [K in keyof T]-?: K extends number | string ? `${PrefixFromDepth<K, TDepth>}${DeepKey<T[K], [TDepth]>}` | PrefixFromDepth<K, TDepth> : never }[keyof T];
|
|
155
|
+
type PrefixFromDepth<T extends number | string, TDepth extends any[]> = TDepth["length"] extends 0 ? T : `.${T}`;
|
|
156
|
+
type DeepKey<T, TDepth extends any[] = []> = TDepth["length"] extends 5 ? never : unknown extends T ? PrefixFromDepth<string, TDepth> : T extends IsTuple<T> & any[] ? PrefixTupleAccessor<T, AllowedIndexes<T>, TDepth> : T extends any[] ? PrefixArrayAccessor<T, [...TDepth, any]> : T extends Date ? never : T extends object ? PrefixObjectAccessor<T, TDepth> : T extends bigint | boolean | number | string ? "" : never;
|
|
157
|
+
type DeepValue<TObject extends Record<string, unknown>, TPath extends DeepKey<TObject>> = GetWithPath<TObject, ToPath<TPath>>;
|
|
158
|
+
//#endregion
|
|
159
|
+
export { DeepValue as n, DeepKey as t };
|
|
160
|
+
//# sourceMappingURL=object-CHmrmQna.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-CHmrmQna.d.mts","names":[],"sources":["../../types/src/base.ts","../../types/src/json.ts","../../types/src/string.ts","../../types/src/utilities.ts","../../types/src/object.ts"],"sourcesContent":[],"mappings":";;AI+R8B,KJxMlB,OAAA,GIwMkB,SAAA,GAAA,IAAA;;;;;;;;;;;;;;;;;;AAwB9B;;;;;;;;AAKc,KHjOF,WGiOE,CAAA,QAAA,CAAA,GAAA,GHhOT,OGgOS,CAAA,MHhOK,QGgOL,EAAA,MAAA,GAAA,MAAA,CAAA,EAAA;;;;AAEP,KF7KK,WAAA,GE6KL,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA;;;;AD9QH,KAHQ,YAGR,CAAA,UAAA,MAAA,EAAA,eAAA,OAAA,EAAA,GAAA,EAAA,CAAA,GAAA,MAAA,CAAA,QAAA,CAAA,SAAyB,CAAzB,GACA,MADA,GAEA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,QAAQ,EAAE,KAAK,aAC/C,gBAAgB,GAAG,wBAErB;KAEH,mEAGD,6BAA6B,QAAQ;KAE7B,wCAAwC,qDAEhC,IACd,wBAAwB,UACxB,UAAU,QAAQ,aAChB,oBAAoB,GAAG,eAAe,IAAI,UAC1C,kBACE,oBAAoB,OAAO,gBAC3B,UAAU,eAER,mBACE,qBAAqB,GAAG,UACxB;KAaF,0BACM,uCACF,QAAQ,YACpB,YAAY,SAAS,OAAO"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
//#region ../types/src/base.d.ts
|
|
2
|
+
|
|
3
|
+
type Nullish = undefined | null;
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region ../types/src/json.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Get keys of the given type as strings.
|
|
9
|
+
*
|
|
10
|
+
* Number keys are converted to strings.
|
|
11
|
+
*
|
|
12
|
+
* Use-cases:
|
|
13
|
+
* - Get string keys from a type which may have number keys.
|
|
14
|
+
* - Makes it possible to index using strings retrieved from template types.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```
|
|
18
|
+
* import type {StringKeyOf} from 'type-fest';
|
|
19
|
+
*
|
|
20
|
+
* type Foo = {
|
|
21
|
+
* 1: number,
|
|
22
|
+
* stringKey: string,
|
|
23
|
+
* };
|
|
24
|
+
*
|
|
25
|
+
* type StringKeysOfFoo = StringKeyOf<Foo>;
|
|
26
|
+
* //=> '1' | 'stringKey'
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
type StringKeyOf<BaseType> = `${Extract<keyof BaseType, string | number>}`;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region ../types/src/string.d.ts
|
|
32
|
+
|
|
33
|
+
type StringDigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region ../types/src/utilities.d.ts
|
|
36
|
+
|
|
37
|
+
type ComputeRange<N extends number, Result extends unknown[] = []> = Result["length"] extends N ? Result : ComputeRange<N, [...Result, Result["length"]]>;
|
|
38
|
+
type Index40 = ComputeRange<40>[number];
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region ../types/src/object.d.ts
|
|
41
|
+
|
|
42
|
+
interface GetOptions {
|
|
43
|
+
/**
|
|
44
|
+
* Include `undefined` in the return type when accessing properties.
|
|
45
|
+
*
|
|
46
|
+
* Setting this to `false` is not recommended.
|
|
47
|
+
*
|
|
48
|
+
* @defaultValue `true`
|
|
49
|
+
*/
|
|
50
|
+
strict?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Like the `Get` type but receives an array of strings as a path parameter.
|
|
54
|
+
*/
|
|
55
|
+
type GetWithPath<BaseType, Keys extends readonly string[], Options extends GetOptions = {}> = Keys extends readonly [] ? BaseType : Keys extends readonly [infer Head, ...infer Tail] ? GetWithPath<PropertyOf<BaseType, Extract<Head, string>, Options>, Extract<Tail, string[]>, Options> : never;
|
|
56
|
+
/**
|
|
57
|
+
* Adds `undefined` to `Type` if `strict` is enabled.
|
|
58
|
+
*/
|
|
59
|
+
type Strictify<Type, Options extends GetOptions> = Options["strict"] extends false ? Type : Type | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* If `Options['strict']` is `true`, includes `undefined` in the returned type when accessing properties on `Record<string, any>`.
|
|
62
|
+
*
|
|
63
|
+
* Known limitations:
|
|
64
|
+
* - Does not include `undefined` in the type on object types with an index signature (for example, `{a: string; [key: string]: string}`).
|
|
65
|
+
*/
|
|
66
|
+
type StrictPropertyOf<BaseType, Key$1 extends keyof BaseType, Options extends GetOptions> = Record<string, any> extends BaseType ? string extends keyof BaseType ? Strictify<BaseType[Key$1], Options> : BaseType[Key$1] : BaseType[Key$1];
|
|
67
|
+
/**
|
|
68
|
+
* Represents an array of strings split using a given character or character set.
|
|
69
|
+
*
|
|
70
|
+
* Use-case: Defining the return type of a method like `String.prototype.split`.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```
|
|
74
|
+
* import type {Split} from 'type-fest';
|
|
75
|
+
*
|
|
76
|
+
* declare function split<S extends string, D extends string>(string: S, separator: D): Split<S, D>;
|
|
77
|
+
*
|
|
78
|
+
* type Item = 'foo' | 'bar' | 'baz' | 'waldo';
|
|
79
|
+
* const items = 'foo,bar,baz,waldo';
|
|
80
|
+
* let array: Item[];
|
|
81
|
+
*
|
|
82
|
+
* array = split(items, ',');
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
type Split<S extends string, Delimiter extends string> = S extends `${infer Head}${Delimiter}${infer Tail}` ? [Head, ...Split<Tail, Delimiter>] : S extends Delimiter ? [] : [S];
|
|
86
|
+
/**
|
|
87
|
+
* Splits a dot-prop style path into a tuple comprised of the properties in the path. Handles square-bracket notation.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```
|
|
91
|
+
* ToPath<'foo.bar.baz'>
|
|
92
|
+
* //=> ['foo', 'bar', 'baz']
|
|
93
|
+
*
|
|
94
|
+
* ToPath<'foo[0].bar.baz'>
|
|
95
|
+
* //=> ['foo', '0', 'bar', 'baz']
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
type ToPath<S extends string> = Split<FixPathSquareBrackets<S>, ".">;
|
|
99
|
+
/**
|
|
100
|
+
* Replaces square-bracketed dot notation with dots, for example, `foo[0].bar` -\> `foo.0.bar`.
|
|
101
|
+
*/
|
|
102
|
+
type FixPathSquareBrackets<Path extends string> = Path extends `[${infer Head}]${infer Tail}` ? Tail extends `[${string}` ? `${Head}.${FixPathSquareBrackets<Tail>}` : `${Head}${FixPathSquareBrackets<Tail>}` : Path extends `${infer Head}[${infer Middle}]${infer Tail}` ? `${Head}.${FixPathSquareBrackets<`[${Middle}]${Tail}`>}` : Path;
|
|
103
|
+
/**
|
|
104
|
+
* Returns true if `LongString` is made up out of `Substring` repeated 0 or more times.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```ts
|
|
108
|
+
* ConsistsOnlyOf<'aaa', 'a'> //=> true
|
|
109
|
+
* ConsistsOnlyOf<'ababab', 'ab'> //=> true
|
|
110
|
+
* ConsistsOnlyOf<'aBa', 'a'> //=> false
|
|
111
|
+
* ConsistsOnlyOf<'', 'a'> //=> true
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
*/
|
|
115
|
+
type ConsistsOnlyOf<LongString extends string, Substring extends string> = LongString extends "" ? true : LongString extends `${Substring}${infer Tail}` ? ConsistsOnlyOf<Tail, Substring> : false;
|
|
116
|
+
/**
|
|
117
|
+
* Convert a type which may have number keys to one with string keys, making it possible to index using strings retrieved from template types.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
*
|
|
121
|
+
* ```ts
|
|
122
|
+
* type WithNumbers = {foo: string; 0: boolean};
|
|
123
|
+
* type WithStrings = WithStringKeys<WithNumbers>;
|
|
124
|
+
*
|
|
125
|
+
* type WithNumbersKeys = keyof WithNumbers;
|
|
126
|
+
* //=> 'foo' | 0
|
|
127
|
+
* type WithStringsKeys = keyof WithStrings;
|
|
128
|
+
* //=> 'foo' | '0'
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
*/
|
|
132
|
+
type WithStringKeys<BaseType> = { [Key in StringKeyOf<BaseType>]: UncheckedIndex<BaseType, Key> };
|
|
133
|
+
/**
|
|
134
|
+
Perform a `T[U]` operation if `T` supports indexing.
|
|
135
|
+
*/
|
|
136
|
+
type UncheckedIndex<T, U$1 extends number | string> = [T] extends [Record<number | string, any>] ? T[U$1] : never;
|
|
137
|
+
/**
|
|
138
|
+
* Get a property of an object or array. Works when indexing arrays using number-literal-strings, for example, `PropertyOf<number[], '0'> = number`, and when indexing objects with number keys.
|
|
139
|
+
*
|
|
140
|
+
* Note:
|
|
141
|
+
* - Returns `unknown` if `Key` is not a property of `BaseType`, since TypeScript uses structural typing, and it cannot be guaranteed that extra properties unknown to the type system will exist at runtime.
|
|
142
|
+
* - Returns `undefined` from nullish values, to match the behavior of most deep-key libraries like `lodash`, `dot-prop`, etc.
|
|
143
|
+
*/
|
|
144
|
+
type PropertyOf<BaseType, Key$1 extends string, Options extends GetOptions = {}> = BaseType extends Nullish ? undefined : Key$1 extends keyof BaseType ? StrictPropertyOf<BaseType, Key$1, Options> : BaseType extends readonly [] | readonly [unknown, ...unknown[]] ? unknown : BaseType extends {
|
|
145
|
+
[n: number]: infer Item;
|
|
146
|
+
length: number;
|
|
147
|
+
} ? ConsistsOnlyOf<Key$1, StringDigit> extends true ? Strictify<Item, Options> : unknown : Key$1 extends keyof WithStringKeys<BaseType> ? StrictPropertyOf<WithStringKeys<BaseType>, Key$1, Options> : unknown;
|
|
148
|
+
type IsTuple<T> = T extends {
|
|
149
|
+
length: infer Length;
|
|
150
|
+
} & readonly any[] ? Length extends Index40 ? T : never : never;
|
|
151
|
+
type AllowedIndexes<Tuple extends readonly any[], Keys extends number = never> = Tuple extends readonly [] ? Keys : Tuple extends readonly [infer _First, ...infer Tail] ? AllowedIndexes<Tail, Keys | Tail["length"]> : Keys;
|
|
152
|
+
type PrefixArrayAccessor<T extends any[], TDepth extends any[]> = { [K in keyof T]: `[${number}]${DeepKey<T[K], TDepth>}` }[number];
|
|
153
|
+
type PrefixTupleAccessor<T extends any[], TIndex extends number, TDepth extends any[]> = { [K in TIndex]: `[${K}]${DeepKey<T[K], TDepth>}` | `[${K}]` }[TIndex];
|
|
154
|
+
type PrefixObjectAccessor<T extends object, TDepth extends any[]> = { [K in keyof T]-?: K extends number | string ? `${PrefixFromDepth<K, TDepth>}${DeepKey<T[K], [TDepth]>}` | PrefixFromDepth<K, TDepth> : never }[keyof T];
|
|
155
|
+
type PrefixFromDepth<T extends number | string, TDepth extends any[]> = TDepth["length"] extends 0 ? T : `.${T}`;
|
|
156
|
+
type DeepKey<T, TDepth extends any[] = []> = TDepth["length"] extends 5 ? never : unknown extends T ? PrefixFromDepth<string, TDepth> : T extends IsTuple<T> & any[] ? PrefixTupleAccessor<T, AllowedIndexes<T>, TDepth> : T extends any[] ? PrefixArrayAccessor<T, [...TDepth, any]> : T extends Date ? never : T extends object ? PrefixObjectAccessor<T, TDepth> : T extends bigint | boolean | number | string ? "" : never;
|
|
157
|
+
type DeepValue<TObject extends Record<string, unknown>, TPath extends DeepKey<TObject>> = GetWithPath<TObject, ToPath<TPath>>;
|
|
158
|
+
//#endregion
|
|
159
|
+
export { DeepValue as n, DeepKey as t };
|
|
160
|
+
//# sourceMappingURL=object-D8HGAGMr.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-D8HGAGMr.d.cts","names":[],"sources":["../../types/src/base.ts","../../types/src/json.ts","../../types/src/string.ts","../../types/src/utilities.ts","../../types/src/object.ts"],"sourcesContent":[],"mappings":";;AI+R8B,KJxMlB,OAAA,GIwMkB,SAAA,GAAA,IAAA;;;;;;;;;;;;;;;;;;AAwB9B;;;;;;;;AAKc,KHjOF,WGiOE,CAAA,QAAA,CAAA,GAAA,GHhOT,OGgOS,CAAA,MHhOK,QGgOL,EAAA,MAAA,GAAA,MAAA,CAAA,EAAA;;;;AAEP,KF7KK,WAAA,GE6KL,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA;;;;AD9QH,KAHQ,YAGR,CAAA,UAAA,MAAA,EAAA,eAAA,OAAA,EAAA,GAAA,EAAA,CAAA,GAAA,MAAA,CAAA,QAAA,CAAA,SAAyB,CAAzB,GACA,MADA,GAEA,YAFA,CAEa,CAFb,EAAA,CAAA,GAEoB,MAFpB,EAE4B,MAF5B,CAAA,QAAA,CAAA,CAAA,CAAA;AAAyB,KAIjB,OAAA,GAAU,YAJO,CAAA,EAAA,CAAA,CAAA,MAAA,CAAA;;;;UC+LnB,UAAA,CA0JJ;EAAC;AAUP;;;;;;EAQuB,MAAA,CAAA,EAAA,OAAA;;;;;AAGf,KAj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ACM,uCACF,QAAQ,YACpB,YAAY,SAAS,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){let n={...e};for(let e=0;e<t.length;e++){let r=t[e];r&&delete n[r]}return n}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omit-BROsDK0D.mjs","names":[],"sources":["../src/omit.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 with specified keys omitted.\n *\n * This function takes an object and an array of keys, and returns a new object that\n * excludes the properties corresponding to the specified keys.\n *\n * @param obj - The object to omit keys from.\n * @param keys - An array of keys to be omitted from the object.\n * @returns A new object with the specified keys omitted.\n *\n * @example\n * ```typescript\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = omit(obj, ['b', 'c']);\n * // result will be { a: 1 }\n * ```\n */\nexport function omit<T extends Record<string, any>, K extends keyof T>(\n obj: T,\n keys: readonly K[]\n): Omit<T, K> {\n const result = { ...obj };\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key) {\n delete result[key];\n }\n }\n\n return result as Omit<T, K>;\n}\n"],"mappings":"AAmCA,SAAgB,EACd,EACA,EACY,CACZ,IAAM,EAAS,CAAE,GAAG,EAAK,CAEzB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAK,OAAQ,IAAK,CACpC,IAAM,EAAM,EAAK,GACb,GACF,OAAO,EAAO,GAIlB,OAAO"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/omit.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Creates a new object with specified keys omitted.
|
|
3
4
|
*
|
|
@@ -15,4 +16,7 @@
|
|
|
15
16
|
* // result will be { a: 1 }
|
|
16
17
|
* ```
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
+
declare function omit<T extends Record<string, any>, K extends keyof T>(obj: T, keys: readonly K[]): Omit<T, K>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { omit as t };
|
|
22
|
+
//# sourceMappingURL=omit-D1FKiOYz.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omit-D1FKiOYz.d.cts","names":[],"sources":["../src/omit.ts"],"sourcesContent":[],"mappings":";;AAmCA;;;;;;;;;;;;;;;;iBAAgB,eAAe,qCAAqC,QAC7D,kBACU,MACd,KAAK,GAAG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/omit.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a new object with specified keys omitted.
|
|
4
|
+
*
|
|
5
|
+
* This function takes an object and an array of keys, and returns a new object that
|
|
6
|
+
* excludes the properties corresponding to the specified keys.
|
|
7
|
+
*
|
|
8
|
+
* @param obj - The object to omit keys from.
|
|
9
|
+
* @param keys - An array of keys to be omitted from the object.
|
|
10
|
+
* @returns A new object with the specified keys omitted.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const obj = { a: 1, b: 2, c: 3 };
|
|
15
|
+
* const result = omit(obj, ['b', 'c']);
|
|
16
|
+
* // result will be { a: 1 }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare function omit<T extends Record<string, any>, K extends keyof T>(obj: T, keys: readonly K[]): Omit<T, K>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { omit as t };
|
|
22
|
+
//# sourceMappingURL=omit-DpqOAtKt.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omit-DpqOAtKt.d.mts","names":[],"sources":["../src/omit.ts"],"sourcesContent":[],"mappings":";;AAmCA;;;;;;;;;;;;;;;;iBAAgB,eAAe,qCAAqC,QAC7D,kBACU,MACd,KAAK,GAAG"}
|
package/dist/omit.cjs
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.omit = omit;
|
|
7
|
-
function omit(r, t) {
|
|
8
|
-
const n = {
|
|
9
|
-
...r
|
|
10
|
-
};
|
|
11
|
-
for (let e = 0; e < t.length; e++) {
|
|
12
|
-
const o = t[e];
|
|
13
|
-
o && delete n[o];
|
|
14
|
-
}
|
|
15
|
-
return n;
|
|
16
|
-
}
|
|
1
|
+
const e=require(`./omit-A0uVyAS4.cjs`);exports.omit=e.t;
|
package/dist/omit.d.cts
ADDED
package/dist/omit.d.mts
ADDED
package/dist/omit.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{t as e}from"./omit-BROsDK0D.mjs";export{e as omit};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/once.d.ts
|
|
2
|
+
/** silence "error TS2322" but practically this is safer and more convenient than resorting to `any` in a random place */
|
|
3
|
+
declare function safeFunctionCast<TFunc extends (...args: any[]) => any>(fn: (...args: Parameters<TFunc>) => ReturnType<TFunc>): TFunc;
|
|
4
|
+
/**
|
|
5
|
+
* Executes a function only once.
|
|
6
|
+
*
|
|
7
|
+
* @param fn - The function to be executed only once.
|
|
8
|
+
* @returns A function that, when called, will execute the original function only once.
|
|
9
|
+
*/
|
|
10
|
+
declare function once<TFunc extends (...args: any[]) => any>(fn: TFunc): TFunc;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { safeFunctionCast as n, once as t };
|
|
13
|
+
//# sourceMappingURL=once-DNPPQd3P.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"once-DNPPQd3P.d.mts","names":[],"sources":["../src/once.ts"],"sourcesContent":[],"mappings":";;AAmBgB,iBAAA,gBAAgB,CAAA,cAAA,CAAA,GAAA,IAAA,EAAA,GAAA,EAAA,EAAA,GAAA,GAAA,CAAA,CAAA,EAAA,EAAA,CAAA,GAAA,IAAA,EAChB,UADgB,CACL,KADK,CAAA,EAAA,GACM,UADN,CACiB,KADjB,CAAA,CAAA,EAE7B,KAF6B;;;;;;;AAehB,iBAAA,IAAgD,CAAA,cAAa,CAAA,GAAA,IAAA,EAAA,GAAA,EAAA,EAAA,GAAA,GAAA,CAAA,CAAA,EAAA,EAAb,KAAa,CAAA,EAAL,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return e}function t(t){let n,r=!1;return e(function(...e){return r||=(n=t.apply(this,e),!0),n})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/once.d.ts
|
|
2
|
+
/** silence "error TS2322" but practically this is safer and more convenient than resorting to `any` in a random place */
|
|
3
|
+
declare function safeFunctionCast<TFunc extends (...args: any[]) => any>(fn: (...args: Parameters<TFunc>) => ReturnType<TFunc>): TFunc;
|
|
4
|
+
/**
|
|
5
|
+
* Executes a function only once.
|
|
6
|
+
*
|
|
7
|
+
* @param fn - The function to be executed only once.
|
|
8
|
+
* @returns A function that, when called, will execute the original function only once.
|
|
9
|
+
*/
|
|
10
|
+
declare function once<TFunc extends (...args: any[]) => any>(fn: TFunc): TFunc;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { safeFunctionCast as n, once as t };
|
|
13
|
+
//# sourceMappingURL=once-DqmxXwEB.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"once-DqmxXwEB.d.cts","names":[],"sources":["../src/once.ts"],"sourcesContent":[],"mappings":";;AAmBgB,iBAAA,gBAAgB,CAAA,cAAA,CAAA,GAAA,IAAA,EAAA,GAAA,EAAA,EAAA,GAAA,GAAA,CAAA,CAAA,EAAA,EAAA,CAAA,GAAA,IAAA,EAChB,UADgB,CACL,KADK,CAAA,EAAA,GACM,UADN,CACiB,KADjB,CAAA,CAAA,EAE7B,KAF6B;;;;;;;AAehB,iBAAA,IAAgD,CAAA,cAAa,CAAA,GAAA,IAAA,EAAA,GAAA,EAAA,EAAA,GAAA,GAAA,CAAA,CAAA,EAAA,EAAb,KAAa,CAAA,EAAL,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"once-txoW63yJ.mjs","names":["result: ReturnType<TFunc>"],"sources":["../src/once.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/** silence \"error TS2322\" but practically this is safer and more convenient than resorting to `any` in a random place */\nexport function safeFunctionCast<TFunc extends (...args: any[]) => any>(\n fn: (...args: Parameters<TFunc>) => ReturnType<TFunc>\n): TFunc {\n // @ts-expect-error\n // error TS2322: Type '(...args: Parameters<F>) => ReturnType<F>' is not assignable to type 'F'.\n // '(...args: Parameters<F>) => ReturnType<F>' is assignable to the constraint of type 'F', but 'F' could be instantiated with a different subtype of constraint '(...args: any[]) => any'.\n return fn;\n}\n\n/**\n * Executes a function only once.\n *\n * @param fn - The function to be executed only once.\n * @returns A function that, when called, will execute the original function only once.\n */\nexport function once<TFunc extends (...args: any[]) => any>(fn: TFunc): TFunc {\n let result: ReturnType<TFunc>;\n let called = false;\n\n // eslint-disable-next-line func-names\n return safeFunctionCast<TFunc>(function (this: unknown, ...args) {\n if (!called) {\n result = fn.apply(this, args);\n called = true;\n }\n return result;\n });\n}\n"],"mappings":"AAmBA,SAAgB,EACd,EACO,CAIP,OAAO,EAST,SAAgB,EAA4C,EAAkB,CAC5E,IAAIA,EACA,EAAS,GAGb,OAAO,EAAwB,SAAyB,GAAG,EAAM,CAK/D,MAJA,CAEE,KADA,EAAS,EAAG,MAAM,KAAM,EAAK,CACpB,IAEJ,GACP"}
|
package/dist/once.cjs
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.once = once;
|
|
7
|
-
exports.safeFunctionCast = safeFunctionCast;
|
|
8
|
-
function safeFunctionCast(n) {
|
|
9
|
-
return n;
|
|
10
|
-
}
|
|
11
|
-
function once(n) {
|
|
12
|
-
let e,
|
|
13
|
-
t = !1;
|
|
14
|
-
return function (...u) {
|
|
15
|
-
return t || (e = n.apply(this, u), t = !0), e;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
1
|
+
const e=require(`./once-DZCwmdkv.cjs`);exports.once=e.t,exports.safeFunctionCast=e.n;
|
package/dist/once.d.cts
ADDED
package/dist/once.d.mts
ADDED
package/dist/once.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{n as e,t}from"./once-txoW63yJ.mjs";export{t as once,e as safeFunctionCast};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pick-CuXTvXaw.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"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/pick.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Creates a new object composed of the picked object properties.
|
|
3
4
|
*
|
|
@@ -15,4 +16,7 @@
|
|
|
15
16
|
* // result will be { a: 1, c: 3 }
|
|
16
17
|
* ```
|
|
17
18
|
*/
|
|
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 as t };
|
|
22
|
+
//# sourceMappingURL=pick-DXREvZBr.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pick-DXREvZBr.d.cts","names":[],"sources":["../src/pick.ts"],"sourcesContent":[],"mappings":";;AAmCA;;;;;;;;;;;;;;;;iBAAgB,eAAe,qCAAqC,QAC7D,kBACU,MACd,KAAK,GAAG"}
|
|
@@ -0,0 +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}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1,22 @@
|
|
|
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 as t };
|
|
22
|
+
//# sourceMappingURL=pick-ZrWD4de2.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pick-ZrWD4de2.d.mts","names":[],"sources":["../src/pick.ts"],"sourcesContent":[],"mappings":";;AAmCA;;;;;;;;;;;;;;;;iBAAgB,eAAe,qCAAqC,QAC7D,kBACU,MACd,KAAK,GAAG"}
|
package/dist/pick.cjs
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.pick = pick;
|
|
7
|
-
function pick(t, c) {
|
|
8
|
-
const r = {};
|
|
9
|
-
for (let n = 0; n < c.length; n++) {
|
|
10
|
-
const e = c[n];
|
|
11
|
-
e && Object.hasOwn(t, e) && (r[e] = t[e]);
|
|
12
|
-
}
|
|
13
|
-
return r;
|
|
14
|
-
}
|
|
1
|
+
const e=require(`./pick-GDOwAh6I.cjs`);exports.pick=e.t;
|
package/dist/pick.d.cts
ADDED
package/dist/pick.d.mts
ADDED
package/dist/pick.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{t as e}from"./pick-CuXTvXaw.mjs";export{e as pick};
|
|
@@ -0,0 +1,2 @@
|
|
|
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`,Ḕ:`E`,Ḝ:`E`,Ȇ:`E`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,Ḯ:`I`,Ȋ:`I`,Ð:`D`,Ñ:`N`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,Ố:`O`,Ṍ:`O`,Ṓ:`O`,Ȏ:`O`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,Ý:`Y`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,ấ:`a`,ắ:`a`,ẳ:`a`,ẵ:`a`,ặ:`a`,æ:`ae`,ầ:`a`,ằ:`a`,ȃ:`a`,ç:`c`,ḉ:`c`,è:`e`,é:`e`,ê:`e`,ë:`e`,ế:`e`,ḗ:`e`,ề:`e`,ḕ:`e`,ḝ:`e`,ȇ:`e`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