@stryke/helpers 0.9.26 → 0.9.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/arg-identity.cjs +1 -1
- package/dist/arg-identity.d.cts +14 -2
- package/dist/arg-identity.d.cts.map +1 -0
- package/dist/arg-identity.d.mts +14 -2
- package/dist/arg-identity.d.mts.map +1 -0
- package/dist/arg-identity.mjs +2 -1
- package/dist/arg-identity.mjs.map +1 -0
- package/dist/convert/src/to-string-key.cjs +1 -0
- package/dist/convert/src/to-string-key.mjs +2 -0
- package/dist/convert/src/to-string-key.mjs.map +1 -0
- package/dist/debounce.cjs +1 -1
- package/dist/debounce.d.cts +47 -2
- package/dist/debounce.d.cts.map +1 -0
- package/dist/debounce.d.mts +47 -2
- package/dist/debounce.d.mts.map +1 -0
- package/dist/debounce.mjs +2 -1
- package/dist/debounce.mjs.map +1 -0
- package/dist/deep-clone.cjs +1 -1
- package/dist/deep-clone.d.cts +65 -2
- package/dist/deep-clone.d.cts.map +1 -0
- package/dist/deep-clone.d.mts +65 -2
- package/dist/deep-clone.d.mts.map +1 -0
- package/dist/deep-clone.mjs +2 -1
- package/dist/deep-clone.mjs.map +1 -0
- package/dist/deep-merge.cjs +1 -1
- package/dist/deep-merge.d.cts +26 -2
- package/dist/deep-merge.d.cts.map +1 -0
- package/dist/deep-merge.d.mts +26 -2
- package/dist/deep-merge.d.mts.map +1 -0
- package/dist/deep-merge.mjs +2 -1
- package/dist/deep-merge.mjs.map +1 -0
- package/dist/delay.cjs +1 -1
- package/dist/delay.d.cts +77 -2
- package/dist/delay.d.cts.map +1 -0
- package/dist/delay.d.mts +77 -2
- package/dist/delay.d.mts.map +1 -0
- package/dist/delay.mjs +2 -1
- package/dist/delay.mjs.map +1 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.mjs +2 -1
- package/dist/errors.mjs.map +1 -0
- package/dist/filter-empty.cjs +1 -1
- package/dist/filter-empty.d.cts +5 -2
- package/dist/filter-empty.d.cts.map +1 -0
- package/dist/filter-empty.d.mts +5 -2
- package/dist/filter-empty.d.mts.map +1 -0
- package/dist/filter-empty.mjs +2 -1
- package/dist/filter-empty.mjs.map +1 -0
- package/dist/flatten-object.cjs +1 -1
- package/dist/flatten-object.d.cts +35 -2
- package/dist/flatten-object.d.cts.map +1 -0
- package/dist/flatten-object.d.mts +35 -2
- package/dist/flatten-object.d.mts.map +1 -0
- package/dist/flatten-object.mjs +2 -1
- package/dist/flatten-object.mjs.map +1 -0
- package/dist/get-field.cjs +1 -1
- package/dist/get-field.d.cts +254 -2
- package/dist/get-field.d.cts.map +1 -0
- package/dist/get-field.d.mts +254 -2
- package/dist/get-field.d.mts.map +1 -0
- package/dist/get-field.mjs +2 -1
- package/dist/get-field.mjs.map +1 -0
- package/dist/get-ordered-by.cjs +1 -1
- package/dist/get-ordered-by.d.cts +39 -2
- package/dist/get-ordered-by.d.cts.map +1 -0
- package/dist/get-ordered-by.d.mts +39 -2
- package/dist/get-ordered-by.d.mts.map +1 -0
- package/dist/get-ordered-by.mjs +2 -1
- package/dist/get-ordered-by.mjs.map +1 -0
- package/dist/get-unique.cjs +1 -1
- package/dist/get-unique.d.cts +26 -2
- package/dist/get-unique.d.cts.map +1 -0
- package/dist/get-unique.d.mts +26 -2
- package/dist/get-unique.d.mts.map +1 -0
- package/dist/get-unique.mjs +2 -1
- package/dist/get-unique.mjs.map +1 -0
- package/dist/identity.cjs +1 -1
- package/dist/identity.d.cts +18 -2
- package/dist/identity.d.cts.map +1 -0
- package/dist/identity.d.mts +18 -2
- package/dist/identity.d.mts.map +1 -0
- package/dist/identity.mjs +2 -1
- package/dist/identity.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +31 -31
- package/dist/index.d.mts +31 -31
- package/dist/index.mjs +1 -1
- package/dist/is-equal.cjs +1 -1
- package/dist/is-equal.d.cts +22 -2
- package/dist/is-equal.d.cts.map +1 -0
- package/dist/is-equal.d.mts +22 -2
- package/dist/is-equal.d.mts.map +1 -0
- package/dist/is-equal.mjs +2 -1
- package/dist/is-equal.mjs.map +1 -0
- package/dist/lru-cache.cjs +1 -1
- package/dist/lru-cache.d.cts +103 -2
- package/dist/lru-cache.d.cts.map +1 -0
- package/dist/lru-cache.d.mts +103 -2
- package/dist/lru-cache.d.mts.map +1 -0
- package/dist/lru-cache.mjs +2 -1
- package/dist/lru-cache.mjs.map +1 -0
- package/dist/match-sorter.cjs +1 -1
- package/dist/match-sorter.d.cts +78 -2
- package/dist/match-sorter.d.cts.map +1 -0
- package/dist/match-sorter.d.mts +78 -2
- package/dist/match-sorter.d.mts.map +1 -0
- package/dist/match-sorter.mjs +2 -1
- package/dist/match-sorter.mjs.map +1 -0
- package/dist/memoize.cjs +1 -1
- package/dist/memoize.d.cts +11 -2
- package/dist/memoize.d.cts.map +1 -0
- package/dist/memoize.d.mts +11 -2
- package/dist/memoize.d.mts.map +1 -0
- package/dist/memoize.mjs +2 -1
- package/dist/memoize.mjs.map +1 -0
- package/dist/mutex.cjs +1 -1
- package/dist/mutex.d.cts +72 -2
- package/dist/mutex.d.cts.map +1 -0
- package/dist/mutex.d.mts +72 -2
- package/dist/mutex.d.mts.map +1 -0
- package/dist/mutex.mjs +2 -1
- package/dist/mutex.mjs.map +1 -0
- package/dist/noop.cjs +1 -1
- package/dist/noop.d.cts +22 -2
- package/dist/noop.d.cts.map +1 -0
- package/dist/noop.d.mts +22 -2
- package/dist/noop.d.mts.map +1 -0
- package/dist/noop.mjs +2 -1
- package/dist/noop.mjs.map +1 -0
- package/dist/omit.cjs +1 -1
- package/dist/omit.d.cts +22 -2
- package/dist/omit.d.cts.map +1 -0
- package/dist/omit.d.mts +22 -2
- package/dist/omit.d.mts.map +1 -0
- package/dist/omit.mjs +2 -1
- package/dist/omit.mjs.map +1 -0
- package/dist/once.cjs +1 -1
- package/dist/once.d.cts +13 -2
- package/dist/once.d.cts.map +1 -0
- package/dist/once.d.mts +13 -2
- package/dist/once.d.mts.map +1 -0
- package/dist/once.mjs +2 -1
- package/dist/once.mjs.map +1 -0
- package/dist/pick.cjs +1 -1
- package/dist/pick.d.cts +22 -2
- package/dist/pick.d.cts.map +1 -0
- package/dist/pick.d.mts +22 -2
- package/dist/pick.d.mts.map +1 -0
- package/dist/pick.mjs +2 -1
- package/dist/pick.mjs.map +1 -0
- package/dist/remove-accents.cjs +1 -1
- package/dist/remove-accents.d.cts +12 -2
- package/dist/remove-accents.d.cts.map +1 -0
- package/dist/remove-accents.d.mts +12 -2
- package/dist/remove-accents.d.mts.map +1 -0
- package/dist/remove-accents.mjs +2 -1
- package/dist/remove-accents.mjs.map +1 -0
- package/dist/remove-empty-items.cjs +1 -1
- package/dist/remove-empty-items.d.cts +11 -2
- package/dist/remove-empty-items.d.cts.map +1 -0
- package/dist/remove-empty-items.d.mts +11 -2
- package/dist/remove-empty-items.d.mts.map +1 -0
- package/dist/remove-empty-items.mjs +2 -1
- package/dist/remove-empty-items.mjs.map +1 -0
- package/dist/semaphore.cjs +1 -1
- package/dist/semaphore.d.cts +86 -2
- package/dist/semaphore.d.cts.map +1 -0
- package/dist/semaphore.d.mts +86 -2
- package/dist/semaphore.d.mts.map +1 -0
- package/dist/semaphore.mjs +2 -1
- package/dist/semaphore.mjs.map +1 -0
- package/dist/set-field.cjs +1 -1
- package/dist/set-field.d.cts +16 -2
- package/dist/set-field.d.cts.map +1 -0
- package/dist/set-field.d.mts +16 -2
- package/dist/set-field.d.mts.map +1 -0
- package/dist/set-field.mjs +2 -1
- package/dist/set-field.mjs.map +1 -0
- package/dist/throttle.cjs +1 -1
- package/dist/throttle.d.cts +32 -2
- package/dist/throttle.d.cts.map +1 -0
- package/dist/throttle.d.mts +32 -2
- package/dist/throttle.d.mts.map +1 -0
- package/dist/throttle.mjs +2 -1
- package/dist/throttle.mjs.map +1 -0
- package/dist/timeout.cjs +1 -1
- package/dist/timeout.d.cts +12 -2
- package/dist/timeout.d.cts.map +1 -0
- package/dist/timeout.d.mts +12 -2
- package/dist/timeout.d.mts.map +1 -0
- package/dist/timeout.mjs +2 -1
- package/dist/timeout.mjs.map +1 -0
- package/dist/to-deep-key.cjs +1 -1
- package/dist/to-deep-key.d.cts +42 -2
- package/dist/to-deep-key.d.cts.map +1 -0
- package/dist/to-deep-key.d.mts +42 -2
- package/dist/to-deep-key.d.mts.map +1 -0
- package/dist/to-deep-key.mjs +2 -1
- package/dist/to-deep-key.mjs.map +1 -0
- package/dist/to-path.cjs +1 -1
- package/dist/to-path.d.cts +24 -2
- package/dist/to-path.d.cts.map +1 -0
- package/dist/to-path.d.mts +24 -2
- package/dist/to-path.d.mts.map +1 -0
- package/dist/to-path.mjs +2 -1
- package/dist/to-path.mjs.map +1 -0
- package/dist/type-checks/src/get-object-tag.cjs +1 -0
- package/dist/type-checks/src/get-object-tag.mjs +2 -0
- package/dist/type-checks/src/get-object-tag.mjs.map +1 -0
- package/dist/type-checks/src/is-deep-key.cjs +1 -0
- package/dist/type-checks/src/is-deep-key.mjs +2 -0
- package/dist/type-checks/src/is-deep-key.mjs.map +1 -0
- package/dist/type-checks/src/is-empty.cjs +1 -0
- package/dist/type-checks/src/is-empty.mjs +2 -0
- package/dist/type-checks/src/is-empty.mjs.map +1 -0
- package/dist/type-checks/src/is-function.cjs +1 -0
- package/dist/type-checks/src/is-function.mjs +2 -0
- package/dist/type-checks/src/is-function.mjs.map +1 -0
- package/dist/type-checks/src/is-mergeable-object.cjs +1 -0
- package/dist/type-checks/src/is-mergeable-object.mjs +2 -0
- package/dist/type-checks/src/is-mergeable-object.mjs.map +1 -0
- package/dist/type-checks/src/is-non-null-object.cjs +1 -0
- package/dist/type-checks/src/is-non-null-object.mjs +2 -0
- package/dist/type-checks/src/is-non-null-object.mjs.map +1 -0
- package/dist/type-checks/src/is-null.cjs +1 -0
- package/dist/type-checks/src/is-null.mjs +2 -0
- package/dist/type-checks/src/is-null.mjs.map +1 -0
- package/dist/type-checks/src/is-number.cjs +1 -0
- package/dist/type-checks/src/is-number.mjs +2 -0
- package/dist/type-checks/src/is-number.mjs.map +1 -0
- package/dist/type-checks/src/is-object-index.cjs +1 -0
- package/dist/type-checks/src/is-object-index.mjs +2 -0
- package/dist/type-checks/src/is-object-index.mjs.map +1 -0
- package/dist/type-checks/src/is-object.cjs +1 -0
- package/dist/type-checks/src/is-object.mjs +2 -0
- package/dist/type-checks/src/is-object.mjs.map +1 -0
- package/dist/type-checks/src/is-plain-object.cjs +1 -0
- package/dist/type-checks/src/is-plain-object.mjs +2 -0
- package/dist/type-checks/src/is-plain-object.mjs.map +1 -0
- package/dist/type-checks/src/is-primitive.cjs +1 -0
- package/dist/type-checks/src/is-primitive.mjs +2 -0
- package/dist/type-checks/src/is-primitive.mjs.map +1 -0
- package/dist/type-checks/src/is-react-element.cjs +1 -0
- package/dist/type-checks/src/is-react-element.mjs +2 -0
- package/dist/type-checks/src/is-react-element.mjs.map +1 -0
- package/dist/type-checks/src/is-set-string.cjs +1 -0
- package/dist/type-checks/src/is-set-string.mjs +2 -0
- package/dist/type-checks/src/is-set-string.mjs.map +1 -0
- package/dist/type-checks/src/is-set.cjs +1 -0
- package/dist/type-checks/src/is-set.mjs +2 -0
- package/dist/type-checks/src/is-set.mjs.map +1 -0
- package/dist/{is-string-CvmuuuDj.mjs → type-checks/src/is-string.cjs} +1 -2
- package/dist/type-checks/src/is-string.mjs +2 -0
- package/dist/type-checks/src/is-string.mjs.map +1 -0
- package/dist/type-checks/src/is-typed-array.cjs +1 -0
- package/dist/type-checks/src/is-typed-array.mjs +2 -0
- package/dist/type-checks/src/is-typed-array.mjs.map +1 -0
- package/dist/type-checks/src/is-undefined.cjs +1 -0
- package/dist/type-checks/src/is-undefined.mjs +2 -0
- package/dist/type-checks/src/is-undefined.mjs.map +1 -0
- package/dist/type-checks/src/property-exists.cjs +1 -0
- package/dist/type-checks/src/property-exists.mjs +2 -0
- package/dist/type-checks/src/property-exists.mjs.map +1 -0
- package/dist/types/src/base.d.cts +6 -0
- package/dist/types/src/base.d.cts.map +1 -0
- package/dist/types/src/base.d.mts +6 -0
- package/dist/types/src/base.d.mts.map +1 -0
- package/dist/types/src/json.d.cts +28 -0
- package/dist/types/src/json.d.cts.map +1 -0
- package/dist/types/src/json.d.mts +28 -0
- package/dist/types/src/json.d.mts.map +1 -0
- package/dist/{object-CHmrmQna.d.mts → types/src/object.d.cts} +6 -40
- package/dist/types/src/object.d.cts.map +1 -0
- package/dist/{object-D8HGAGMr.d.cts → types/src/object.d.mts} +6 -40
- package/dist/types/src/object.d.mts.map +1 -0
- package/dist/types/src/string.d.cts +6 -0
- package/dist/types/src/string.d.cts.map +1 -0
- package/dist/types/src/string.d.mts +6 -0
- package/dist/types/src/string.d.mts.map +1 -0
- package/dist/types/src/utilities.d.cts +7 -0
- package/dist/types/src/utilities.d.cts.map +1 -0
- package/dist/types/src/utilities.d.mts +7 -0
- package/dist/types/src/utilities.d.mts.map +1 -0
- package/dist/unflatten-object.cjs +1 -1
- package/dist/unflatten-object.d.cts +35 -2
- package/dist/unflatten-object.d.cts.map +1 -0
- package/dist/unflatten-object.d.mts +35 -2
- package/dist/unflatten-object.d.mts.map +1 -0
- package/dist/unflatten-object.mjs +2 -1
- package/dist/unflatten-object.mjs.map +1 -0
- package/dist/union.cjs +1 -1
- package/dist/union.d.cts +24 -2
- package/dist/union.d.cts.map +1 -0
- package/dist/union.d.mts +24 -2
- package/dist/union.d.mts.map +1 -0
- package/dist/union.mjs +2 -1
- package/dist/union.mjs.map +1 -0
- package/dist/with-timeout.cjs +1 -1
- package/dist/with-timeout.d.cts +24 -2
- package/dist/with-timeout.d.cts.map +1 -0
- package/dist/with-timeout.d.mts +24 -2
- package/dist/with-timeout.d.mts.map +1 -0
- package/dist/with-timeout.mjs +2 -1
- package/dist/with-timeout.mjs.map +1 -0
- package/package.json +3 -3
- package/dist/arg-identity-BIir8uzO.d.mts +0 -14
- package/dist/arg-identity-BIir8uzO.d.mts.map +0 -1
- package/dist/arg-identity-BfviduMt.mjs +0 -2
- package/dist/arg-identity-BfviduMt.mjs.map +0 -1
- package/dist/arg-identity-C-pVjd0u.d.cts +0 -14
- package/dist/arg-identity-C-pVjd0u.d.cts.map +0 -1
- package/dist/arg-identity-dlKw6BsD.cjs +0 -1
- package/dist/debounce-C5O3IDKy.mjs +0 -2
- package/dist/debounce-C5O3IDKy.mjs.map +0 -1
- package/dist/debounce-CIMf8-Yr.d.mts +0 -47
- package/dist/debounce-CIMf8-Yr.d.mts.map +0 -1
- package/dist/debounce-CLb-VvJv.d.cts +0 -47
- package/dist/debounce-CLb-VvJv.d.cts.map +0 -1
- package/dist/debounce-SIYbhEOF.cjs +0 -1
- package/dist/deep-clone-BlN5QTtW.mjs +0 -2
- package/dist/deep-clone-BlN5QTtW.mjs.map +0 -1
- package/dist/deep-clone-CoUy-Hrt.cjs +0 -1
- package/dist/deep-clone-CpLJcTgz.d.mts +0 -65
- package/dist/deep-clone-CpLJcTgz.d.mts.map +0 -1
- package/dist/deep-clone-jRNy1xoj.d.cts +0 -65
- package/dist/deep-clone-jRNy1xoj.d.cts.map +0 -1
- package/dist/deep-merge-BDZ6c79O.mjs +0 -2
- package/dist/deep-merge-BDZ6c79O.mjs.map +0 -1
- package/dist/deep-merge-BpFjvumi.cjs +0 -1
- package/dist/deep-merge-C9qDSleg.d.cts +0 -26
- package/dist/deep-merge-C9qDSleg.d.cts.map +0 -1
- package/dist/deep-merge-eCT712Cv.d.mts +0 -26
- package/dist/deep-merge-eCT712Cv.d.mts.map +0 -1
- package/dist/delay-Bd_sGzMj.d.mts +0 -77
- package/dist/delay-Bd_sGzMj.d.mts.map +0 -1
- package/dist/delay-UwR_fCwt.cjs +0 -1
- package/dist/delay-VkcrQf1l.d.cts +0 -77
- package/dist/delay-VkcrQf1l.d.cts.map +0 -1
- package/dist/delay-wdNbY6sk.mjs +0 -2
- package/dist/delay-wdNbY6sk.mjs.map +0 -1
- package/dist/errors-BXYY8wXj.cjs +0 -1
- package/dist/errors-DWX9ET_b.mjs +0 -2
- package/dist/errors-DWX9ET_b.mjs.map +0 -1
- package/dist/filter-empty-5_nMg04e.cjs +0 -1
- package/dist/filter-empty-BMtd0K07.d.mts +0 -5
- package/dist/filter-empty-BMtd0K07.d.mts.map +0 -1
- package/dist/filter-empty-C2fq9M7o.d.cts +0 -5
- package/dist/filter-empty-C2fq9M7o.d.cts.map +0 -1
- package/dist/filter-empty-Dsc1ymCj.mjs +0 -2
- package/dist/filter-empty-Dsc1ymCj.mjs.map +0 -1
- package/dist/flatten-object-Bk2VT-b2.d.mts +0 -35
- package/dist/flatten-object-Bk2VT-b2.d.mts.map +0 -1
- package/dist/flatten-object-D-EbEZqR.cjs +0 -1
- package/dist/flatten-object-DFCZmly9.mjs +0 -2
- package/dist/flatten-object-DFCZmly9.mjs.map +0 -1
- package/dist/flatten-object-DjaJJaY0.d.cts +0 -35
- package/dist/flatten-object-DjaJJaY0.d.cts.map +0 -1
- package/dist/get-field-5XqtknPs.d.mts +0 -254
- package/dist/get-field-5XqtknPs.d.mts.map +0 -1
- package/dist/get-field-D4F_p-Ov.cjs +0 -1
- package/dist/get-field-ngQ9O38X.mjs +0 -2
- package/dist/get-field-ngQ9O38X.mjs.map +0 -1
- package/dist/get-field-oltWWNRO.d.cts +0 -254
- package/dist/get-field-oltWWNRO.d.cts.map +0 -1
- package/dist/get-object-tag-D53RvMgo.cjs +0 -1
- package/dist/get-object-tag-oBoWkttN.mjs +0 -2
- package/dist/get-object-tag-oBoWkttN.mjs.map +0 -1
- package/dist/get-ordered-by-C45FfW2T.d.mts +0 -39
- package/dist/get-ordered-by-C45FfW2T.d.mts.map +0 -1
- package/dist/get-ordered-by-CBKKJr4R.mjs +0 -2
- package/dist/get-ordered-by-CBKKJr4R.mjs.map +0 -1
- package/dist/get-ordered-by-D2Sr6vUN.cjs +0 -1
- package/dist/get-ordered-by-DuD7QRma.d.cts +0 -39
- package/dist/get-ordered-by-DuD7QRma.d.cts.map +0 -1
- package/dist/get-unique-BOiakY6A.cjs +0 -1
- package/dist/get-unique-C0SBPUBv.d.cts +0 -26
- package/dist/get-unique-C0SBPUBv.d.cts.map +0 -1
- package/dist/get-unique-DZ6E1Kvc.d.mts +0 -26
- package/dist/get-unique-DZ6E1Kvc.d.mts.map +0 -1
- package/dist/get-unique-DzZ7Z34U.mjs +0 -2
- package/dist/get-unique-DzZ7Z34U.mjs.map +0 -1
- package/dist/identity-B_cGeF8o.d.mts +0 -18
- package/dist/identity-B_cGeF8o.d.mts.map +0 -1
- package/dist/identity-DBwwvmGU.mjs +0 -2
- package/dist/identity-DBwwvmGU.mjs.map +0 -1
- package/dist/identity-DRhIvbPG.d.cts +0 -18
- package/dist/identity-DRhIvbPG.d.cts.map +0 -1
- package/dist/identity-z2xaIqpe.cjs +0 -1
- package/dist/is-empty-C7vlSVFD.mjs +0 -2
- package/dist/is-empty-C7vlSVFD.mjs.map +0 -1
- package/dist/is-empty-DZZDqzjD.cjs +0 -1
- package/dist/is-equal-0Z-K2uIG.mjs +0 -2
- package/dist/is-equal-0Z-K2uIG.mjs.map +0 -1
- package/dist/is-equal-BJgVhUVS.cjs +0 -1
- package/dist/is-equal-BMlMHlVi.d.cts +0 -22
- package/dist/is-equal-BMlMHlVi.d.cts.map +0 -1
- package/dist/is-equal-Baqurdpn.d.mts +0 -22
- package/dist/is-equal-Baqurdpn.d.mts.map +0 -1
- package/dist/is-number-BcjxCzDM.cjs +0 -1
- package/dist/is-number-bwhfkHlC.mjs +0 -2
- package/dist/is-number-bwhfkHlC.mjs.map +0 -1
- package/dist/is-plain-object-BQuFhL4M.cjs +0 -1
- package/dist/is-plain-object-D8GSMOhY.mjs +0 -2
- package/dist/is-plain-object-D8GSMOhY.mjs.map +0 -1
- package/dist/is-set-B9o0NIT4.mjs +0 -2
- package/dist/is-set-B9o0NIT4.mjs.map +0 -1
- package/dist/is-set-ByJOY6h2.cjs +0 -1
- package/dist/is-set-string-48_jZFw0.cjs +0 -1
- package/dist/is-set-string-Dr1MlMk0.mjs +0 -2
- package/dist/is-set-string-Dr1MlMk0.mjs.map +0 -1
- package/dist/is-string-CvmuuuDj.mjs.map +0 -1
- package/dist/is-string-DPanLeA_.cjs +0 -1
- package/dist/lru-cache-CzQ_kKXk.d.mts +0 -103
- package/dist/lru-cache-CzQ_kKXk.d.mts.map +0 -1
- package/dist/lru-cache-D4VEIgtR.d.cts +0 -103
- package/dist/lru-cache-D4VEIgtR.d.cts.map +0 -1
- package/dist/lru-cache-DLY_yZRN.mjs +0 -2
- package/dist/lru-cache-DLY_yZRN.mjs.map +0 -1
- package/dist/lru-cache-DgTSGx5W.cjs +0 -1
- package/dist/match-sorter-B9_7YvTo.mjs +0 -2
- package/dist/match-sorter-B9_7YvTo.mjs.map +0 -1
- package/dist/match-sorter-BjnWjkKu.cjs +0 -1
- package/dist/match-sorter-CMYN3GuY.d.cts +0 -78
- package/dist/match-sorter-CMYN3GuY.d.cts.map +0 -1
- package/dist/match-sorter-DCRerxVe.d.mts +0 -78
- package/dist/match-sorter-DCRerxVe.d.mts.map +0 -1
- package/dist/memoize-Cr5jFKxi.mjs +0 -2
- package/dist/memoize-Cr5jFKxi.mjs.map +0 -1
- package/dist/memoize-TyrmWrfR.d.mts +0 -11
- package/dist/memoize-TyrmWrfR.d.mts.map +0 -1
- package/dist/memoize-qxvbI-0y.cjs +0 -1
- package/dist/memoize-tSTYY522.d.cts +0 -11
- package/dist/memoize-tSTYY522.d.cts.map +0 -1
- package/dist/mutex-CnQQBndt.cjs +0 -1
- package/dist/mutex-DAZduiSP.d.mts +0 -72
- package/dist/mutex-DAZduiSP.d.mts.map +0 -1
- package/dist/mutex-DCyX7B66.d.cts +0 -72
- package/dist/mutex-DCyX7B66.d.cts.map +0 -1
- package/dist/mutex-TqoKHosg.mjs +0 -2
- package/dist/mutex-TqoKHosg.mjs.map +0 -1
- package/dist/noop-B7OetrhD.mjs +0 -2
- package/dist/noop-B7OetrhD.mjs.map +0 -1
- package/dist/noop-BnXKMH6Z.d.mts +0 -22
- package/dist/noop-BnXKMH6Z.d.mts.map +0 -1
- package/dist/noop-CnJXOCpF.d.cts +0 -22
- package/dist/noop-CnJXOCpF.d.cts.map +0 -1
- package/dist/noop-Dpf7hIui.cjs +0 -1
- package/dist/object-CHmrmQna.d.mts.map +0 -1
- package/dist/object-D8HGAGMr.d.cts.map +0 -1
- package/dist/omit-A0uVyAS4.cjs +0 -1
- package/dist/omit-BROsDK0D.mjs +0 -2
- package/dist/omit-BROsDK0D.mjs.map +0 -1
- package/dist/omit-D1FKiOYz.d.cts +0 -22
- package/dist/omit-D1FKiOYz.d.cts.map +0 -1
- package/dist/omit-DpqOAtKt.d.mts +0 -22
- package/dist/omit-DpqOAtKt.d.mts.map +0 -1
- package/dist/once-DNPPQd3P.d.mts +0 -13
- package/dist/once-DNPPQd3P.d.mts.map +0 -1
- package/dist/once-DZCwmdkv.cjs +0 -1
- package/dist/once-DqmxXwEB.d.cts +0 -13
- package/dist/once-DqmxXwEB.d.cts.map +0 -1
- package/dist/once-txoW63yJ.mjs +0 -2
- package/dist/once-txoW63yJ.mjs.map +0 -1
- package/dist/pick-CuXTvXaw.mjs +0 -2
- package/dist/pick-CuXTvXaw.mjs.map +0 -1
- package/dist/pick-DXREvZBr.d.cts +0 -22
- package/dist/pick-DXREvZBr.d.cts.map +0 -1
- package/dist/pick-GDOwAh6I.cjs +0 -1
- package/dist/pick-ZrWD4de2.d.mts +0 -22
- package/dist/pick-ZrWD4de2.d.mts.map +0 -1
- package/dist/remove-accents-BFmyvTRZ.mjs +0 -2
- package/dist/remove-accents-BFmyvTRZ.mjs.map +0 -1
- package/dist/remove-accents-C4C0A2ex.d.mts +0 -12
- package/dist/remove-accents-C4C0A2ex.d.mts.map +0 -1
- package/dist/remove-accents-CXBUC-Id.cjs +0 -1
- package/dist/remove-accents-Yo3-2jWO.d.cts +0 -12
- package/dist/remove-accents-Yo3-2jWO.d.cts.map +0 -1
- package/dist/remove-empty-items-BglsRCyG.d.cts +0 -11
- package/dist/remove-empty-items-BglsRCyG.d.cts.map +0 -1
- package/dist/remove-empty-items-BzI9Vid9.mjs +0 -2
- package/dist/remove-empty-items-BzI9Vid9.mjs.map +0 -1
- package/dist/remove-empty-items-COwdCPHC.d.mts +0 -11
- package/dist/remove-empty-items-COwdCPHC.d.mts.map +0 -1
- package/dist/remove-empty-items-CjTxJuyS.cjs +0 -1
- package/dist/semaphore-4zJqtox8.mjs +0 -2
- package/dist/semaphore-4zJqtox8.mjs.map +0 -1
- package/dist/semaphore-CsGTxqsW.d.cts +0 -86
- package/dist/semaphore-CsGTxqsW.d.cts.map +0 -1
- package/dist/semaphore-DkHqPlow.cjs +0 -1
- package/dist/semaphore-WaZBtCk5.d.mts +0 -86
- package/dist/semaphore-WaZBtCk5.d.mts.map +0 -1
- package/dist/set-field-CUgbKEjW.mjs +0 -2
- package/dist/set-field-CUgbKEjW.mjs.map +0 -1
- package/dist/set-field-CcCiXZNl.d.cts +0 -16
- package/dist/set-field-CcCiXZNl.d.cts.map +0 -1
- package/dist/set-field-DyvXgpNP.d.mts +0 -16
- package/dist/set-field-DyvXgpNP.d.mts.map +0 -1
- package/dist/set-field-mr4GkhFb.cjs +0 -1
- package/dist/throttle-BOKOTo3m.cjs +0 -1
- package/dist/throttle-BWPQuZty.d.cts +0 -32
- package/dist/throttle-BWPQuZty.d.cts.map +0 -1
- package/dist/throttle-BgU4k6qs.d.mts +0 -32
- package/dist/throttle-BgU4k6qs.d.mts.map +0 -1
- package/dist/throttle-CYK3F0mZ.mjs +0 -2
- package/dist/throttle-CYK3F0mZ.mjs.map +0 -1
- package/dist/timeout-43rG9ETK.mjs +0 -2
- package/dist/timeout-43rG9ETK.mjs.map +0 -1
- package/dist/timeout-CLhwG-oo.d.mts +0 -12
- package/dist/timeout-CLhwG-oo.d.mts.map +0 -1
- package/dist/timeout-CoYbhliP.cjs +0 -1
- package/dist/timeout-DC38jHR8.d.cts +0 -12
- package/dist/timeout-DC38jHR8.d.cts.map +0 -1
- package/dist/to-deep-key-Cma9aiEz.cjs +0 -1
- package/dist/to-deep-key-D8uDBd6T.mjs +0 -2
- package/dist/to-deep-key-D8uDBd6T.mjs.map +0 -1
- package/dist/to-deep-key-DO-Z0Zjs.d.mts +0 -42
- package/dist/to-deep-key-DO-Z0Zjs.d.mts.map +0 -1
- package/dist/to-deep-key-DlsE4ziE.d.cts +0 -42
- package/dist/to-deep-key-DlsE4ziE.d.cts.map +0 -1
- package/dist/to-path-BajxeMmo.d.mts +0 -24
- package/dist/to-path-BajxeMmo.d.mts.map +0 -1
- package/dist/to-path-CdOFd4od.cjs +0 -1
- package/dist/to-path-D2zWXeYc.d.cts +0 -24
- package/dist/to-path-D2zWXeYc.d.cts.map +0 -1
- package/dist/to-path-Dm1fe-Ix.mjs +0 -2
- package/dist/to-path-Dm1fe-Ix.mjs.map +0 -1
- package/dist/unflatten-object-C7TE8J80.mjs +0 -2
- package/dist/unflatten-object-C7TE8J80.mjs.map +0 -1
- package/dist/unflatten-object-CPJIUozj.d.mts +0 -35
- package/dist/unflatten-object-CPJIUozj.d.mts.map +0 -1
- package/dist/unflatten-object-CvZj41LG.cjs +0 -1
- package/dist/unflatten-object-Cvbj7Q__.d.cts +0 -35
- package/dist/unflatten-object-Cvbj7Q__.d.cts.map +0 -1
- package/dist/union-BMOMEzO-.d.cts +0 -24
- package/dist/union-BMOMEzO-.d.cts.map +0 -1
- package/dist/union-C-2CRoFc.mjs +0 -2
- package/dist/union-C-2CRoFc.mjs.map +0 -1
- package/dist/union-D4bbjM2i.d.mts +0 -24
- package/dist/union-D4bbjM2i.d.mts.map +0 -1
- package/dist/union-EwdcZzNT.cjs +0 -1
- package/dist/with-timeout-BPaAIZtS.d.cts +0 -24
- package/dist/with-timeout-BPaAIZtS.d.cts.map +0 -1
- package/dist/with-timeout-BoZYdcOg.d.mts +0 -24
- package/dist/with-timeout-BoZYdcOg.d.mts.map +0 -1
- package/dist/with-timeout-CAuUr1ck.mjs +0 -2
- package/dist/with-timeout-CAuUr1ck.mjs.map +0 -1
- package/dist/with-timeout-CPUBGT4X.cjs +0 -1
package/dist/to-deep-key.d.cts
CHANGED
|
@@ -1,2 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/to-deep-key.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Converts an array of path segments into a deep key string.
|
|
4
|
+
*
|
|
5
|
+
* This function takes an array of strings and numbers representing path segments and combines them into a deep key string.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* toDeepKey(['a', 'b', 'c']) // Returns 'a.b.c'
|
|
9
|
+
* toDeepKey(['a', 0, 'c']) // Returns 'a[0].c'
|
|
10
|
+
* toDeepKey(['', 'a', 'b', 'c']) // Returns '.a.b.c'
|
|
11
|
+
* toDeepKey(['a', 'b.c', 'd']) // Returns 'a.b.c.d'
|
|
12
|
+
* toDeepKey([]) // Returns ''
|
|
13
|
+
* toDeepKey(['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']) // Returns '.a.b.c.d.e.f.g.h'
|
|
14
|
+
*
|
|
15
|
+
* @param path - An array of strings and numbers representing path segments.
|
|
16
|
+
* @returns A deep key string.
|
|
17
|
+
*/
|
|
18
|
+
declare function toDeepKey(path: string[]): string;
|
|
19
|
+
/**
|
|
20
|
+
* Adds a path segment to a deep key string.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* This function takes a deep key string and a path segment and combines them into a new deep key string.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* addPathToDeepKey('a.b', 'c') // Returns 'a.b.c'
|
|
28
|
+
* addPathToDeepKey('a[0]', 'c') // Returns 'a[0].c'
|
|
29
|
+
* addPathToDeepKey('.a.b', 'c') // Returns '.a.b.c'
|
|
30
|
+
* addPathToDeepKey('a.b', 'b.c') // Returns 'a.b.b.c'
|
|
31
|
+
* addPathToDeepKey('', 'a') // Returns 'a'
|
|
32
|
+
* addPathToDeepKey('.a.b', 'c.d') // Returns '.a.b.c.d'
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @param deepKey - The deep key string to add the path segment to.
|
|
36
|
+
* @param path - The path segment to add to the deep key string.
|
|
37
|
+
* @returns A new deep key string.
|
|
38
|
+
*/
|
|
39
|
+
declare function addPathToDeepKey(deepKey: string, path: string | number): string;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { addPathToDeepKey, toDeepKey };
|
|
42
|
+
//# sourceMappingURL=to-deep-key.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-deep-key.d.cts","names":[],"sources":["../src/to-deep-key.ts"],"sourcesContent":[],"mappings":";;AAoCA;AA0BA;;;;;;;;;;;;;;iBA1BgB,SAAA;;;;;;;;;;;;;;;;;;;;;iBA0BA,gBAAA"}
|
package/dist/to-deep-key.d.mts
CHANGED
|
@@ -1,2 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/to-deep-key.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Converts an array of path segments into a deep key string.
|
|
4
|
+
*
|
|
5
|
+
* This function takes an array of strings and numbers representing path segments and combines them into a deep key string.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* toDeepKey(['a', 'b', 'c']) // Returns 'a.b.c'
|
|
9
|
+
* toDeepKey(['a', 0, 'c']) // Returns 'a[0].c'
|
|
10
|
+
* toDeepKey(['', 'a', 'b', 'c']) // Returns '.a.b.c'
|
|
11
|
+
* toDeepKey(['a', 'b.c', 'd']) // Returns 'a.b.c.d'
|
|
12
|
+
* toDeepKey([]) // Returns ''
|
|
13
|
+
* toDeepKey(['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']) // Returns '.a.b.c.d.e.f.g.h'
|
|
14
|
+
*
|
|
15
|
+
* @param path - An array of strings and numbers representing path segments.
|
|
16
|
+
* @returns A deep key string.
|
|
17
|
+
*/
|
|
18
|
+
declare function toDeepKey(path: string[]): string;
|
|
19
|
+
/**
|
|
20
|
+
* Adds a path segment to a deep key string.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* This function takes a deep key string and a path segment and combines them into a new deep key string.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* addPathToDeepKey('a.b', 'c') // Returns 'a.b.c'
|
|
28
|
+
* addPathToDeepKey('a[0]', 'c') // Returns 'a[0].c'
|
|
29
|
+
* addPathToDeepKey('.a.b', 'c') // Returns '.a.b.c'
|
|
30
|
+
* addPathToDeepKey('a.b', 'b.c') // Returns 'a.b.b.c'
|
|
31
|
+
* addPathToDeepKey('', 'a') // Returns 'a'
|
|
32
|
+
* addPathToDeepKey('.a.b', 'c.d') // Returns '.a.b.c.d'
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @param deepKey - The deep key string to add the path segment to.
|
|
36
|
+
* @param path - The path segment to add to the deep key string.
|
|
37
|
+
* @returns A new deep key string.
|
|
38
|
+
*/
|
|
39
|
+
declare function addPathToDeepKey(deepKey: string, path: string | number): string;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { addPathToDeepKey, toDeepKey };
|
|
42
|
+
//# sourceMappingURL=to-deep-key.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-deep-key.d.mts","names":[],"sources":["../src/to-deep-key.ts"],"sourcesContent":[],"mappings":";;AAoCA;AA0BA;;;;;;;;;;;;;;iBA1BgB,SAAA;;;;;;;;;;;;;;;;;;;;;iBA0BA,gBAAA"}
|
package/dist/to-deep-key.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{isNumber as e}from"./type-checks/src/is-number.mjs";import{isSetString as t}from"./type-checks/src/is-set-string.mjs";function n(e){return e.reduce((e,t)=>r(e,t))}function r(n,r){return e(r)||Number.isInteger(r)?`${n}[${r}]`:t(r)?`${n}.${r}`:n}export{r as addPathToDeepKey,n as toDeepKey};
|
|
2
|
+
//# sourceMappingURL=to-deep-key.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-deep-key.mjs","names":[],"sources":["../src/to-deep-key.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://stormsoftware.com/projects/stryke/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/stryke/license\n\n ------------------------------------------------------------------- */\n\nimport { isNumber } from \"@stryke/type-checks/is-number\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\n\n/**\n * Converts an array of path segments into a deep key string.\n *\n * This function takes an array of strings and numbers representing path segments and combines them into a deep key string.\n *\n * @example\n * toDeepKey(['a', 'b', 'c']) // Returns 'a.b.c'\n * toDeepKey(['a', 0, 'c']) // Returns 'a[0].c'\n * toDeepKey(['', 'a', 'b', 'c']) // Returns '.a.b.c'\n * toDeepKey(['a', 'b.c', 'd']) // Returns 'a.b.c.d'\n * toDeepKey([]) // Returns ''\n * toDeepKey(['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']) // Returns '.a.b.c.d.e.f.g.h'\n *\n * @param path - An array of strings and numbers representing path segments.\n * @returns A deep key string.\n */\nexport function toDeepKey(path: string[]): string {\n return path.reduce((ret, segment) => {\n return addPathToDeepKey(ret, segment);\n });\n}\n\n/**\n * Adds a path segment to a deep key string.\n *\n * @remarks\n * This function takes a deep key string and a path segment and combines them into a new deep key string.\n *\n * @example\n * ```ts\n * addPathToDeepKey('a.b', 'c') // Returns 'a.b.c'\n * addPathToDeepKey('a[0]', 'c') // Returns 'a[0].c'\n * addPathToDeepKey('.a.b', 'c') // Returns '.a.b.c'\n * addPathToDeepKey('a.b', 'b.c') // Returns 'a.b.b.c'\n * addPathToDeepKey('', 'a') // Returns 'a'\n * addPathToDeepKey('.a.b', 'c.d') // Returns '.a.b.c.d'\n * ```\n *\n * @param deepKey - The deep key string to add the path segment to.\n * @param path - The path segment to add to the deep key string.\n * @returns A new deep key string.\n */\nexport function addPathToDeepKey(\n deepKey: string,\n path: string | number\n): string {\n if (isNumber(path) || Number.isInteger(path)) {\n return `${deepKey}[${path}]`;\n }\n if (isSetString(path)) {\n return `${deepKey}.${path}`;\n }\n\n return deepKey;\n}\n"],"mappings":"6HAoCA,SAAgB,EAAU,EAAwB,CAChD,OAAO,EAAK,QAAQ,EAAK,IAChB,EAAiB,EAAK,EAAQ,CACrC,CAuBJ,SAAgB,EACd,EACA,EACQ,CAQR,OAPI,EAAS,EAAK,EAAI,OAAO,UAAU,EAAK,CACnC,GAAG,EAAQ,GAAG,EAAK,GAExB,EAAY,EAAK,CACZ,GAAG,EAAQ,GAAG,IAGhB"}
|
package/dist/to-path.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=
|
|
1
|
+
const e=/^[\w.]+$/g,t=/\\(?<temp1>\\)?/g,n=RegExp(`${String.raw`[^.[\]]+`}|${String.raw`\[(?:`}([^"'][^[]*)|${String.raw`(["'])((?:(?!\2)[^\\]|\\.)*?)\2`}${String.raw`)\]`}|${String.raw`(?=(?:\.|\[\])(?:\.|\[\]|$))`}`,`g`);function r(r){if(e.test(r))return r.split(`.`);let i=[];r[0]===`.`&&i.push(``);let a=r.matchAll(n);for(let e of a){let n=e[0],r=e[1],a=e[2],o=e[3];a&&o?n=o.replace(t,`$1`):r&&(n=r),i.push(n)}return i}exports.toPath=r;
|
package/dist/to-path.d.cts
CHANGED
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/to-path.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Converts a deep key string into an array of path segments.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This function takes a string representing a deep key (e.g., 'a.b.c' or 'a[b][c]') and breaks it down into an array of strings, each representing a segment of the path.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* toPath('a.b.c') // Returns ['a', 'b', 'c']
|
|
11
|
+
* toPath('a[b][c]') // Returns ['a', 'b', 'c']
|
|
12
|
+
* toPath('.a.b.c') // Returns ['', 'a', 'b', 'c']
|
|
13
|
+
* toPath('a["b.c"].d') // Returns ['a', 'b.c', 'd']
|
|
14
|
+
* toPath('') // Returns []
|
|
15
|
+
* toPath('.a[b].c.d[e]["f.g"].h') // Returns ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @param deepKey - The deep key string to convert.
|
|
19
|
+
* @returns An array of strings, each representing a segment of the path.
|
|
20
|
+
*/
|
|
21
|
+
declare function toPath(deepKey: string): string[];
|
|
22
|
+
//#endregion
|
|
23
|
+
export { toPath };
|
|
24
|
+
//# sourceMappingURL=to-path.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-path.d.cts","names":[],"sources":["../src/to-path.ts"],"sourcesContent":[],"mappings":";;AAyDA;;;;;;;;;;;;;;;;;;iBAAgB,MAAA"}
|
package/dist/to-path.d.mts
CHANGED
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/to-path.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Converts a deep key string into an array of path segments.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This function takes a string representing a deep key (e.g., 'a.b.c' or 'a[b][c]') and breaks it down into an array of strings, each representing a segment of the path.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* toPath('a.b.c') // Returns ['a', 'b', 'c']
|
|
11
|
+
* toPath('a[b][c]') // Returns ['a', 'b', 'c']
|
|
12
|
+
* toPath('.a.b.c') // Returns ['', 'a', 'b', 'c']
|
|
13
|
+
* toPath('a["b.c"].d') // Returns ['a', 'b.c', 'd']
|
|
14
|
+
* toPath('') // Returns []
|
|
15
|
+
* toPath('.a[b].c.d[e]["f.g"].h') // Returns ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @param deepKey - The deep key string to convert.
|
|
19
|
+
* @returns An array of strings, each representing a segment of the path.
|
|
20
|
+
*/
|
|
21
|
+
declare function toPath(deepKey: string): string[];
|
|
22
|
+
//#endregion
|
|
23
|
+
export { toPath };
|
|
24
|
+
//# sourceMappingURL=to-path.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-path.d.mts","names":[],"sources":["../src/to-path.ts"],"sourcesContent":[],"mappings":";;AAyDA;;;;;;;;;;;;;;;;;;iBAAgB,MAAA"}
|
package/dist/to-path.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
const e=/^[\w.]+$/g,t=/\\(?<temp1>\\)?/g,n=RegExp(`${String.raw`[^.[\]]+`}|${String.raw`\[(?:`}([^"'][^[]*)|${String.raw`(["'])((?:(?!\2)[^\\]|\\.)*?)\2`}${String.raw`)\]`}|${String.raw`(?=(?:\.|\[\])(?:\.|\[\]|$))`}`,`g`);function r(r){if(e.test(r))return r.split(`.`);let i=[];r[0]===`.`&&i.push(``);let a=r.matchAll(n);for(let e of a){let n=e[0],r=e[1],a=e[2],o=e[3];a&&o?n=o.replace(t,`$1`):r&&(n=r),i.push(n)}return i}export{r as toPath};
|
|
2
|
+
//# sourceMappingURL=to-path.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-path.mjs","names":["result: string[]"],"sources":["../src/to-path.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\nconst DOTS_KEY = /^[\\w.]+$/g;\n\nconst ESCAPE_REGEXP = /\\\\(?<temp1>\\\\)?/g;\nconst PROPERTY_REGEXP = new RegExp(\n // Match anything that isn't a dot or bracket.\n `${String.raw`[^.[\\]]+`}|${\n // Or match property names within brackets.\n String.raw`\\[(?:`\n // Match a non-string expression.\n }([^\"'][^[]*)` +\n `|${\n // Or match strings (supports escaping characters).\n String.raw`([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2`\n }${String.raw`)\\]`}|${\n // Or match \"\" as the space between consecutive dots or empty brackets.\n String.raw`(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`\n }`,\n \"g\"\n);\n\n/**\n * Converts a deep key string into an array of path segments.\n *\n * @remarks\n * This function takes a string representing a deep key (e.g., 'a.b.c' or 'a[b][c]') and breaks it down into an array of strings, each representing a segment of the path.\n *\n * @example\n * ```ts\n * toPath('a.b.c') // Returns ['a', 'b', 'c']\n * toPath('a[b][c]') // Returns ['a', 'b', 'c']\n * toPath('.a.b.c') // Returns ['', 'a', 'b', 'c']\n * toPath('a[\"b.c\"].d') // Returns ['a', 'b.c', 'd']\n * toPath('') // Returns []\n * toPath('.a[b].c.d[e][\"f.g\"].h') // Returns ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']\n * ```\n *\n * @param deepKey - The deep key string to convert.\n * @returns An array of strings, each representing a segment of the path.\n */\nexport function toPath(deepKey: string): string[] {\n if (DOTS_KEY.test(deepKey)) {\n return deepKey.split(\".\");\n }\n\n const result: string[] = [];\n\n if (deepKey[0] === \".\") {\n result.push(\"\");\n }\n\n const matches = deepKey.matchAll(PROPERTY_REGEXP);\n\n for (const match of matches) {\n let key = match[0];\n const expr = match[1];\n const quote = match[2];\n const substr = match[3];\n\n if (quote && substr) {\n key = substr.replace(ESCAPE_REGEXP, \"$1\");\n } else if (expr) {\n key = expr;\n }\n\n result.push(key);\n }\n\n return result;\n}\n"],"mappings":"AAkBA,MAAM,EAAW,YAEX,EAAgB,mBAChB,EAAsB,OAE1B,GAAG,OAAO,GAAG,WAAW,GAEtB,OAAO,GAAG,QAEX,eAGG,OAAO,GAAG,oCACT,OAAO,GAAG,MAAM,GAEjB,OAAO,GAAG,iCAEd,IACD,CAqBD,SAAgB,EAAO,EAA2B,CAChD,GAAI,EAAS,KAAK,EAAQ,CACxB,OAAO,EAAQ,MAAM,IAAI,CAG3B,IAAMA,EAAmB,EAAE,CAEvB,EAAQ,KAAO,KACjB,EAAO,KAAK,GAAG,CAGjB,IAAM,EAAU,EAAQ,SAAS,EAAgB,CAEjD,IAAK,IAAM,KAAS,EAAS,CAC3B,IAAI,EAAM,EAAM,GACV,EAAO,EAAM,GACb,EAAQ,EAAM,GACd,EAAS,EAAM,GAEjB,GAAS,EACX,EAAM,EAAO,QAAQ,EAAe,KAAK,CAChC,IACT,EAAM,GAGR,EAAO,KAAK,EAAI,CAGlB,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e);exports.getObjectTag=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-object-tag.mjs","names":[],"sources":["../../../../type-checks/src/get-object-tag.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 * Gets the `toStringTag` of `obj`.\n *\n * @param value - The obj to query.\n * @returns Returns the `toStringTag`.\n */\nexport const getObjectTag = (value: unknown): string => {\n if (value == null) {\n return value === undefined ? \"[object Undefined]\" : \"[object Null]\";\n }\n return Object.prototype.toString.call(value);\n};\n"],"mappings":"AAwBA,MAAa,EAAgB,GACvB,GAAS,KACJ,IAAU,IAAA,GAAY,qBAAuB,gBAE/C,OAAO,UAAU,SAAS,KAAK,EAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}exports.isDeepKey=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-deep-key.mjs","names":[],"sources":["../../../../type-checks/src/is-deep-key.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 type { DeepKey } from \"@stryke/types/object\";\n\n/**\n * Checks if a given key is a deep key.\n *\n * A deep key is a string that contains a dot (.) or square brackets with a property accessor.\n *\n * @example\n * isDeepKey('a.b') // true\n * isDeepKey('a[b]') // true\n * isDeepKey('a') // false\n * isDeepKey(123) // false\n * isDeepKey('a.b.c') // true\n * isDeepKey('a[b][c]') // true\n *\n * @param key - The key to check.\n * @returns Returns true if the key is a deep key, otherwise false.\n */\nexport function isDeepKey(key: PropertyKey): key is DeepKey<any> {\n switch (typeof key) {\n case \"number\":\n case \"symbol\": {\n return false;\n }\n case \"string\": {\n return key.includes(\".\") || key.includes(\"[\") || key.includes(\"]\");\n }\n }\n}\n\n/**\n * Checks if a given key is a deep key or normal (shallow key).\n *\n * A deep key is a string that contains a dot (.) or square brackets with a property accessor.\n *\n * @example\n * isDeepKey('a.b') // true\n * isDeepKey('a[b]') // true\n * isDeepKey('a') // true\n * isDeepKey(123) // false\n * isDeepKey('a.b.c') // true\n * isDeepKey('a[b][c]') // true\n *\n * @param key - The key to check.\n * @returns Returns true if the key is a deep key, otherwise false.\n */\nexport function isKeyOrDeepKey(key: PropertyKey): key is DeepKey<any> {\n switch (typeof key) {\n case \"number\": {\n return true;\n }\n case \"symbol\": {\n return false;\n }\n case \"string\": {\n return true;\n }\n }\n}\n"],"mappings":"AAoCA,SAAgB,EAAU,EAAuC,CAC/D,OAAQ,OAAO,EAAf,CACE,IAAK,SACL,IAAK,SACH,MAAO,GAET,IAAK,SACH,OAAO,EAAI,SAAS,IAAI,EAAI,EAAI,SAAS,IAAI,EAAI,EAAI,SAAS,IAAI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./is-null.cjs`),t=require(`./is-undefined.cjs`),n=n=>{try{return t.isUndefined(n)||e.isNull(n)}catch{return!1}};exports.isEmpty=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-empty.mjs","names":[],"sources":["../../../../type-checks/src/is-empty.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 { isDate } from \"./is-date\";\nimport { isFunction } from \"./is-function\";\nimport { isNull } from \"./is-null\";\nimport { isNumber } from \"./is-number\";\nimport { isSymbol } from \"./is-symbol\";\nimport { isUndefined } from \"./is-undefined\";\n\n/**\n * Check if the provided value's type is `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `null` or `undefined`\n */\nexport const isEmpty = (value: unknown) => {\n try {\n return isUndefined(value) || isNull(value);\n } catch {\n return false;\n }\n};\n\nexport const isEmptyAnything = (value: any) => {\n if (value === true || value === false) return true;\n if (value === null || value === undefined) return true;\n if (isNumber(value)) return value === 0;\n if (isDate(value)) return Number.isNaN(value.getTime());\n if (isFunction(value)) return false;\n if (isSymbol(value)) return false;\n const { length } = value;\n if (isNumber(length)) return length === 0;\n const { size } = value;\n if (isNumber(size)) return size === 0;\n const keys = Object.keys(value).length;\n\n return keys === 0;\n};\n"],"mappings":"wFA+BA,MAAa,EAAW,GAAmB,CACzC,GAAI,CACF,OAAO,EAAY,EAAM,EAAI,EAAO,EAAM,MACpC,CACN,MAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./get-object-tag.cjs`);function t(t){return e.getObjectTag(t)===`[object Function]`}function n(t){return e.getObjectTag(t)===`[object AsyncFunction]`}const r=e=>{try{return e instanceof Function||typeof e==`function`||!!(e?.constructor&&e?.call&&e?.apply)||t(e)||n(e)}catch{return!1}};exports.isFunction=r;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{getObjectTag as e}from"./get-object-tag.mjs";function t(t){return e(t)===`[object Function]`}function n(t){return e(t)===`[object AsyncFunction]`}const r=e=>{try{return e instanceof Function||typeof e==`function`||!!(e?.constructor&&e?.call&&e?.apply)||t(e)||n(e)}catch{return!1}};export{r as isFunction};
|
|
2
|
+
//# sourceMappingURL=is-function.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-function.mjs","names":[],"sources":["../../../../type-checks/src/is-function.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 type { AnyFunction } from \"@stryke/types/base\";\nimport { getObjectTag } from \"./get-object-tag\";\n\nexport function isSyncFunction(value?: any): value is AnyFunction {\n return getObjectTag(value) === \"[object Function]\";\n}\n\nexport function isAsyncFunction(value?: any): value is AnyFunction {\n return getObjectTag(value) === \"[object AsyncFunction]\";\n}\n\n/**\n * Check if the provided value's type is `Function`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Function`\n */\nexport const isFunction = (value: unknown): value is AnyFunction => {\n try {\n return (\n value instanceof Function ||\n typeof value === \"function\" ||\n Boolean(\n value?.constructor && (value as any)?.call && (value as any)?.apply\n ) ||\n isSyncFunction(value) ||\n isAsyncFunction(value)\n );\n } catch {\n return false;\n }\n};\n"],"mappings":"oDAqBA,SAAgB,EAAe,EAAmC,CAChE,OAAO,EAAa,EAAM,GAAK,oBAGjC,SAAgB,EAAgB,EAAmC,CACjE,OAAO,EAAa,EAAM,GAAK,yBASjC,MAAa,EAAc,GAAyC,CAClE,GAAI,CACF,OACE,aAAiB,UACjB,OAAO,GAAU,YACjB,GACE,GAAO,aAAgB,GAAe,MAAS,GAAe,QAEhE,EAAe,EAAM,EACrB,EAAgB,EAAM,MAElB,CACN,MAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./is-non-null-object.cjs`),t=require(`./is-react-element.cjs`),n=e=>{let n=Object.prototype.toString.call(e);return n===`[object RegExp]`||n===`[object Date]`||t.isReactElement(e)},r=t=>e.isNonNullObject(t)&&!n(t);exports.isMergeableObject=r;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isNonNullObject as e}from"./is-non-null-object.mjs";import{isReactElement as t}from"./is-react-element.mjs";const n=e=>{let n=Object.prototype.toString.call(e);return n===`[object RegExp]`||n===`[object Date]`||t(e)},r=t=>e(t)&&!n(t);export{r as isMergeableObject};
|
|
2
|
+
//# sourceMappingURL=is-mergeable-object.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-mergeable-object.mjs","names":[],"sources":["../../../../type-checks/src/is-mergeable-object.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 { isNonNullObject } from \"./is-non-null-object\";\nimport { isReactElement } from \"./is-react-element\";\n\nconst isSpecialType = (value: any) => {\n const stringValue = Object.prototype.toString.call(value);\n\n return (\n stringValue === \"[object RegExp]\" ||\n stringValue === \"[object Date]\" ||\n isReactElement(value)\n );\n};\n\nexport const isMergeableObject = (value: any): boolean => {\n return isNonNullObject(value) && !isSpecialType(value);\n};\n"],"mappings":"mHAqBA,MAAM,EAAiB,GAAe,CACpC,IAAM,EAAc,OAAO,UAAU,SAAS,KAAK,EAAM,CAEzD,OACE,IAAgB,mBAChB,IAAgB,iBAChB,EAAe,EAAM,EAIZ,EAAqB,GACzB,EAAgB,EAAM,EAAI,CAAC,EAAc,EAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./is-object.cjs`),t=require(`./is-set.cjs`),n=n=>t.isSet(n)&&e.isObject(n);exports.isNonNullObject=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-non-null-object.mjs","names":[],"sources":["../../../../type-checks/src/is-non-null-object.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 { isObject } from \"./is-object\";\nimport { isSet } from \"./is-set\";\n\n/**\n * Check if the provided value's type is `Object` and is not `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Object` and is not `null` or `undefined`\n */\nexport const isNonNullObject = (value: any): value is NonNullable<object> => {\n return isSet(value) && isObject(value);\n};\n"],"mappings":"gFA2BA,MAAa,EAAmB,GACvB,EAAM,EAAM,EAAI,EAAS,EAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>{try{return e===null}catch{return!1}};exports.isNull=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-null.mjs","names":[],"sources":["../../../../type-checks/src/is-null.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\nexport const isNull = (value: unknown): value is null => {\n try {\n return value === null;\n } catch {\n return false;\n }\n};\n"],"mappings":"AAkBA,MAAa,EAAU,GAAkC,CACvD,GAAI,CACF,OAAO,IAAU,UACX,CACN,MAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>{try{return e instanceof Number||typeof e==`number`||Number(e)===e}catch{return!1}};exports.isNumber=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-number.mjs","names":[],"sources":["../../../../type-checks/src/is-number.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 type { AnyNumber } from \"@stryke/types/base\";\nimport { getObjectTag } from \"./get-object-tag\";\n\n/**\n * Check if the provided value's type is `number`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `number`\n */\nexport const isNumber = (value: unknown): value is number => {\n try {\n return (\n value instanceof Number ||\n typeof value === \"number\" ||\n Number(value) === value\n );\n } catch {\n return false;\n }\n};\n\n/**\n * Check if the provided value's type is `AnyNumber`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `AnyNumber`\n */\nexport function isAnyNumber(value?: any): value is AnyNumber {\n return isNumber(value) || getObjectTag(value) === \"[object Number]\";\n}\n"],"mappings":"AA2BA,MAAa,EAAY,GAAoC,CAC3D,GAAI,CACF,OACE,aAAiB,QACjB,OAAO,GAAU,UACjB,OAAO,EAAM,GAAK,OAEd,CACN,MAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=/^(?:0|[1-9]\d*)$/;function t(t){switch(typeof t){case`number`:return Number.isInteger(t)&&t>=0&&t<2**53-1;case`symbol`:return!1;case`string`:return e.test(t)}}exports.isObjectIndex=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-object-index.mjs","names":[],"sources":["../../../../type-checks/src/is-object-index.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\nconst IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if the given value is an object index.\n *\n * @param value - The value to check.\n * @returns Returns `true` if the value is an object index, otherwise `false`.\n */\nexport function isObjectIndex(\n value: PropertyKey\n): value is string | number | symbol {\n switch (typeof value) {\n case \"number\": {\n return (\n Number.isInteger(value) && value >= 0 && value < Number.MAX_SAFE_INTEGER\n );\n }\n case \"symbol\": {\n return false;\n }\n case \"string\": {\n return IS_UNSIGNED_INTEGER.test(value);\n }\n }\n}\n"],"mappings":"AAkBA,MAAM,EAAsB,mBAQ5B,SAAgB,EACd,EACmC,CACnC,OAAQ,OAAO,EAAf,CACE,IAAK,SACH,OACE,OAAO,UAAU,EAAM,EAAI,GAAS,GAAK,UAG7C,IAAK,SACH,MAAO,GAET,IAAK,SACH,OAAO,EAAoB,KAAK,EAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./is-plain-object.cjs`),t=t=>{try{return typeof t==`object`||!!t&&t?.constructor===Object||e.isPlainObject(t)}catch{return!1}};exports.isObject=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-object.mjs","names":[],"sources":["../../../../type-checks/src/is-object.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/* eslint-disable ts/no-unsafe-function-type */\n/* eslint-disable ts/no-unsafe-call */\n\nimport type { NativeClass } from \"@stryke/types/base\";\nimport { isPlainObject } from \"./is-plain-object\";\n\n// Prepare\nconst isClassRegex = /^class\\s|^function\\s+[A-Z]/;\nconst isConventionalClassRegex = /^function\\s+[A-Z]/;\nconst isNativeClassRegex = /^class\\s/;\n\n/** Is ES6+ class */\nexport function isNativeClass(value?: any): value is NativeClass {\n // NOTE TO DEVELOPER: If any of this changes, isClass must also be updated\n return (\n typeof value === \"function\" && isNativeClassRegex.test(value.toString())\n );\n}\n\n/**\n * Check if the provided value's type is a conventional class\n *\n * @remarks\n * Is Conventional Class\n * Looks for function with capital first letter MyClass\n * First letter is the 9th character\n * If changed, isClass must also be updated\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is a conventional class\n */\nexport function isConventionalClass(value?: any): value is Function {\n return (\n typeof value === \"function\" &&\n isConventionalClassRegex.test(value.toString())\n );\n}\n\n/**\n * Check if the provided value's type is `Object`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Object`\n */\nexport function isClass(value?: any): value is Function | NativeClass; // only guarantee of truth type, not of validity\nexport function isClass(value?: any): boolean {\n return typeof value === \"function\" && isClassRegex.test(value.toString());\n}\n\n/**\n * Check if the provided value's type is `Object`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Object`\n */\nexport const isObject = (value: unknown): value is object => {\n try {\n return (\n typeof value === \"object\" ||\n (Boolean(value) && value?.constructor === Object) ||\n isPlainObject(value)\n );\n } catch {\n return false;\n }\n};\n"],"mappings":"sDAyEA,MAAa,EAAY,GAAoC,CAC3D,GAAI,CACF,OACE,OAAO,GAAU,UAChB,EAAQ,GAAU,GAAO,cAAgB,QAC1C,EAAc,EAAM,MAEhB,CACN,MAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./get-object-tag.cjs`),t=e=>typeof e==`object`&&!!e,n=n=>{if(!t(n)||e.getObjectTag(n)!==`[object Object]`)return!1;if(Object.getPrototypeOf(n)===null)return!0;let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r};exports.isPlainObject=n;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{getObjectTag as e}from"./get-object-tag.mjs";const t=e=>typeof e==`object`&&!!e,n=n=>{if(!t(n)||e(n)!==`[object Object]`)return!1;if(Object.getPrototypeOf(n)===null)return!0;let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r};export{n as isPlainObject};
|
|
2
|
+
//# sourceMappingURL=is-plain-object.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-plain-object.mjs","names":[],"sources":["../../../../type-checks/src/is-plain-object.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 type { PlainObject } from \"@stryke/types/base\";\nimport { getObjectTag } from \"./get-object-tag\";\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @example\n * ```typescript\n * isObjectLike({})\n * // => true\n *\n * isObjectLike([1, 2, 3])\n * // => true\n *\n * isObjectLike(Function)\n * // => false\n *\n * isObjectLike(null)\n * // => false\n * ```\n *\n * @param value - The value to check.\n * @returns Returns `true` if `value` is object-like, else `false`.\n */\nexport const isObjectLike = (obj: unknown) => {\n return typeof obj === \"object\" && obj !== null;\n};\n\n/**\n * Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @example\n * ```typescript\n * function Foo() {\n * this.a = 1\n * }\n *\n * isPlainObject(new Foo)\n * // => false\n *\n * isPlainObject([1, 2, 3])\n * // => false\n *\n * isPlainObject({ 'x': 0, 'y': 0 })\n * // => true\n *\n * isPlainObject(Object.create(null))\n * // => true\n * ```\n *\n * @param obj - The value to check.\n * @returns Returns `true` if `obj` is a plain object, else `false`.\n */\nexport const isPlainObject = (obj: unknown): obj is PlainObject => {\n if (!isObjectLike(obj) || getObjectTag(obj) !== \"[object Object]\") {\n return false;\n }\n if (Object.getPrototypeOf(obj) === null) {\n return true;\n }\n let proto = obj;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto;\n};\n"],"mappings":"oDA2CA,MAAa,EAAgB,GACpB,OAAO,GAAQ,YAAY,EA4BvB,EAAiB,GAAqC,CACjE,GAAI,CAAC,EAAa,EAAI,EAAI,EAAa,EAAI,GAAK,kBAC9C,MAAO,GAET,GAAI,OAAO,eAAe,EAAI,GAAK,KACjC,MAAO,GAET,IAAI,EAAQ,EACZ,KAAO,OAAO,eAAe,EAAM,GAAK,MACtC,EAAQ,OAAO,eAAe,EAAM,CAEtC,OAAO,OAAO,eAAe,EAAI,GAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>{try{return e==null||typeof e!=`object`&&typeof e!=`function`}catch{return!1}};exports.isPrimitive=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-primitive.mjs","names":[],"sources":["../../../../type-checks/src/is-primitive.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\nexport const isPrimitive = (value: unknown): boolean => {\n try {\n return (\n value === undefined ||\n value === null ||\n (typeof value !== \"object\" && typeof value !== \"function\")\n );\n } catch {\n return false;\n }\n};\n"],"mappings":"AAkBA,MAAa,EAAe,GAA4B,CACtD,GAAI,CACF,OACE,GACU,MACT,OAAO,GAAU,UAAY,OAAO,GAAU,gBAE3C,CACN,MAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>e.$$typeof===(typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103);exports.isReactElement=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-react-element.mjs","names":[],"sources":["../../../../type-checks/src/is-react-element.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\nexport const isReactElement = (value: any) => {\n return (\n value.$$typeof ===\n (typeof Symbol === \"function\" && Symbol.for\n ? Symbol.for(\"react.element\")\n : 0xea_c7)\n );\n};\n"],"mappings":"AAkBA,MAAa,EAAkB,GAE3B,EAAM,YACL,OAAO,QAAW,YAAc,OAAO,IACpC,OAAO,IAAI,gBAAgB,CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./is-set.cjs`),t=require(`./is-string.cjs`),n=n=>{try{return e.isSet(n)&&t.isString(n)&&n.length>0}catch{return!1}};exports.isSetString=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-set-string.mjs","names":[],"sources":["../../../../type-checks/src/is-set-string.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 { isSet } from \"./is-set\";\nimport { isString } from \"./is-string\";\n\n/**\n * Determine if the type is string and is not empty (length greater than zero)\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `string` and length greater than zero\n */\nexport const isSetString = (value: unknown): value is NonNullable<string> => {\n try {\n return isSet(value) && isString(value) && value.length > 0;\n } catch {\n return false;\n }\n};\n"],"mappings":"gFA2BA,MAAa,EAAe,GAAiD,CAC3E,GAAI,CACF,OAAO,EAAM,EAAM,EAAI,EAAS,EAAM,EAAI,EAAM,OAAS,OACnD,CACN,MAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./is-empty.cjs`),t=t=>{try{return!e.isEmpty(t)}catch{return!1}};exports.isSet=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-set.mjs","names":[],"sources":["../../../../type-checks/src/is-set.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 { isEmpty } from \"./is-empty\";\n\n/**\n * The inverse of the `isEmpty` function\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`\n */\nexport const isSet = (value: unknown): value is NonNullable<unknown> => {\n try {\n return !isEmpty(value);\n } catch {\n return false;\n }\n};\n"],"mappings":"yCA0BA,MAAa,EAAS,GAAkD,CACtE,GAAI,CACF,MAAO,CAAC,EAAQ,EAAM,MAChB,CACN,MAAO"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
const e=e=>{try{return typeof e==`string`}catch{return!1}};
|
|
2
|
-
//# sourceMappingURL=is-string-CvmuuuDj.mjs.map
|
|
1
|
+
const e=e=>{try{return typeof e==`string`}catch{return!1}};exports.isString=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-string.mjs","names":[],"sources":["../../../../type-checks/src/is-string.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\nexport const isString = (value: unknown): value is string => {\n try {\n return typeof value === \"string\";\n } catch {\n return false;\n }\n};\n"],"mappings":"AAkBA,MAAa,EAAY,GAAoC,CAC3D,GAAI,CACF,OAAO,OAAO,GAAU,cAClB,CACN,MAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof BigUint64Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof BigInt64Array||e instanceof Float32Array||e instanceof Float64Array}exports.isTypedArray=e;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e){return e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof BigUint64Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof BigInt64Array||e instanceof Float32Array||e instanceof Float64Array}export{e as isTypedArray};
|
|
2
|
+
//# sourceMappingURL=is-typed-array.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-typed-array.mjs","names":[],"sources":["../../../../type-checks/src/is-typed-array.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\nexport function isTypedArray(\n obj: any\n): obj is\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | BigUint64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | BigInt64Array\n | Float32Array\n | Float64Array {\n return (\n obj instanceof Uint8Array ||\n obj instanceof Uint8ClampedArray ||\n obj instanceof Uint16Array ||\n obj instanceof Uint32Array ||\n obj instanceof BigUint64Array ||\n obj instanceof Int8Array ||\n obj instanceof Int16Array ||\n obj instanceof Int32Array ||\n obj instanceof BigInt64Array ||\n obj instanceof Float32Array ||\n obj instanceof Float64Array\n );\n}\n"],"mappings":"AAkBA,SAAgB,EACd,EAYe,CACf,OACE,aAAe,YACf,aAAe,mBACf,aAAe,aACf,aAAe,aACf,aAAe,gBACf,aAAe,WACf,aAAe,YACf,aAAe,YACf,aAAe,eACf,aAAe,cACf,aAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>e===void 0;exports.isUndefined=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-undefined.mjs","names":[],"sources":["../../../../type-checks/src/is-undefined.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\nexport const isUndefined = (value: unknown): value is undefined => {\n return value === undefined;\n};\n"],"mappings":"AAkBA,MAAa,EAAe,GACnB,IAAU,IAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./is-object.cjs`),t=(t,n)=>{try{return e.isObject(t)&&n in t}catch{return!1}},n=(e,n)=>t(e,n)&&!(Object.hasOwnProperty.call(e,n)&&Object.propertyIsEnumerable.call(e,n));exports.propertyUnsafe=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-exists.mjs","names":[],"sources":["../../../../type-checks/src/property-exists.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 { isObject } from \"./is-object\";\n\n/**\n * Check if the provided object has the provided property\n *\n * @param object - The object to check\n * @param propertyKey - The property to check\n * @returns An indicator specifying if the object has the provided property\n */\nexport const propertyExists = (object: any, propertyKey: PropertyKey) => {\n try {\n return isObject(object) && propertyKey in object;\n } catch {\n return false;\n }\n};\n\n/**\n * Check if the provided object has the provided property and if it's safe to merge\n *\n * @param object - The object to check\n * @param propertyKey - The property to check\n * @returns An indicator specifying if the object has the provided property and if it's safe to merge\n */\nexport const propertyUnsafe = (object: any, propertyKey: PropertyKey) => {\n return (\n propertyExists(object, propertyKey) && // Properties are safe to merge if they don't exist in the target yet,\n !(\n Object.hasOwnProperty.call(object, propertyKey) && // unsafe if they exist up the prototype chain,\n Object.propertyIsEnumerable.call(object, propertyKey)\n )\n ); // and also unsafe if they're non-enumerable.\n};\n"],"mappings":"2CA2BA,MAAa,GAAkB,EAAa,IAA6B,CACvE,GAAI,CACF,OAAO,EAAS,EAAO,EAAI,KAAe,OACpC,CACN,MAAO,KAWE,GAAkB,EAAa,IAExC,EAAe,EAAQ,EAAY,EACnC,EACE,OAAO,eAAe,KAAK,EAAQ,EAAY,EAC/C,OAAO,qBAAqB,KAAK,EAAQ,EAAY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.cts","names":[],"sources":["../../../../types/src/base.ts"],"sourcesContent":[],"mappings":";;KAuFY,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.mts","names":[],"sources":["../../../../types/src/base.ts"],"sourcesContent":[],"mappings":";;KAuFY,OAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region ../types/src/json.d.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Get keys of the given type as strings.
|
|
5
|
+
*
|
|
6
|
+
* Number keys are converted to strings.
|
|
7
|
+
*
|
|
8
|
+
* Use-cases:
|
|
9
|
+
* - Get string keys from a type which may have number keys.
|
|
10
|
+
* - Makes it possible to index using strings retrieved from template types.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```
|
|
14
|
+
* import type {StringKeyOf} from 'type-fest';
|
|
15
|
+
*
|
|
16
|
+
* type Foo = {
|
|
17
|
+
* 1: number,
|
|
18
|
+
* stringKey: string,
|
|
19
|
+
* };
|
|
20
|
+
*
|
|
21
|
+
* type StringKeysOfFoo = StringKeyOf<Foo>;
|
|
22
|
+
* //=> '1' | 'stringKey'
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
type StringKeyOf<BaseType> = `${Extract<keyof BaseType, string | number>}`;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { StringKeyOf };
|
|
28
|
+
//# sourceMappingURL=json.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.d.cts","names":[],"sources":["../../../../types/src/json.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;KA2FY,2BACP,cAAc"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region ../types/src/json.d.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Get keys of the given type as strings.
|
|
5
|
+
*
|
|
6
|
+
* Number keys are converted to strings.
|
|
7
|
+
*
|
|
8
|
+
* Use-cases:
|
|
9
|
+
* - Get string keys from a type which may have number keys.
|
|
10
|
+
* - Makes it possible to index using strings retrieved from template types.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```
|
|
14
|
+
* import type {StringKeyOf} from 'type-fest';
|
|
15
|
+
*
|
|
16
|
+
* type Foo = {
|
|
17
|
+
* 1: number,
|
|
18
|
+
* stringKey: string,
|
|
19
|
+
* };
|
|
20
|
+
*
|
|
21
|
+
* type StringKeysOfFoo = StringKeyOf<Foo>;
|
|
22
|
+
* //=> '1' | 'stringKey'
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
type StringKeyOf<BaseType> = `${Extract<keyof BaseType, string | number>}`;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { StringKeyOf };
|
|
28
|
+
//# sourceMappingURL=json.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.d.mts","names":[],"sources":["../../../../types/src/json.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;KA2FY,2BACP,cAAc"}
|