ts-data-forge 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -6
- package/dist/array/impl/array-utils-creation.d.mts +14 -0
- package/dist/array/impl/array-utils-creation.d.mts.map +1 -1
- package/dist/array/impl/array-utils-creation.mjs +12 -0
- package/dist/array/impl/array-utils-creation.mjs.map +1 -1
- package/dist/array/impl/array-utils-element-access.d.mts +10 -0
- package/dist/array/impl/array-utils-element-access.d.mts.map +1 -1
- package/dist/array/impl/array-utils-element-access.mjs +7 -0
- package/dist/array/impl/array-utils-element-access.mjs.map +1 -1
- package/dist/array/impl/array-utils-modification.d.mts +14 -0
- package/dist/array/impl/array-utils-modification.d.mts.map +1 -1
- package/dist/array/impl/array-utils-modification.mjs +1 -0
- package/dist/array/impl/array-utils-modification.mjs.map +1 -1
- package/dist/array/impl/array-utils-reducing-value.d.mts +26 -2
- package/dist/array/impl/array-utils-reducing-value.d.mts.map +1 -1
- package/dist/array/impl/array-utils-reducing-value.mjs +2 -1
- package/dist/array/impl/array-utils-reducing-value.mjs.map +1 -1
- package/dist/array/impl/array-utils-search.d.mts +30 -0
- package/dist/array/impl/array-utils-search.d.mts.map +1 -1
- package/dist/array/impl/array-utils-search.mjs +1 -0
- package/dist/array/impl/array-utils-search.mjs.map +1 -1
- package/dist/array/impl/array-utils-set-op.d.mts +13 -0
- package/dist/array/impl/array-utils-set-op.d.mts.map +1 -1
- package/dist/array/impl/array-utils-set-op.mjs +13 -0
- package/dist/array/impl/array-utils-set-op.mjs.map +1 -1
- package/dist/array/impl/array-utils-size.d.mts +3 -0
- package/dist/array/impl/array-utils-size.d.mts.map +1 -1
- package/dist/array/impl/array-utils-size.mjs +3 -0
- package/dist/array/impl/array-utils-size.mjs.map +1 -1
- package/dist/array/impl/array-utils-slice-clamped.d.mts +2 -0
- package/dist/array/impl/array-utils-slice-clamped.d.mts.map +1 -1
- package/dist/array/impl/array-utils-slice-clamped.mjs.map +1 -1
- package/dist/array/impl/array-utils-slicing.d.mts +15 -0
- package/dist/array/impl/array-utils-slicing.d.mts.map +1 -1
- package/dist/array/impl/array-utils-slicing.mjs +7 -0
- package/dist/array/impl/array-utils-slicing.mjs.map +1 -1
- package/dist/array/impl/array-utils-transformation.d.mts +27 -0
- package/dist/array/impl/array-utils-transformation.d.mts.map +1 -1
- package/dist/array/impl/array-utils-transformation.mjs +7 -0
- package/dist/array/impl/array-utils-transformation.mjs.map +1 -1
- package/dist/array/impl/array-utils-validation.d.mts +17 -0
- package/dist/array/impl/array-utils-validation.d.mts.map +1 -1
- package/dist/array/impl/array-utils-validation.mjs +11 -0
- package/dist/array/impl/array-utils-validation.mjs.map +1 -1
- package/dist/collections/imap-mapped.mjs +1 -0
- package/dist/collections/imap-mapped.mjs.map +1 -1
- package/dist/collections/imap.d.mts +20 -0
- package/dist/collections/imap.d.mts.map +1 -1
- package/dist/collections/imap.mjs +3 -0
- package/dist/collections/imap.mjs.map +1 -1
- package/dist/collections/iset-mapped.d.mts +27 -0
- package/dist/collections/iset-mapped.d.mts.map +1 -1
- package/dist/collections/iset-mapped.mjs +7 -0
- package/dist/collections/iset-mapped.mjs.map +1 -1
- package/dist/collections/iset.d.mts +29 -0
- package/dist/collections/iset.d.mts.map +1 -1
- package/dist/collections/iset.mjs +7 -0
- package/dist/collections/iset.mjs.map +1 -1
- package/dist/collections/queue.d.mts +40 -0
- package/dist/collections/queue.d.mts.map +1 -1
- package/dist/collections/queue.mjs +9 -0
- package/dist/collections/queue.mjs.map +1 -1
- package/dist/collections/stack.d.mts +35 -0
- package/dist/collections/stack.d.mts.map +1 -1
- package/dist/collections/stack.mjs +8 -0
- package/dist/collections/stack.mjs.map +1 -1
- package/dist/entry-point.mjs +1 -1
- package/dist/functional/match.d.mts.map +1 -1
- package/dist/functional/match.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-expect-to-be.d.mts +1 -0
- package/dist/functional/optional/impl/optional-expect-to-be.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-expect-to-be.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-filter.d.mts +3 -0
- package/dist/functional/optional/impl/optional-filter.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-filter.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-flat-map.d.mts +2 -0
- package/dist/functional/optional/impl/optional-flat-map.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-flat-map.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-from-nullable.d.mts +2 -0
- package/dist/functional/optional/impl/optional-from-nullable.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-from-nullable.mjs +2 -0
- package/dist/functional/optional/impl/optional-from-nullable.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-is-optional.d.mts +2 -0
- package/dist/functional/optional/impl/optional-is-optional.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-is-optional.mjs +2 -0
- package/dist/functional/optional/impl/optional-is-optional.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-is-some.d.mts +1 -0
- package/dist/functional/optional/impl/optional-is-some.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-is-some.mjs +1 -0
- package/dist/functional/optional/impl/optional-is-some.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-map.d.mts +2 -0
- package/dist/functional/optional/impl/optional-map.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-map.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-none.d.mts +2 -0
- package/dist/functional/optional/impl/optional-none.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-none.mjs +2 -0
- package/dist/functional/optional/impl/optional-none.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-or-else.d.mts +4 -0
- package/dist/functional/optional/impl/optional-or-else.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-or-else.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-some.d.mts +3 -1
- package/dist/functional/optional/impl/optional-some.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-some.mjs +2 -0
- package/dist/functional/optional/impl/optional-some.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-to-nullable.d.mts +2 -0
- package/dist/functional/optional/impl/optional-to-nullable.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-to-nullable.mjs +2 -0
- package/dist/functional/optional/impl/optional-to-nullable.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-or.d.mts +3 -0
- package/dist/functional/optional/impl/optional-unwrap-or.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-or.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-throw.d.mts +1 -0
- package/dist/functional/optional/impl/optional-unwrap-throw.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-throw.mjs +1 -0
- package/dist/functional/optional/impl/optional-unwrap-throw.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap.d.mts +2 -0
- package/dist/functional/optional/impl/optional-unwrap.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-zip.d.mts +2 -0
- package/dist/functional/optional/impl/optional-zip.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-zip.mjs +2 -0
- package/dist/functional/optional/impl/optional-zip.mjs.map +1 -1
- package/dist/functional/result/impl/result-err.d.mts +3 -1
- package/dist/functional/result/impl/result-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-err.mjs +2 -0
- package/dist/functional/result/impl/result-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-expect-to-be.d.mts +1 -0
- package/dist/functional/result/impl/result-expect-to-be.d.mts.map +1 -1
- package/dist/functional/result/impl/result-expect-to-be.mjs.map +1 -1
- package/dist/functional/result/impl/result-flat-map.d.mts +5 -0
- package/dist/functional/result/impl/result-flat-map.d.mts.map +1 -1
- package/dist/functional/result/impl/result-flat-map.mjs.map +1 -1
- package/dist/functional/result/impl/result-fold.d.mts +4 -0
- package/dist/functional/result/impl/result-fold.d.mts.map +1 -1
- package/dist/functional/result/impl/result-fold.mjs.map +1 -1
- package/dist/functional/result/impl/result-from-promise.d.mts +3 -0
- package/dist/functional/result/impl/result-from-promise.d.mts.map +1 -1
- package/dist/functional/result/impl/result-from-promise.mjs +3 -0
- package/dist/functional/result/impl/result-from-promise.mjs.map +1 -1
- package/dist/functional/result/impl/result-from-throwable.d.mts +2 -0
- package/dist/functional/result/impl/result-from-throwable.d.mts.map +1 -1
- package/dist/functional/result/impl/result-from-throwable.mjs +4 -1
- package/dist/functional/result/impl/result-from-throwable.mjs.map +1 -1
- package/dist/functional/result/impl/result-is-err.d.mts +2 -0
- package/dist/functional/result/impl/result-is-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-is-err.mjs +2 -0
- package/dist/functional/result/impl/result-is-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-is-ok.d.mts +2 -0
- package/dist/functional/result/impl/result-is-ok.d.mts.map +1 -1
- package/dist/functional/result/impl/result-is-ok.mjs +2 -0
- package/dist/functional/result/impl/result-is-ok.mjs.map +1 -1
- package/dist/functional/result/impl/result-is-result.d.mts +4 -0
- package/dist/functional/result/impl/result-is-result.d.mts.map +1 -1
- package/dist/functional/result/impl/result-is-result.mjs +4 -0
- package/dist/functional/result/impl/result-is-result.mjs.map +1 -1
- package/dist/functional/result/impl/result-map-err.d.mts +3 -0
- package/dist/functional/result/impl/result-map-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-map-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-map.d.mts +4 -0
- package/dist/functional/result/impl/result-map.d.mts.map +1 -1
- package/dist/functional/result/impl/result-map.mjs.map +1 -1
- package/dist/functional/result/impl/result-ok.d.mts +3 -1
- package/dist/functional/result/impl/result-ok.d.mts.map +1 -1
- package/dist/functional/result/impl/result-ok.mjs +2 -0
- package/dist/functional/result/impl/result-ok.mjs.map +1 -1
- package/dist/functional/result/impl/result-or-else.d.mts +4 -0
- package/dist/functional/result/impl/result-or-else.d.mts.map +1 -1
- package/dist/functional/result/impl/result-or-else.mjs.map +1 -1
- package/dist/functional/result/impl/result-swap.d.mts +2 -0
- package/dist/functional/result/impl/result-swap.d.mts.map +1 -1
- package/dist/functional/result/impl/result-swap.mjs +2 -0
- package/dist/functional/result/impl/result-swap.mjs.map +1 -1
- package/dist/functional/result/impl/result-to-optional.d.mts +2 -0
- package/dist/functional/result/impl/result-to-optional.d.mts.map +1 -1
- package/dist/functional/result/impl/result-to-optional.mjs +2 -0
- package/dist/functional/result/impl/result-to-optional.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-or.d.mts +3 -0
- package/dist/functional/result/impl/result-unwrap-err-or.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-or.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-throw.d.mts +2 -0
- package/dist/functional/result/impl/result-unwrap-err-throw.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-throw.mjs +2 -0
- package/dist/functional/result/impl/result-unwrap-err-throw.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err.d.mts +1 -0
- package/dist/functional/result/impl/result-unwrap-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err.mjs +1 -0
- package/dist/functional/result/impl/result-unwrap-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-ok-or.d.mts +3 -0
- package/dist/functional/result/impl/result-unwrap-ok-or.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-ok-or.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-ok.d.mts +1 -0
- package/dist/functional/result/impl/result-unwrap-ok.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-ok.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-throw.d.mts +2 -0
- package/dist/functional/result/impl/result-unwrap-throw.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-throw.mjs +2 -0
- package/dist/functional/result/impl/result-unwrap-throw.mjs.map +1 -1
- package/dist/functional/result/impl/result-zip.d.mts +3 -1
- package/dist/functional/result/impl/result-zip.d.mts.map +1 -1
- package/dist/functional/result/impl/result-zip.mjs +3 -1
- package/dist/functional/result/impl/result-zip.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-err.d.mts +2 -1
- package/dist/functional/ternary-result/impl/ternary-result-err.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-err.mjs +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-err.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-flat-map.d.mts +4 -0
- package/dist/functional/ternary-result/impl/ternary-result-flat-map.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-fold.d.mts +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-fold.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-fold.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs +4 -1
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts +4 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs +4 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map-err.d.mts +3 -0
- package/dist/functional/ternary-result/impl/ternary-result-map-err.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.d.mts +3 -0
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map.d.mts +6 -0
- package/dist/functional/ternary-result/impl/ternary-result-map.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-ok.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-or-else.d.mts +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-or-else.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-or-else.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-to-optional.d.mts +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-to-optional.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.d.mts +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.d.mts +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.d.mts +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.d.mts +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs +2 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts +4 -0
- package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-zip.mjs +4 -0
- package/dist/functional/ternary-result/impl/ternary-result-zip.mjs.map +1 -1
- package/dist/globals.d.mts +10 -0
- package/dist/guard/index.mjs +1 -1
- package/dist/guard/is-record.d.mts +31 -0
- package/dist/guard/is-record.d.mts.map +1 -1
- package/dist/guard/is-record.mjs +32 -1
- package/dist/guard/is-record.mjs.map +1 -1
- package/dist/guard/is-type.d.mts +3 -0
- package/dist/guard/is-type.d.mts.map +1 -1
- package/dist/guard/is-type.mjs +3 -0
- package/dist/guard/is-type.mjs.map +1 -1
- package/dist/guard/key-is-in.d.mts +1 -0
- package/dist/guard/key-is-in.d.mts.map +1 -1
- package/dist/guard/key-is-in.mjs +1 -0
- package/dist/guard/key-is-in.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/iterator/range.d.mts +4 -0
- package/dist/iterator/range.d.mts.map +1 -1
- package/dist/iterator/range.mjs +1 -0
- package/dist/iterator/range.mjs.map +1 -1
- package/dist/json/json.d.mts +21 -0
- package/dist/json/json.d.mts.map +1 -1
- package/dist/json/json.mjs +22 -0
- package/dist/json/json.mjs.map +1 -1
- package/dist/number/branded-types/int.d.mts +14 -0
- package/dist/number/branded-types/int.d.mts.map +1 -1
- package/dist/number/branded-types/int.mjs +14 -0
- package/dist/number/branded-types/int.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-safe-int.mjs +2 -2
- package/dist/number/branded-types/positive-int.d.mts +14 -0
- package/dist/number/branded-types/positive-int.d.mts.map +1 -1
- package/dist/number/branded-types/positive-int.mjs +14 -0
- package/dist/number/branded-types/positive-int.mjs.map +1 -1
- package/dist/number/branded-types/positive-safe-int.d.mts +21 -0
- package/dist/number/branded-types/positive-safe-int.d.mts.map +1 -1
- package/dist/number/branded-types/positive-safe-int.mjs +22 -1
- package/dist/number/branded-types/positive-safe-int.mjs.map +1 -1
- package/dist/number/branded-types/safe-int.d.mts +21 -0
- package/dist/number/branded-types/safe-int.d.mts.map +1 -1
- package/dist/number/branded-types/safe-int.mjs +23 -2
- package/dist/number/branded-types/safe-int.mjs.map +1 -1
- package/dist/number/branded-types/safe-uint.mjs +1 -1
- package/dist/number/branded-types/uint.d.mts +12 -0
- package/dist/number/branded-types/uint.d.mts.map +1 -1
- package/dist/number/branded-types/uint.mjs +12 -0
- package/dist/number/branded-types/uint.mjs.map +1 -1
- package/dist/number/num.d.mts +9 -0
- package/dist/number/num.d.mts.map +1 -1
- package/dist/number/num.mjs +8 -1
- package/dist/number/num.mjs.map +1 -1
- package/dist/number/refined-number-utils.d.mts +22 -0
- package/dist/number/refined-number-utils.d.mts.map +1 -1
- package/dist/number/refined-number-utils.mjs +23 -0
- package/dist/number/refined-number-utils.mjs.map +1 -1
- package/dist/object/object.d.mts +9 -0
- package/dist/object/object.d.mts.map +1 -1
- package/dist/object/object.mjs +7 -0
- package/dist/object/object.mjs.map +1 -1
- package/dist/others/map-nullable.mjs.map +1 -1
- package/dist/others/tuple.d.mts +11 -0
- package/dist/others/tuple.d.mts.map +1 -1
- package/dist/others/tuple.mjs +11 -0
- package/dist/others/tuple.mjs.map +1 -1
- package/dist/others/unknown-to-string.d.mts.map +1 -1
- package/dist/others/unknown-to-string.mjs +2 -1
- package/dist/others/unknown-to-string.mjs.map +1 -1
- package/dist/promise/promise.d.mts +4 -0
- package/dist/promise/promise.d.mts.map +1 -1
- package/dist/promise/promise.mjs +5 -0
- package/dist/promise/promise.mjs.map +1 -1
- package/package.json +20 -24
- package/src/array/impl/array-utils-creation.mts +20 -0
- package/src/array/impl/array-utils-creation.test.mts +71 -0
- package/src/array/impl/array-utils-element-access.mts +13 -0
- package/src/array/impl/array-utils-element-access.test.mts +21 -0
- package/src/array/impl/array-utils-iterators.test.mts +17 -0
- package/src/array/impl/array-utils-modification.mts +40 -0
- package/src/array/impl/array-utils-modification.test.mts +75 -0
- package/src/array/impl/array-utils-overload-type-error.test.mts +19 -0
- package/src/array/impl/array-utils-reducing-value.mts +55 -9
- package/src/array/impl/array-utils-reducing-value.test.mts +90 -0
- package/src/array/impl/array-utils-search.mts +53 -0
- package/src/array/impl/array-utils-search.test.mts +51 -0
- package/src/array/impl/array-utils-set-op.mts +19 -0
- package/src/array/impl/array-utils-set-op.test.mts +116 -0
- package/src/array/impl/array-utils-size.mts +3 -0
- package/src/array/impl/array-utils-size.test.mts +1 -0
- package/src/array/impl/array-utils-slice-clamped.mts +7 -0
- package/src/array/impl/array-utils-slice-clamped.test.mts +20 -0
- package/src/array/impl/array-utils-slicing.mts +27 -0
- package/src/array/impl/array-utils-slicing.test.mts +57 -0
- package/src/array/impl/array-utils-transformation.mts +58 -0
- package/src/array/impl/array-utils-transformation.test.mts +113 -1
- package/src/array/impl/array-utils-validation.mts +23 -0
- package/src/array/impl/array-utils-validation.test.mts +96 -0
- package/src/array/impl/array.test.mts +12 -0
- package/src/collections/imap-mapped.mts +11 -0
- package/src/collections/imap-mapped.test.mts +70 -0
- package/src/collections/imap.mts +32 -0
- package/src/collections/imap.test.mts +106 -0
- package/src/collections/iset-mapped.mts +35 -0
- package/src/collections/iset-mapped.test.mts +111 -0
- package/src/collections/iset.mts +34 -0
- package/src/collections/iset.test.mts +193 -0
- package/src/collections/queue.mts +53 -0
- package/src/collections/queue.test.mts +32 -0
- package/src/collections/stack.mts +42 -0
- package/src/collections/stack.test.mts +44 -0
- package/src/functional/match.mts +16 -0
- package/src/functional/match.test.mts +2 -0
- package/src/functional/optional/impl/optional-expect-to-be.mts +3 -0
- package/src/functional/optional/impl/optional-filter.mts +6 -0
- package/src/functional/optional/impl/optional-flat-map.mts +4 -0
- package/src/functional/optional/impl/optional-from-nullable.mts +2 -0
- package/src/functional/optional/impl/optional-is-optional.mts +2 -0
- package/src/functional/optional/impl/optional-is-some.mts +1 -0
- package/src/functional/optional/impl/optional-map.mts +5 -0
- package/src/functional/optional/impl/optional-none.mts +2 -0
- package/src/functional/optional/impl/optional-or-else.mts +6 -0
- package/src/functional/optional/impl/optional-some.mts +3 -1
- package/src/functional/optional/impl/optional-to-nullable.mts +2 -0
- package/src/functional/optional/impl/optional-unwrap-or.mts +5 -0
- package/src/functional/optional/impl/optional-unwrap-throw.mts +1 -0
- package/src/functional/optional/impl/optional-unwrap.mts +2 -0
- package/src/functional/optional/impl/optional-zip.mts +2 -0
- package/src/functional/optional.test.mts +73 -0
- package/src/functional/pipe.test.mts +3 -0
- package/src/functional/result/impl/result-err.mts +3 -1
- package/src/functional/result/impl/result-expect-to-be.mts +3 -0
- package/src/functional/result/impl/result-flat-map.mts +7 -0
- package/src/functional/result/impl/result-fold.mts +6 -0
- package/src/functional/result/impl/result-from-promise.mts +3 -0
- package/src/functional/result/impl/result-from-throwable.mts +6 -1
- package/src/functional/result/impl/result-is-err.mts +2 -0
- package/src/functional/result/impl/result-is-ok.mts +2 -0
- package/src/functional/result/impl/result-is-result.mts +4 -0
- package/src/functional/result/impl/result-map-err.mts +5 -0
- package/src/functional/result/impl/result-map.mts +6 -0
- package/src/functional/result/impl/result-ok.mts +3 -1
- package/src/functional/result/impl/result-or-else.mts +6 -0
- package/src/functional/result/impl/result-swap.mts +2 -0
- package/src/functional/result/impl/result-to-optional.mts +2 -0
- package/src/functional/result/impl/result-unwrap-err-or.mts +5 -0
- package/src/functional/result/impl/result-unwrap-err-throw.mts +2 -0
- package/src/functional/result/impl/result-unwrap-err.mts +1 -0
- package/src/functional/result/impl/result-unwrap-ok-or.mts +5 -0
- package/src/functional/result/impl/result-unwrap-ok.mts +2 -0
- package/src/functional/result/impl/result-unwrap-throw.mts +2 -0
- package/src/functional/result/impl/result-zip.mts +3 -1
- package/src/functional/result.test.mts +88 -0
- package/src/functional/ternary-result/impl/ternary-result-err.mts +2 -1
- package/src/functional/ternary-result/impl/ternary-result-expect-to-be.mts +4 -0
- package/src/functional/ternary-result/impl/ternary-result-flat-map.mts +7 -0
- package/src/functional/ternary-result/impl/ternary-result-fold.mts +5 -0
- package/src/functional/ternary-result/impl/ternary-result-from-promise.mts +2 -0
- package/src/functional/ternary-result/impl/ternary-result-from-throwable.mts +5 -1
- package/src/functional/ternary-result/impl/ternary-result-is-ok.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-is-ternary-result.mts +4 -0
- package/src/functional/ternary-result/impl/ternary-result-is-warn.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-map-err.mts +6 -0
- package/src/functional/ternary-result/impl/ternary-result-map-warn.mts +6 -0
- package/src/functional/ternary-result/impl/ternary-result-map.mts +9 -0
- package/src/functional/ternary-result/impl/ternary-result-ok.mts +1 -1
- package/src/functional/ternary-result/impl/ternary-result-or-else.mts +5 -0
- package/src/functional/ternary-result/impl/ternary-result-to-optional.mts +2 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-err-or.mts +5 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-err.mts +2 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mts +5 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-ok.mts +3 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-throw.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mts +5 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-warn.mts +2 -0
- package/src/functional/ternary-result/impl/ternary-result-warn.mts +4 -1
- package/src/functional/ternary-result/impl/ternary-result-zip.mts +4 -0
- package/src/functional/ternary-result.test.mts +91 -0
- package/src/globals.d.mts +10 -0
- package/src/guard/has-key.test.mts +9 -0
- package/src/guard/is-non-empty-string.test.mts +20 -0
- package/src/guard/is-non-null-object.test.mts +19 -0
- package/src/guard/is-primitive.test.mts +23 -0
- package/src/guard/is-record.mts +34 -0
- package/src/guard/is-record.test.mts +21 -0
- package/src/guard/is-type.mts +3 -0
- package/src/guard/is-type.test.mts +134 -0
- package/src/guard/key-is-in.mts +1 -0
- package/src/iterator/range.mts +9 -0
- package/src/json/json.mts +29 -0
- package/src/json/json.test.mts +87 -0
- package/src/number/branded-types/finite-number.test.mts +38 -0
- package/src/number/branded-types/int.mts +14 -0
- package/src/number/branded-types/int.test.mts +42 -0
- package/src/number/branded-types/int16.test.mts +47 -0
- package/src/number/branded-types/int32.test.mts +47 -0
- package/src/number/branded-types/non-negative-finite-number.test.mts +40 -0
- package/src/number/branded-types/non-negative-int16.test.mts +43 -0
- package/src/number/branded-types/non-negative-int32.test.mts +43 -0
- package/src/number/branded-types/non-zero-finite-number.test.mts +51 -0
- package/src/number/branded-types/non-zero-int.test.mts +53 -0
- package/src/number/branded-types/non-zero-int16.test.mts +44 -0
- package/src/number/branded-types/non-zero-int32.test.mts +44 -0
- package/src/number/branded-types/non-zero-safe-int.mts +2 -2
- package/src/number/branded-types/non-zero-safe-int.test.mts +62 -0
- package/src/number/branded-types/non-zero-uint16.test.mts +37 -0
- package/src/number/branded-types/non-zero-uint32.test.mts +37 -0
- package/src/number/branded-types/positive-finite-number.test.mts +45 -0
- package/src/number/branded-types/positive-int.mts +14 -0
- package/src/number/branded-types/positive-int.test.mts +47 -0
- package/src/number/branded-types/positive-int16.test.mts +35 -0
- package/src/number/branded-types/positive-int32.test.mts +35 -0
- package/src/number/branded-types/positive-safe-int.mts +22 -1
- package/src/number/branded-types/positive-safe-int.test.mts +49 -0
- package/src/number/branded-types/positive-uint16.test.mts +37 -0
- package/src/number/branded-types/positive-uint32.test.mts +37 -0
- package/src/number/branded-types/safe-int.mts +23 -2
- package/src/number/branded-types/safe-int.test.mts +52 -0
- package/src/number/branded-types/safe-uint.mts +1 -1
- package/src/number/branded-types/safe-uint.test.mts +48 -0
- package/src/number/branded-types/uint.mts +12 -0
- package/src/number/branded-types/uint.test.mts +43 -0
- package/src/number/branded-types/uint16.test.mts +41 -0
- package/src/number/branded-types/uint32.test.mts +41 -0
- package/src/number/enum/int8.test.mts +6 -0
- package/src/number/enum/uint8.test.mts +6 -0
- package/src/number/num.mts +12 -1
- package/src/number/num.test.mts +62 -0
- package/src/number/refined-number-utils.mts +25 -0
- package/src/object/object.mts +15 -0
- package/src/object/object.test.mts +10 -0
- package/src/others/cast-mutable.test.mts +7 -0
- package/src/others/cast-readonly.test.mts +17 -0
- package/src/others/if-then.test.mts +16 -0
- package/src/others/map-nullable.mts +3 -0
- package/src/others/map-nullable.test.mts +27 -0
- package/src/others/memoize-function.test.mts +41 -0
- package/src/others/tuple.mts +11 -0
- package/src/others/unknown-to-string.mts +4 -1
- package/src/others/unknown-to-string.test.mts +10 -0
- package/src/promise/promise.mts +4 -0
- package/src/promise/promise.test.mts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-expect-to-be.mjs","sources":["../../../../src/functional/result/impl/result-expect-to-be.mts"],"sourcesContent":[null],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"result-expect-to-be.mjs","sources":["../../../../src/functional/result/impl/result-expect-to-be.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAoCM,SAAU,UAAU,CACxB,GAAG,IAAwE,EAAA;AAE3E,IAAA,QAAQ,IAAI,CAAC,MAAM;QACjB,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;AAE9B,YAAA,OAAO,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC;QACxC;QAEA,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI;YAEtB,OAAO,CAAC,MAAS,KAAkB,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC;QACpE;;AAEJ;AAEA,MAAM,cAAc,GAAG,CACrB,MAAS,EACT,OAAe,KACA;AACf,IAAA,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE;AAChB,QAAA,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB;AAEA,IAAA,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC;AAC1B,CAAC;;;;"}
|
|
@@ -9,15 +9,20 @@ import { type UnwrapErr, type UnwrapOk } from './types.mjs';
|
|
|
9
9
|
* ```ts
|
|
10
10
|
* const parseNumber = (input: string): Result<number, string> => {
|
|
11
11
|
* const num = Number.parseInt(input, 10);
|
|
12
|
+
*
|
|
12
13
|
* return Number.isNaN(num) ? Result.err('not a number') : Result.ok(num);
|
|
13
14
|
* };
|
|
14
15
|
*
|
|
15
16
|
* const parsed = Result.flatMap(Result.ok('42'), parseNumber);
|
|
17
|
+
*
|
|
16
18
|
* const failure = Result.flatMap(Result.ok('abc'), parseNumber);
|
|
19
|
+
*
|
|
17
20
|
* const passthrough = Result.flatMap(Result.err('fail'), parseNumber);
|
|
18
21
|
*
|
|
19
22
|
* assert.deepStrictEqual(parsed, Result.ok(42));
|
|
23
|
+
*
|
|
20
24
|
* assert.deepStrictEqual(failure, Result.err('not a number'));
|
|
25
|
+
*
|
|
21
26
|
* assert.deepStrictEqual(passthrough, Result.err('fail'));
|
|
22
27
|
*
|
|
23
28
|
* const parseThenDouble = Result.flatMap((input: string) =>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-flat-map.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-flat-map.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"result-flat-map.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-flat-map.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,aAAa,EAAE,EAAE,EAAE,EAAE,EACrD,MAAM,EAAE,CAAC,EACT,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAChD,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAGjC,wBAAgB,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAC/B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GACtC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-flat-map.mjs","sources":["../../../../src/functional/result/impl/result-flat-map.mts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"result-flat-map.mjs","sources":["../../../../src/functional/result/impl/result-flat-map.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAqDM,SAAU,OAAO,CACrB,GAAG,IAE6D,EAAA;AAIhE,IAAA,QAAQ,IAAI,CAAC,MAAM;QACjB,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAI;AAEhC,YAAA,OAAO,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC;QACvC;QAEA,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI;YAExB,OAAO,CAAC,MAAS,KAAK,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC;QACtD;;AAEJ;AAEA,MAAM,WAAW,GAAG,CAClB,MAAS,EACT,SAAiD,KAEjD,KAAK,CAAC,MAAM;AACV;QACG;AACH;AACE,QAAA,SAAS,CAAC,MAAM,CAAC,KAAoB,CAAC;;;;"}
|
|
@@ -7,6 +7,7 @@ import { type UnwrapErr, type UnwrapOk } from './types.mjs';
|
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
9
|
* const okValue = Result.ok(2);
|
|
10
|
+
*
|
|
10
11
|
* const errValue = Result.err('bad');
|
|
11
12
|
*
|
|
12
13
|
* const foldedOk = Result.fold(
|
|
@@ -14,6 +15,7 @@ import { type UnwrapErr, type UnwrapOk } from './types.mjs';
|
|
|
14
15
|
* (value) => value * 2,
|
|
15
16
|
* (error) => error,
|
|
16
17
|
* );
|
|
18
|
+
*
|
|
17
19
|
* const foldedErr = Result.fold(
|
|
18
20
|
* errValue,
|
|
19
21
|
* (value: number) => value * 2,
|
|
@@ -21,6 +23,7 @@ import { type UnwrapErr, type UnwrapOk } from './types.mjs';
|
|
|
21
23
|
* );
|
|
22
24
|
*
|
|
23
25
|
* assert.deepStrictEqual(foldedOk, Result.ok(4));
|
|
26
|
+
*
|
|
24
27
|
* assert.deepStrictEqual(foldedErr, Result.err('BAD'));
|
|
25
28
|
*
|
|
26
29
|
* const foldNumbers = Result.fold(
|
|
@@ -29,6 +32,7 @@ import { type UnwrapErr, type UnwrapOk } from './types.mjs';
|
|
|
29
32
|
* );
|
|
30
33
|
*
|
|
31
34
|
* assert.deepStrictEqual(foldNumbers(Result.ok(3)), Result.ok(9));
|
|
35
|
+
*
|
|
32
36
|
* assert.deepStrictEqual(foldNumbers(Result.err('oops')), Result.err(4));
|
|
33
37
|
* ```
|
|
34
38
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-fold.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-fold.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"result-fold.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-fold.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,aAAa,EAAE,EAAE,EAAE,EAAE,EAClD,MAAM,EAAE,CAAC,EACT,KAAK,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,EACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,EAAE,GACpC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAGlB,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAC/B,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GACzB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-fold.mjs","sources":["../../../../src/functional/result/impl/result-fold.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"result-fold.mjs","sources":["../../../../src/functional/result/impl/result-fold.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AA8DM,SAAU,IAAI,CAClB,GAAG,IASE,EAAA;AAEL,IAAA,QAAQ,IAAI,CAAC,MAAM;QACjB,KAAK,CAAC,EAAE;;YAEN,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAI;YAEtC,OAAO,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC;QAC1C;QAEA,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAI;AAE9B,YAAA,OAAO,CAAC,MAAS,KAAK,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC;QACzD;;AAEJ;AAEA,MAAM,QAAQ,GAAG,CACf,MAAS,EACT,KAAiC,EACjC,QAAqC,KAErC,IAAI,CAAC,MAAM;AACT;AACE,QAAA,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAoB,CAAC;AACvC;QACE,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAqB,CAAC,CAAC;;;;"}
|
|
@@ -14,12 +14,15 @@ type UnwrapPromise<P extends Promise<unknown>> = P extends Promise<infer V> ? V
|
|
|
14
14
|
*
|
|
15
15
|
* ```ts
|
|
16
16
|
* const successPromise = Result.fromPromise(Promise.resolve('ok'));
|
|
17
|
+
*
|
|
17
18
|
* const failurePromise = Result.fromPromise(Promise.reject(new Error('fail')));
|
|
18
19
|
*
|
|
19
20
|
* const resolved = await successPromise;
|
|
21
|
+
*
|
|
20
22
|
* const rejected = await failurePromise;
|
|
21
23
|
*
|
|
22
24
|
* assert.deepStrictEqual(resolved, Result.ok('ok'));
|
|
25
|
+
*
|
|
23
26
|
* assert.ok(Result.isErr(rejected));
|
|
24
27
|
* ```
|
|
25
28
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-from-promise.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-from-promise.mts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,KAAK,aAAa,CAAC,CAAC,SAAS,OAAO,CAAC,OAAO,CAAC,IAC3C,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEzC
|
|
1
|
+
{"version":3,"file":"result-from-promise.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-from-promise.mts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,KAAK,aAAa,CAAC,CAAC,SAAS,OAAO,CAAC,OAAO,CAAC,IAC3C,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,OAAO,CAAC,OAAO,CAAC,EACpD,SAAS,CAAC,KACT,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAEmB,CAAC"}
|
|
@@ -11,12 +11,15 @@ import { ok } from './result-ok.mjs';
|
|
|
11
11
|
*
|
|
12
12
|
* ```ts
|
|
13
13
|
* const successPromise = Result.fromPromise(Promise.resolve('ok'));
|
|
14
|
+
*
|
|
14
15
|
* const failurePromise = Result.fromPromise(Promise.reject(new Error('fail')));
|
|
15
16
|
*
|
|
16
17
|
* const resolved = await successPromise;
|
|
18
|
+
*
|
|
17
19
|
* const rejected = await failurePromise;
|
|
18
20
|
*
|
|
19
21
|
* assert.deepStrictEqual(resolved, Result.ok('ok'));
|
|
22
|
+
*
|
|
20
23
|
* assert.ok(Result.isErr(rejected));
|
|
21
24
|
* ```
|
|
22
25
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-from-promise.mjs","sources":["../../../../src/functional/result/impl/result-from-promise.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAWA
|
|
1
|
+
{"version":3,"file":"result-from-promise.mjs","sources":["../../../../src/functional/result/impl/result-from-promise.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAWA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AACI,MAAM,WAAW,GAAG,CACzB,OAAU;AAEV;AACA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAyB,CAAC,CAAC,KAAK,CAAC,GAAG;;;;"}
|
|
@@ -12,11 +12,13 @@
|
|
|
12
12
|
*
|
|
13
13
|
* ```ts
|
|
14
14
|
* const success = Result.fromThrowable(() => 1 + 1);
|
|
15
|
+
*
|
|
15
16
|
* const failure = Result.fromThrowable(() => {
|
|
16
17
|
* throw new Error('boom');
|
|
17
18
|
* });
|
|
18
19
|
*
|
|
19
20
|
* assert.deepStrictEqual(success, Result.ok(2));
|
|
21
|
+
*
|
|
20
22
|
* assert.ok(Result.isErr(failure));
|
|
21
23
|
* ```
|
|
22
24
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-from-throwable.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-from-throwable.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"result-from-throwable.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-from-throwable.mts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,EAAG,IAAI,MAAM,CAAC,KAAG,MAAM,CAAC,CAAC,EAAE,KAAK,CAY9D,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isError } from '@sindresorhus/is';
|
|
1
2
|
import { unknownToString } from '../../../others/unknown-to-string.mjs';
|
|
2
3
|
import { err } from './result-err.mjs';
|
|
3
4
|
import { ok } from './result-ok.mjs';
|
|
@@ -16,11 +17,13 @@ import { ok } from './result-ok.mjs';
|
|
|
16
17
|
*
|
|
17
18
|
* ```ts
|
|
18
19
|
* const success = Result.fromThrowable(() => 1 + 1);
|
|
20
|
+
*
|
|
19
21
|
* const failure = Result.fromThrowable(() => {
|
|
20
22
|
* throw new Error('boom');
|
|
21
23
|
* });
|
|
22
24
|
*
|
|
23
25
|
* assert.deepStrictEqual(success, Result.ok(2));
|
|
26
|
+
*
|
|
24
27
|
* assert.ok(Result.isErr(failure));
|
|
25
28
|
* ```
|
|
26
29
|
*
|
|
@@ -34,7 +37,7 @@ const fromThrowable = (fn) => {
|
|
|
34
37
|
return ok(fn());
|
|
35
38
|
}
|
|
36
39
|
catch (error) {
|
|
37
|
-
if (
|
|
40
|
+
if (isError(error)) {
|
|
38
41
|
return err(error);
|
|
39
42
|
}
|
|
40
43
|
const msg = unknownToString(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-from-throwable.mjs","sources":["../../../../src/functional/result/impl/result-from-throwable.mts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"result-from-throwable.mjs","sources":["../../../../src/functional/result/impl/result-from-throwable.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACI,MAAM,aAAa,GAAG,CAAK,EAAW,KAAsB;AACjE,IAAA,IAAI;AACF,QAAA,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC;IACjB;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;AAClB,YAAA,OAAO,GAAG,CAAC,KAAK,CAAC;QACnB;AAEA,QAAA,MAAM,GAAG,GAAG,eAAe,CAAC,KAAK,CAAC;QAElC,OAAO,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5B;AACF;;;;"}
|
|
@@ -6,10 +6,12 @@ import { type NarrowToErr } from './types.mjs';
|
|
|
6
6
|
*
|
|
7
7
|
* ```ts
|
|
8
8
|
* const operation = Result.ok(3);
|
|
9
|
+
*
|
|
9
10
|
* const failure = Result.err('error');
|
|
10
11
|
*
|
|
11
12
|
* if (Result.isOk(operation)) {
|
|
12
13
|
* const value: number = operation.value;
|
|
14
|
+
*
|
|
13
15
|
* assert(value === 3);
|
|
14
16
|
* }
|
|
15
17
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-is-err.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-is-err.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"result-is-err.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-is-err.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,SAAS,aAAa,EAC3C,QAAQ,CAAC,KACR,MAAM,IAAI,WAAW,CAAC,CAAC,CAAoC,CAAC"}
|
|
@@ -7,10 +7,12 @@ import { ErrTypeTagName } from './tag.mjs';
|
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
9
|
* const operation = Result.ok(3);
|
|
10
|
+
*
|
|
10
11
|
* const failure = Result.err('error');
|
|
11
12
|
*
|
|
12
13
|
* if (Result.isOk(operation)) {
|
|
13
14
|
* const value: number = operation.value;
|
|
15
|
+
*
|
|
14
16
|
* assert(value === 3);
|
|
15
17
|
* }
|
|
16
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-is-err.mjs","sources":["../../../../src/functional/result/impl/result-is-err.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA
|
|
1
|
+
{"version":3,"file":"result-is-err.mjs","sources":["../../../../src/functional/result/impl/result-is-err.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA;;;;;;;;;;;;;;;;;;AAkBG;AACI,MAAM,KAAK,GAAG,CACnB,MAAS,KACoB,MAAM,CAAC,KAAK,KAAK;;;;"}
|
|
@@ -6,10 +6,12 @@ import { type NarrowToOk } from './types.mjs';
|
|
|
6
6
|
*
|
|
7
7
|
* ```ts
|
|
8
8
|
* const operation = Result.ok(3);
|
|
9
|
+
*
|
|
9
10
|
* const failure = Result.err('error');
|
|
10
11
|
*
|
|
11
12
|
* if (Result.isOk(operation)) {
|
|
12
13
|
* const value: number = operation.value;
|
|
14
|
+
*
|
|
13
15
|
* assert(value === 3);
|
|
14
16
|
* }
|
|
15
17
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-is-ok.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-is-ok.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"result-is-ok.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-is-ok.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,aAAa,EAC1C,QAAQ,CAAC,KACR,MAAM,IAAI,UAAU,CAAC,CAAC,CAAmC,CAAC"}
|
|
@@ -7,10 +7,12 @@ import { OkTypeTagName } from './tag.mjs';
|
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
9
|
* const operation = Result.ok(3);
|
|
10
|
+
*
|
|
10
11
|
* const failure = Result.err('error');
|
|
11
12
|
*
|
|
12
13
|
* if (Result.isOk(operation)) {
|
|
13
14
|
* const value: number = operation.value;
|
|
15
|
+
*
|
|
14
16
|
* assert(value === 3);
|
|
15
17
|
* }
|
|
16
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-is-ok.mjs","sources":["../../../../src/functional/result/impl/result-is-ok.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA
|
|
1
|
+
{"version":3,"file":"result-is-ok.mjs","sources":["../../../../src/functional/result/impl/result-is-ok.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA;;;;;;;;;;;;;;;;;;AAkBG;AACI,MAAM,IAAI,GAAG,CAClB,MAAS,KACmB,MAAM,CAAC,KAAK,KAAK;;;;"}
|
|
@@ -5,11 +5,15 @@
|
|
|
5
5
|
*
|
|
6
6
|
* ```ts
|
|
7
7
|
* const okValue = Result.ok('success');
|
|
8
|
+
*
|
|
8
9
|
* const errValue = Result.err(new Error('failure'));
|
|
10
|
+
*
|
|
9
11
|
* const notResult = { $$tag: 'ts-data-forge::Result.ok' };
|
|
10
12
|
*
|
|
11
13
|
* assert.ok(Result.isResult(okValue));
|
|
14
|
+
*
|
|
12
15
|
* assert.ok(Result.isResult(errValue));
|
|
16
|
+
*
|
|
13
17
|
* assert.notOk(Result.isResult(notResult));
|
|
14
18
|
* ```
|
|
15
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-is-result.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-is-result.mts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"result-is-result.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-is-result.mts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,QAAQ,GAAI,aAAa,OAAO,KAAG,WAAW,IAAI,aAIgB,CAAC"}
|
|
@@ -9,11 +9,15 @@ import { ErrTypeTagName, OkTypeTagName } from './tag.mjs';
|
|
|
9
9
|
*
|
|
10
10
|
* ```ts
|
|
11
11
|
* const okValue = Result.ok('success');
|
|
12
|
+
*
|
|
12
13
|
* const errValue = Result.err(new Error('failure'));
|
|
14
|
+
*
|
|
13
15
|
* const notResult = { $$tag: 'ts-data-forge::Result.ok' };
|
|
14
16
|
*
|
|
15
17
|
* assert.ok(Result.isResult(okValue));
|
|
18
|
+
*
|
|
16
19
|
* assert.ok(Result.isResult(errValue));
|
|
20
|
+
*
|
|
17
21
|
* assert.notOk(Result.isResult(notResult));
|
|
18
22
|
* ```
|
|
19
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-is-result.mjs","sources":["../../../../src/functional/result/impl/result-is-result.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAGA
|
|
1
|
+
{"version":3,"file":"result-is-result.mjs","sources":["../../../../src/functional/result/impl/result-is-result.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAGA;;;;;;;;;;;;;;;;;;AAkBG;AACI,MAAM,QAAQ,GAAG,CAAC,WAAoB,KAC3C,QAAQ,CAAC,WAAW,CAAC;AACrB,IAAA,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC;AAC5B,IAAA,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC;AAC5B,KAAC,WAAW,CAAC,KAAK,KAAK,cAAc,IAAI,WAAW,CAAC,KAAK,KAAK,aAAa;;;;"}
|
|
@@ -7,12 +7,15 @@ import { type UnwrapErr, type UnwrapOk } from './types.mjs';
|
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
9
|
* const okValue = Result.ok(3) as Result<number, string>;
|
|
10
|
+
*
|
|
10
11
|
* const errValue = Result.err('missing');
|
|
11
12
|
*
|
|
12
13
|
* const untouchedOk = Result.mapErr(okValue, (error) => error.toUpperCase());
|
|
14
|
+
*
|
|
13
15
|
* const uppercasedErr = Result.mapErr(errValue, (error) => error.toUpperCase());
|
|
14
16
|
*
|
|
15
17
|
* assert.deepStrictEqual(untouchedOk, Result.ok(3));
|
|
18
|
+
*
|
|
16
19
|
* assert.deepStrictEqual(uppercasedErr, Result.err('MISSING'));
|
|
17
20
|
*
|
|
18
21
|
* const mapError = Result.mapErr((error: Readonly<Error>) => error.message);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-map-err.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-map-err.mts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"result-map-err.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-map-err.mts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,aAAa,EAAE,EAAE,EAChD,MAAM,EAAE,CAAC,EACT,KAAK,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,EAAE,GACjC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAG3B,wBAAgB,MAAM,CAAC,CAAC,EAAE,EAAE,EAC1B,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GACtB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-map-err.mjs","sources":["../../../../src/functional/result/impl/result-map-err.mts"],"sourcesContent":[null],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"result-map-err.mjs","sources":["../../../../src/functional/result/impl/result-map-err.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AA8CM,SAAU,MAAM,CACpB,GAAG,IAE8C,EAAA;AAEjD,IAAA,QAAQ,IAAI,CAAC,MAAM;QACjB,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,IAAI;AAE5B,YAAA,OAAO,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC;QAClC;QAEA,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI;YAEpB,OAAO,CAAC,MAAS,KAAK,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC;QACjD;;AAEJ;AAEA,MAAM,UAAU,GAAG,CACjB,MAAS,EACT,KAAkC,KAElC,IAAI,CAAC,MAAM;AACT;QACG;AACH;QACE,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,KAAqB,CAAC,CAAC;;;;"}
|
|
@@ -8,17 +8,21 @@ import { type UnwrapErr, type UnwrapOk } from './types.mjs';
|
|
|
8
8
|
*
|
|
9
9
|
* ```ts
|
|
10
10
|
* const okNumber = Result.ok(5);
|
|
11
|
+
*
|
|
11
12
|
* const errMessage = Result.err('error');
|
|
12
13
|
*
|
|
13
14
|
* const doubled = Result.map(okNumber, (value) => value * 2);
|
|
15
|
+
*
|
|
14
16
|
* const untouchedError = Result.map(errMessage, (value: number) => value * 2);
|
|
15
17
|
*
|
|
16
18
|
* assert.deepStrictEqual(doubled, Result.ok(10));
|
|
19
|
+
*
|
|
17
20
|
* assert.deepStrictEqual(untouchedError, errMessage);
|
|
18
21
|
*
|
|
19
22
|
* const mapToLength = Result.map((text: string) => text.length);
|
|
20
23
|
*
|
|
21
24
|
* assert.deepStrictEqual(mapToLength(Result.ok('abc')), Result.ok(3));
|
|
25
|
+
*
|
|
22
26
|
* assert.deepStrictEqual(mapToLength(Result.err('bad')), Result.err('bad'));
|
|
23
27
|
* ```
|
|
24
28
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-map.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-map.mts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"result-map.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-map.mts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,aAAa,EAAE,EAAE,EAC7C,MAAM,EAAE,CAAC,EACT,KAAK,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,GAChC,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAG5B,wBAAgB,GAAG,CAAC,CAAC,EAAE,EAAE,EACvB,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GACtB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-map.mjs","sources":["../../../../src/functional/result/impl/result-map.mts"],"sourcesContent":[null],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"result-map.mjs","sources":["../../../../src/functional/result/impl/result-map.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAgDM,SAAU,GAAG,CACjB,GAAG,IAE6C,EAAA;AAEhD,IAAA,QAAQ,IAAI,CAAC,MAAM;QACjB,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,IAAI;AAE5B,YAAA,OAAO,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC;QAC/B;QAEA,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI;YAEpB,OAAO,CAAC,MAAS,KAAK,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC;QAC9C;;AAEJ;AAEA,MAAM,OAAO,GAAG,CACd,MAAS,EACT,KAAiC,KAEjC,KAAK,CAAC,MAAM;AACV;QACG;AACH;QACE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAoB,CAAC,CAAC;;;;"}
|
|
@@ -8,12 +8,14 @@
|
|
|
8
8
|
*
|
|
9
9
|
* ```ts
|
|
10
10
|
* const success = Result.ok({ id: 1 });
|
|
11
|
+
*
|
|
11
12
|
* const failure = Result.err(new Error('missing data'));
|
|
12
13
|
*
|
|
13
14
|
* assert.deepStrictEqual(success, {
|
|
14
15
|
* $$tag: 'ts-data-forge::Result.ok',
|
|
15
16
|
* value: { id: 1 },
|
|
16
17
|
* });
|
|
18
|
+
*
|
|
17
19
|
* assert.ok(Result.isErr(failure));
|
|
18
20
|
* ```
|
|
19
21
|
*
|
|
@@ -21,5 +23,5 @@
|
|
|
21
23
|
* @param value The success value.
|
|
22
24
|
* @returns A `Result.Ok<S>` containing the value.
|
|
23
25
|
*/
|
|
24
|
-
export declare const ok: <S>(value: S) => Ok<S>;
|
|
26
|
+
export declare const ok: <const S>(value: S) => Ok<S>;
|
|
25
27
|
//# sourceMappingURL=result-ok.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-ok.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-ok.mts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"result-ok.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-ok.mts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,EAAE,GAAI,KAAK,CAAC,CAAC,EAAG,OAAO,CAAC,KAAG,EAAE,CAAC,CAAC,CAG1C,CAAC"}
|
|
@@ -10,12 +10,14 @@ import { OkTypeTagName } from './tag.mjs';
|
|
|
10
10
|
*
|
|
11
11
|
* ```ts
|
|
12
12
|
* const success = Result.ok({ id: 1 });
|
|
13
|
+
*
|
|
13
14
|
* const failure = Result.err(new Error('missing data'));
|
|
14
15
|
*
|
|
15
16
|
* assert.deepStrictEqual(success, {
|
|
16
17
|
* $$tag: 'ts-data-forge::Result.ok',
|
|
17
18
|
* value: { id: 1 },
|
|
18
19
|
* });
|
|
20
|
+
*
|
|
19
21
|
* assert.ok(Result.isErr(failure));
|
|
20
22
|
* ```
|
|
21
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-ok.mjs","sources":["../../../../src/functional/result/impl/result-ok.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA
|
|
1
|
+
{"version":3,"file":"result-ok.mjs","sources":["../../../../src/functional/result/impl/result-ok.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;MACU,EAAE,GAAG,CAAW,KAAQ,MAAa;AAChD,IAAA,KAAK,EAAE,aAAa;IACpB,KAAK;AACN,CAAA;;;;"}
|
|
@@ -6,10 +6,13 @@ import { type NarrowToOk } from './types.mjs';
|
|
|
6
6
|
*
|
|
7
7
|
* ```ts
|
|
8
8
|
* const primary = Result.ok('primary');
|
|
9
|
+
*
|
|
9
10
|
* const fallback = Result.ok('fallback');
|
|
11
|
+
*
|
|
10
12
|
* const failure = Result.err('failure');
|
|
11
13
|
*
|
|
12
14
|
* assert.deepStrictEqual(Result.orElse(primary, fallback), primary);
|
|
15
|
+
*
|
|
13
16
|
* assert.deepStrictEqual(Result.orElse(failure, fallback), fallback);
|
|
14
17
|
*
|
|
15
18
|
* const orElseFallback = Result.orElse(Result.ok('default'));
|
|
@@ -18,6 +21,7 @@ import { type NarrowToOk } from './types.mjs';
|
|
|
18
21
|
* orElseFallback(Result.err('missing')),
|
|
19
22
|
* Result.ok('default'),
|
|
20
23
|
* );
|
|
24
|
+
*
|
|
21
25
|
* assert.deepStrictEqual(orElseFallback(Result.ok('value')), Result.ok('value'));
|
|
22
26
|
* ```
|
|
23
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-or-else.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-or-else.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"result-or-else.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-or-else.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,aAAa,EAAE,EAAE,SAAS,aAAa,EACtE,MAAM,EAAE,CAAC,EACT,WAAW,EAAE,EAAE,GACd,UAAU,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AAGtB,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EACjC,WAAW,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAC1B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-or-else.mjs","sources":["../../../../src/functional/result/impl/result-or-else.mts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"result-or-else.mjs","sources":["../../../../src/functional/result/impl/result-or-else.mts"],"sourcesContent":[null],"names":[],"mappings":";;AA6CM,SAAU,MAAM,CACpB,GAAG,IAAwE,EAAA;AAE3E,IAAA,QAAQ,IAAI,CAAC,MAAM;QACjB,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,IAAI;AAElC,YAAA,OAAO,UAAU,CAAC,MAAM,EAAE,WAAW,CAAC;QACxC;QAEA,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,WAAW,CAAC,GAAG,IAAI;YAE1B,OAAO,CAAC,MAAS,KAAK,UAAU,CAAC,MAAM,EAAE,WAAW,CAAC;QACvD;;AAEJ;AAEA,MAAM,UAAU,GAAG,CACjB,MAAS,EACT,WAAe,MACS,IAAI,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,WAAW,CAAC;;;;"}
|
|
@@ -6,9 +6,11 @@ import { type UnwrapErr, type UnwrapOk } from './types.mjs';
|
|
|
6
6
|
*
|
|
7
7
|
* ```ts
|
|
8
8
|
* const okValue = Result.ok('value');
|
|
9
|
+
*
|
|
9
10
|
* const errValue = Result.err('error');
|
|
10
11
|
*
|
|
11
12
|
* assert.deepStrictEqual(Result.swap(okValue), Result.err('value'));
|
|
13
|
+
*
|
|
12
14
|
* assert.deepStrictEqual(Result.swap(errValue), Result.ok('error'));
|
|
13
15
|
* ```
|
|
14
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-swap.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-swap.mts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"result-swap.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-swap.mts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,aAAa,EAC1C,QAAQ,CAAC,KACR,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAEsC,CAAC"}
|
|
@@ -10,9 +10,11 @@ import { unwrapOk } from './result-unwrap-ok.mjs';
|
|
|
10
10
|
*
|
|
11
11
|
* ```ts
|
|
12
12
|
* const okValue = Result.ok('value');
|
|
13
|
+
*
|
|
13
14
|
* const errValue = Result.err('error');
|
|
14
15
|
*
|
|
15
16
|
* assert.deepStrictEqual(Result.swap(okValue), Result.err('value'));
|
|
17
|
+
*
|
|
16
18
|
* assert.deepStrictEqual(Result.swap(errValue), Result.ok('error'));
|
|
17
19
|
* ```
|
|
18
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-swap.mjs","sources":["../../../../src/functional/result/impl/result-swap.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAMA
|
|
1
|
+
{"version":3,"file":"result-swap.mjs","sources":["../../../../src/functional/result/impl/result-swap.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAMA;;;;;;;;;;;;;;;;;;AAkBG;AACI,MAAM,IAAI,GAAG,CAClB,MAAS;AAET;AACA,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAqB;;;;"}
|
|
@@ -13,9 +13,11 @@ import { type UnwrapOk } from './types.mjs';
|
|
|
13
13
|
*
|
|
14
14
|
* ```ts
|
|
15
15
|
* const okValue = Result.ok(7);
|
|
16
|
+
*
|
|
16
17
|
* const errValue = Result.err('fail');
|
|
17
18
|
*
|
|
18
19
|
* assert.deepStrictEqual(Result.toOptional(okValue), Optional.some(7));
|
|
20
|
+
*
|
|
19
21
|
* assert.deepStrictEqual(Result.toOptional(errValue), Optional.none);
|
|
20
22
|
* ```
|
|
21
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-to-optional.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-to-optional.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"result-to-optional.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-to-optional.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,aAAa,EAChD,QAAQ,CAAC,KACR,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CACyC,CAAC"}
|
|
@@ -17,9 +17,11 @@ import { unwrapOk } from './result-unwrap-ok.mjs';
|
|
|
17
17
|
*
|
|
18
18
|
* ```ts
|
|
19
19
|
* const okValue = Result.ok(7);
|
|
20
|
+
*
|
|
20
21
|
* const errValue = Result.err('fail');
|
|
21
22
|
*
|
|
22
23
|
* assert.deepStrictEqual(Result.toOptional(okValue), Optional.some(7));
|
|
24
|
+
*
|
|
23
25
|
* assert.deepStrictEqual(Result.toOptional(errValue), Optional.none);
|
|
24
26
|
* ```
|
|
25
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-to-optional.mjs","sources":["../../../../src/functional/result/impl/result-to-optional.mts"],"sourcesContent":[null],"names":["Optional.some","Optional.none"],"mappings":";;;;;AAKA
|
|
1
|
+
{"version":3,"file":"result-to-optional.mjs","sources":["../../../../src/functional/result/impl/result-to-optional.mts"],"sourcesContent":[null],"names":["Optional.some","Optional.none"],"mappings":";;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;AACI,MAAM,UAAU,GAAG,CACxB,MAAS,KAET,IAAI,CAAC,MAAM,CAAC,GAAGA,IAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAGC;;;;"}
|
|
@@ -7,14 +7,17 @@ import { type UnwrapErr } from './types.mjs';
|
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
9
|
* const okResult = Result.ok('success');
|
|
10
|
+
*
|
|
10
11
|
* const errResult = Result.err('failure');
|
|
11
12
|
*
|
|
12
13
|
* assert(Result.unwrapErrOr(okResult, 'default') === 'default');
|
|
14
|
+
*
|
|
13
15
|
* assert(Result.unwrapErrOr(errResult, 'default') === 'failure');
|
|
14
16
|
*
|
|
15
17
|
* const unwrapError = Result.unwrapErrOr('fallback error');
|
|
16
18
|
*
|
|
17
19
|
* assert(unwrapError(Result.err('boom')) === 'boom');
|
|
20
|
+
*
|
|
18
21
|
* assert(unwrapError(Result.ok('no error')) === 'fallback error');
|
|
19
22
|
* ```
|
|
20
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-unwrap-err-or.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-unwrap-err-or.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C
|
|
1
|
+
{"version":3,"file":"result-unwrap-err-or.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-unwrap-err-or.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,EACpD,MAAM,EAAE,CAAC,EACT,YAAY,EAAE,CAAC,GACd,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAGpB,wBAAgB,WAAW,CAAC,CAAC,EAC3B,YAAY,EAAE,CAAC,GACd,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-unwrap-err-or.mjs","sources":["../../../../src/functional/result/impl/result-unwrap-err-or.mts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"result-unwrap-err-or.mjs","sources":["../../../../src/functional/result/impl/result-unwrap-err-or.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAyCM,SAAU,WAAW,CACzB,GAAG,IAAwE,EAAA;AAE3E,IAAA,QAAQ,IAAI,CAAC,MAAM;QACjB,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,IAAI;AAEnC,YAAA,OAAO,eAAe,CAAC,MAAM,EAAE,YAAY,CAAC;QAC9C;QAEA,KAAK,CAAC,EAAE;;AAEN,YAAA,MAAM,CAAC,YAAY,CAAC,GAAG,IAAI;YAE3B,OAAO,CAAC,MAAS,KAAK,eAAe,CAAC,MAAM,EAAE,YAAY,CAAC;QAC7D;;AAEJ;AAEA,MAAM,eAAe,GAAG,CACtB,MAAS,EACT,YAAe,KACM,SAAS,CAAC,MAAM,CAAC,IAAI,YAAY;;;;"}
|
|
@@ -11,9 +11,11 @@ import { type UnwrapErr, type UnwrapOk } from './types.mjs';
|
|
|
11
11
|
*
|
|
12
12
|
* ```ts
|
|
13
13
|
* const errResult = Result.err(new Error('broken'));
|
|
14
|
+
*
|
|
14
15
|
* const okResult = Result.ok('value');
|
|
15
16
|
*
|
|
16
17
|
* assert(Result.unwrapErrThrow(errResult).message === 'broken');
|
|
18
|
+
*
|
|
17
19
|
* assert.throws(() => Result.unwrapErrThrow(okResult), /Expected Err/u);
|
|
18
20
|
* ```
|
|
19
21
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-unwrap-err-throw.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-unwrap-err-throw.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"result-unwrap-err-throw.d.mts","sourceRoot":"","sources":["../../../../src/functional/result/impl/result-unwrap-err-throw.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,aAAa,EACpD,QAAQ,CAAC,EACT,QAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,MAAwB,KAClD,SAAS,CAAC,CAAC,CAiBb,CAAC"}
|
|
@@ -14,9 +14,11 @@ import { isErr } from './result-is-err.mjs';
|
|
|
14
14
|
*
|
|
15
15
|
* ```ts
|
|
16
16
|
* const errResult = Result.err(new Error('broken'));
|
|
17
|
+
*
|
|
17
18
|
* const okResult = Result.ok('value');
|
|
18
19
|
*
|
|
19
20
|
* assert(Result.unwrapErrThrow(errResult).message === 'broken');
|
|
21
|
+
*
|
|
20
22
|
* assert.throws(() => Result.unwrapErrThrow(okResult), /Expected Err/u);
|
|
21
23
|
* ```
|
|
22
24
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-unwrap-err-throw.mjs","sources":["../../../../src/functional/result/impl/result-unwrap-err-throw.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKA
|
|
1
|
+
{"version":3,"file":"result-unwrap-err-throw.mjs","sources":["../../../../src/functional/result/impl/result-unwrap-err-throw.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACI,MAAM,cAAc,GAAG,CAC5B,MAAS,EACT,KAAA,GAAoC,eAAe,KACnC;AAChB,IAAA,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE;;QAEjB,OAAO,MAAM,CAAC,KAAqB;IACrC;AAEA,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE;AAClC,QAAA,0BAA0B,EAAE,IAAI;AAChC,QAAA,2BAA2B,EAAE,KAAK;AACnC,KAAA,CAAC;AAEF,IAAA,MAAM,IAAI,KAAK,CACb,CAAA,qBAAA,EAAwB,OAAO,KAAK,KAAK;;AAEvC,IAAA,MAAM,CAAC,KAAoB,CAC5B,CAAA,CAAE,CACJ;AACH;;;;"}
|