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,14 +1,18 @@
|
|
|
1
1
|
import { ISetMapped } from './iset-mapped.mjs';
|
|
2
2
|
|
|
3
3
|
const toKey = (a: Readonly<{ v: number }>): number => a.v;
|
|
4
|
+
|
|
4
5
|
const fromKey = (k: number): Readonly<{ v: number }> => ({ v: k });
|
|
5
6
|
|
|
6
7
|
// Test types for additional functionality
|
|
7
8
|
type TestElement = { id: number; type: string };
|
|
9
|
+
|
|
8
10
|
const testElementToString = (el: Readonly<TestElement>): string =>
|
|
9
11
|
`${el.type}_${el.id}`;
|
|
12
|
+
|
|
10
13
|
const stringToTestElement = (str: string): TestElement => {
|
|
11
14
|
const [type, idStr] = str.split('_');
|
|
15
|
+
|
|
12
16
|
return { type: type ?? '', id: Number(idStr ?? '0') };
|
|
13
17
|
};
|
|
14
18
|
|
|
@@ -87,6 +91,7 @@ describe('ISetMapped.add', () => {
|
|
|
87
91
|
fromKey,
|
|
88
92
|
),
|
|
89
93
|
);
|
|
94
|
+
|
|
90
95
|
assert.deepStrictEqual(
|
|
91
96
|
s0,
|
|
92
97
|
ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
|
|
@@ -104,6 +109,7 @@ describe('ISetMapped.add', () => {
|
|
|
104
109
|
s0.add({ v: 3 }),
|
|
105
110
|
ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
|
|
106
111
|
);
|
|
112
|
+
|
|
107
113
|
assert.deepStrictEqual(
|
|
108
114
|
s0,
|
|
109
115
|
ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
|
|
@@ -117,6 +123,7 @@ describe('ISetMapped.add', () => {
|
|
|
117
123
|
s0.add({ v: 1 }),
|
|
118
124
|
ISetMapped.create([{ v: 1 }], toKey, fromKey),
|
|
119
125
|
);
|
|
126
|
+
|
|
120
127
|
assert.deepStrictEqual(s0, ISetMapped.create([], toKey, fromKey));
|
|
121
128
|
});
|
|
122
129
|
});
|
|
@@ -133,6 +140,7 @@ describe('ISetMapped.delete', () => {
|
|
|
133
140
|
s0.delete({ v: 10 }),
|
|
134
141
|
ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
|
|
135
142
|
);
|
|
143
|
+
|
|
136
144
|
assert.deepStrictEqual(
|
|
137
145
|
s0,
|
|
138
146
|
ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
|
|
@@ -150,6 +158,7 @@ describe('ISetMapped.delete', () => {
|
|
|
150
158
|
s0.delete({ v: 3 }),
|
|
151
159
|
ISetMapped.create([{ v: 1 }, { v: 2 }], toKey, fromKey),
|
|
152
160
|
);
|
|
161
|
+
|
|
153
162
|
assert.deepStrictEqual(
|
|
154
163
|
s0,
|
|
155
164
|
ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
|
|
@@ -163,6 +172,7 @@ describe('ISetMapped.delete', () => {
|
|
|
163
172
|
s0.delete({ v: 1 }),
|
|
164
173
|
ISetMapped.create([], toKey, fromKey),
|
|
165
174
|
);
|
|
175
|
+
|
|
166
176
|
assert.deepStrictEqual(s0, ISetMapped.create([], toKey, fromKey));
|
|
167
177
|
});
|
|
168
178
|
});
|
|
@@ -174,6 +184,7 @@ describe('ISetMapped.forEach', () => {
|
|
|
174
184
|
toKey,
|
|
175
185
|
fromKey,
|
|
176
186
|
);
|
|
187
|
+
|
|
177
188
|
const elements = [{ v: 1 }, { v: 2 }, { v: 3 }];
|
|
178
189
|
|
|
179
190
|
for (const el of s0) {
|
|
@@ -189,6 +200,7 @@ describe('ISetMapped.keys', () => {
|
|
|
189
200
|
toKey,
|
|
190
201
|
fromKey,
|
|
191
202
|
);
|
|
203
|
+
|
|
192
204
|
const elements = [{ v: 1 }, { v: 2 }, { v: 3 }];
|
|
193
205
|
|
|
194
206
|
for (const k of s0.keys()) {
|
|
@@ -204,6 +216,7 @@ describe('ISetMapped.values', () => {
|
|
|
204
216
|
toKey,
|
|
205
217
|
fromKey,
|
|
206
218
|
);
|
|
219
|
+
|
|
207
220
|
const elements = [{ v: 1 }, { v: 2 }, { v: 3 }];
|
|
208
221
|
|
|
209
222
|
for (const v of s0.values()) {
|
|
@@ -219,10 +232,12 @@ describe('ISetMapped.entries', () => {
|
|
|
219
232
|
toKey,
|
|
220
233
|
fromKey,
|
|
221
234
|
);
|
|
235
|
+
|
|
222
236
|
const elements = [{ v: 1 }, { v: 2 }, { v: 3 }];
|
|
223
237
|
|
|
224
238
|
for (const [k, v] of s0.entries()) {
|
|
225
239
|
expect(elements).toContainEqual(k);
|
|
240
|
+
|
|
226
241
|
expect(elements).toContainEqual(v);
|
|
227
242
|
|
|
228
243
|
assert.deepStrictEqual(k, v);
|
|
@@ -237,6 +252,7 @@ describe('ISetMapped.subtract', () => {
|
|
|
237
252
|
toKey,
|
|
238
253
|
fromKey,
|
|
239
254
|
);
|
|
255
|
+
|
|
240
256
|
const s1 = ISetMapped.create([{ v: 2 }, { v: 4 }], toKey, fromKey);
|
|
241
257
|
|
|
242
258
|
assert.deepStrictEqual(
|
|
@@ -251,6 +267,7 @@ describe('ISetMapped.subtract', () => {
|
|
|
251
267
|
toKey,
|
|
252
268
|
fromKey,
|
|
253
269
|
);
|
|
270
|
+
|
|
254
271
|
const s1 = ISetMapped.create([], toKey, fromKey);
|
|
255
272
|
|
|
256
273
|
assert.deepStrictEqual(
|
|
@@ -261,6 +278,7 @@ describe('ISetMapped.subtract', () => {
|
|
|
261
278
|
|
|
262
279
|
test('case 3', () => {
|
|
263
280
|
const s0 = ISetMapped.create([], toKey, fromKey);
|
|
281
|
+
|
|
264
282
|
const s1 = ISetMapped.create(
|
|
265
283
|
[{ v: 1 }, { v: 2 }, { v: 3 }],
|
|
266
284
|
toKey,
|
|
@@ -281,6 +299,7 @@ describe('ISetMapped.diff', () => {
|
|
|
281
299
|
toKey,
|
|
282
300
|
fromKey,
|
|
283
301
|
);
|
|
302
|
+
|
|
284
303
|
const s1 = ISetMapped.create(
|
|
285
304
|
[{ v: 2 }, { v: 3 }, { v: 4 }],
|
|
286
305
|
toKey,
|
|
@@ -293,6 +312,7 @@ describe('ISetMapped.diff', () => {
|
|
|
293
312
|
diff.deleted,
|
|
294
313
|
ISetMapped.create([{ v: 1 }], toKey, fromKey),
|
|
295
314
|
);
|
|
315
|
+
|
|
296
316
|
assert.deepStrictEqual(
|
|
297
317
|
diff.added,
|
|
298
318
|
ISetMapped.create([{ v: 4 }], toKey, fromKey),
|
|
@@ -305,6 +325,7 @@ describe('ISetMapped.diff', () => {
|
|
|
305
325
|
toKey,
|
|
306
326
|
fromKey,
|
|
307
327
|
);
|
|
328
|
+
|
|
308
329
|
const s1 = ISetMapped.create([], toKey, fromKey);
|
|
309
330
|
|
|
310
331
|
const diff = ISetMapped.diff(s0, s1);
|
|
@@ -313,11 +334,13 @@ describe('ISetMapped.diff', () => {
|
|
|
313
334
|
diff.deleted,
|
|
314
335
|
ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
|
|
315
336
|
);
|
|
337
|
+
|
|
316
338
|
assert.deepStrictEqual(diff.added, ISetMapped.create([], toKey, fromKey));
|
|
317
339
|
});
|
|
318
340
|
|
|
319
341
|
test('case 3', () => {
|
|
320
342
|
const s0 = ISetMapped.create([], toKey, fromKey);
|
|
343
|
+
|
|
321
344
|
const s1 = ISetMapped.create(
|
|
322
345
|
[{ v: 1 }, { v: 2 }, { v: 3 }],
|
|
323
346
|
toKey,
|
|
@@ -327,6 +350,7 @@ describe('ISetMapped.diff', () => {
|
|
|
327
350
|
const diff = ISetMapped.diff(s0, s1);
|
|
328
351
|
|
|
329
352
|
assert.deepStrictEqual(diff.deleted, ISetMapped.create([], toKey, fromKey));
|
|
353
|
+
|
|
330
354
|
assert.deepStrictEqual(
|
|
331
355
|
diff.added,
|
|
332
356
|
ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
|
|
@@ -341,6 +365,7 @@ describe('ISetMapped.union', () => {
|
|
|
341
365
|
toKey,
|
|
342
366
|
fromKey,
|
|
343
367
|
);
|
|
368
|
+
|
|
344
369
|
const s1 = ISetMapped.create(
|
|
345
370
|
[{ v: 3 }, { v: 4 }, { v: 5 }],
|
|
346
371
|
toKey,
|
|
@@ -363,6 +388,7 @@ describe('ISetMapped.union', () => {
|
|
|
363
388
|
toKey,
|
|
364
389
|
fromKey,
|
|
365
390
|
);
|
|
391
|
+
|
|
366
392
|
const s1 = ISetMapped.create([], toKey, fromKey);
|
|
367
393
|
|
|
368
394
|
assert.deepStrictEqual(
|
|
@@ -373,6 +399,7 @@ describe('ISetMapped.union', () => {
|
|
|
373
399
|
|
|
374
400
|
test('case 3', () => {
|
|
375
401
|
const s0 = ISetMapped.create([], toKey, fromKey);
|
|
402
|
+
|
|
376
403
|
const s1 = ISetMapped.create(
|
|
377
404
|
[{ v: 1 }, { v: 2 }, { v: 3 }],
|
|
378
405
|
toKey,
|
|
@@ -393,6 +420,7 @@ describe('ISetMapped.intersection', () => {
|
|
|
393
420
|
toKey,
|
|
394
421
|
fromKey,
|
|
395
422
|
);
|
|
423
|
+
|
|
396
424
|
const s1 = ISetMapped.create(
|
|
397
425
|
[{ v: 2 }, { v: 3 }, { v: 4 }],
|
|
398
426
|
toKey,
|
|
@@ -411,6 +439,7 @@ describe('ISetMapped.intersection', () => {
|
|
|
411
439
|
toKey,
|
|
412
440
|
fromKey,
|
|
413
441
|
);
|
|
442
|
+
|
|
414
443
|
const s1 = ISetMapped.create([], toKey, fromKey);
|
|
415
444
|
|
|
416
445
|
assert.deepStrictEqual(
|
|
@@ -421,6 +450,7 @@ describe('ISetMapped.intersection', () => {
|
|
|
421
450
|
|
|
422
451
|
test('case 3', () => {
|
|
423
452
|
const s0 = ISetMapped.create([], toKey, fromKey);
|
|
453
|
+
|
|
424
454
|
const s1 = ISetMapped.create(
|
|
425
455
|
[{ v: 1 }, { v: 2 }, { v: 3 }],
|
|
426
456
|
toKey,
|
|
@@ -457,7 +487,9 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
457
487
|
);
|
|
458
488
|
|
|
459
489
|
expect(set.size).toBe(2);
|
|
490
|
+
|
|
460
491
|
expect(set.has({ id: 1, type: 'user' })).toBe(true);
|
|
492
|
+
|
|
461
493
|
expect(set.has({ id: 2, type: 'admin' })).toBe(true);
|
|
462
494
|
});
|
|
463
495
|
|
|
@@ -486,6 +518,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
486
518
|
testElementToString,
|
|
487
519
|
stringToTestElement,
|
|
488
520
|
);
|
|
521
|
+
|
|
489
522
|
const set2 = ISetMapped.create(
|
|
490
523
|
[
|
|
491
524
|
{ id: 2, type: 'admin' },
|
|
@@ -507,6 +540,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
507
540
|
testElementToString,
|
|
508
541
|
stringToTestElement,
|
|
509
542
|
);
|
|
543
|
+
|
|
510
544
|
const set2 = ISetMapped.create(
|
|
511
545
|
[
|
|
512
546
|
{ id: 1, type: 'user' },
|
|
@@ -525,6 +559,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
525
559
|
testElementToString,
|
|
526
560
|
stringToTestElement,
|
|
527
561
|
);
|
|
562
|
+
|
|
528
563
|
const set2 = ISetMapped.create<TestElement, string>(
|
|
529
564
|
[],
|
|
530
565
|
testElementToString,
|
|
@@ -546,6 +581,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
546
581
|
testElementToString,
|
|
547
582
|
stringToTestElement,
|
|
548
583
|
);
|
|
584
|
+
|
|
549
585
|
const newSet = ISetMapped.create(
|
|
550
586
|
[
|
|
551
587
|
{ id: 2, type: 'admin' },
|
|
@@ -559,9 +595,11 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
559
595
|
const diff = ISetMapped.diff(oldSet, newSet);
|
|
560
596
|
|
|
561
597
|
expect(diff.deleted.size).toBe(1);
|
|
598
|
+
|
|
562
599
|
expect(diff.deleted.has({ id: 1, type: 'user' })).toBe(true);
|
|
563
600
|
|
|
564
601
|
expect(diff.added.size).toBe(1);
|
|
602
|
+
|
|
565
603
|
expect(diff.added.has({ id: 4, type: 'user' })).toBe(true);
|
|
566
604
|
});
|
|
567
605
|
|
|
@@ -574,6 +612,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
574
612
|
testElementToString,
|
|
575
613
|
stringToTestElement,
|
|
576
614
|
);
|
|
615
|
+
|
|
577
616
|
const set2 = ISetMapped.create(
|
|
578
617
|
[
|
|
579
618
|
{ id: 1, type: 'user' },
|
|
@@ -586,6 +625,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
586
625
|
const diff = ISetMapped.diff(set1, set2);
|
|
587
626
|
|
|
588
627
|
expect(diff.deleted.size).toBe(0);
|
|
628
|
+
|
|
589
629
|
expect(diff.added.size).toBe(0);
|
|
590
630
|
});
|
|
591
631
|
});
|
|
@@ -601,6 +641,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
601
641
|
testElementToString,
|
|
602
642
|
stringToTestElement,
|
|
603
643
|
);
|
|
644
|
+
|
|
604
645
|
const set2 = ISetMapped.create(
|
|
605
646
|
[
|
|
606
647
|
{ id: 2, type: 'admin' },
|
|
@@ -614,7 +655,9 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
614
655
|
const intersection = ISetMapped.intersection(set1, set2);
|
|
615
656
|
|
|
616
657
|
expect(intersection.size).toBe(2);
|
|
658
|
+
|
|
617
659
|
expect(intersection.has({ id: 2, type: 'admin' })).toBe(true);
|
|
660
|
+
|
|
618
661
|
expect(intersection.has({ id: 3, type: 'guest' })).toBe(true);
|
|
619
662
|
});
|
|
620
663
|
|
|
@@ -627,6 +670,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
627
670
|
testElementToString,
|
|
628
671
|
stringToTestElement,
|
|
629
672
|
);
|
|
673
|
+
|
|
630
674
|
const set2 = ISetMapped.create(
|
|
631
675
|
[
|
|
632
676
|
{ id: 3, type: 'guest' },
|
|
@@ -639,9 +683,13 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
639
683
|
const union = ISetMapped.union(set1, set2);
|
|
640
684
|
|
|
641
685
|
expect(union.size).toBe(4);
|
|
686
|
+
|
|
642
687
|
expect(union.has({ id: 1, type: 'user' })).toBe(true);
|
|
688
|
+
|
|
643
689
|
expect(union.has({ id: 2, type: 'admin' })).toBe(true);
|
|
690
|
+
|
|
644
691
|
expect(union.has({ id: 3, type: 'guest' })).toBe(true);
|
|
692
|
+
|
|
645
693
|
expect(union.has({ id: 4, type: 'user' })).toBe(true);
|
|
646
694
|
});
|
|
647
695
|
});
|
|
@@ -709,10 +757,13 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
709
757
|
testElementToString,
|
|
710
758
|
stringToTestElement,
|
|
711
759
|
);
|
|
760
|
+
|
|
712
761
|
const updated = set.add({ id: 2, type: 'admin' });
|
|
713
762
|
|
|
714
763
|
expect(updated.size).toBe(2);
|
|
764
|
+
|
|
715
765
|
expect(updated.has({ id: 1, type: 'user' })).toBe(true);
|
|
766
|
+
|
|
716
767
|
expect(updated.has({ id: 2, type: 'admin' })).toBe(true);
|
|
717
768
|
});
|
|
718
769
|
|
|
@@ -722,6 +773,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
722
773
|
testElementToString,
|
|
723
774
|
stringToTestElement,
|
|
724
775
|
);
|
|
776
|
+
|
|
725
777
|
const updated = set.add({ id: 1, type: 'user' });
|
|
726
778
|
|
|
727
779
|
expect(updated).toBe(set);
|
|
@@ -738,10 +790,13 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
738
790
|
testElementToString,
|
|
739
791
|
stringToTestElement,
|
|
740
792
|
);
|
|
793
|
+
|
|
741
794
|
const updated = set.delete({ id: 1, type: 'user' });
|
|
742
795
|
|
|
743
796
|
expect(updated.size).toBe(1);
|
|
797
|
+
|
|
744
798
|
expect(updated.has({ id: 1, type: 'user' })).toBe(false);
|
|
799
|
+
|
|
745
800
|
expect(updated.has({ id: 2, type: 'admin' })).toBe(true);
|
|
746
801
|
});
|
|
747
802
|
|
|
@@ -751,6 +806,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
751
806
|
testElementToString,
|
|
752
807
|
stringToTestElement,
|
|
753
808
|
);
|
|
809
|
+
|
|
754
810
|
const updated = set.delete({ id: 2, type: 'admin' });
|
|
755
811
|
|
|
756
812
|
expect(updated).toBe(set);
|
|
@@ -772,8 +828,11 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
772
828
|
]);
|
|
773
829
|
|
|
774
830
|
expect(updated.size).toBe(2);
|
|
831
|
+
|
|
775
832
|
expect(updated.has({ id: 1, type: 'user' })).toBe(false);
|
|
833
|
+
|
|
776
834
|
expect(updated.has({ id: 2, type: 'admin' })).toBe(true);
|
|
835
|
+
|
|
777
836
|
expect(updated.has({ id: 3, type: 'guest' })).toBe(true);
|
|
778
837
|
});
|
|
779
838
|
|
|
@@ -783,9 +842,11 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
783
842
|
testElementToString,
|
|
784
843
|
stringToTestElement,
|
|
785
844
|
);
|
|
845
|
+
|
|
786
846
|
const updated = set.withMutations([]);
|
|
787
847
|
|
|
788
848
|
expect(updated.size).toBe(1);
|
|
849
|
+
|
|
789
850
|
expect(ISetMapped.equal(set, updated)).toBe(true);
|
|
790
851
|
});
|
|
791
852
|
});
|
|
@@ -800,13 +861,16 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
800
861
|
testElementToString,
|
|
801
862
|
stringToTestElement,
|
|
802
863
|
);
|
|
864
|
+
|
|
803
865
|
const transformed = set.map((el) => ({
|
|
804
866
|
...el,
|
|
805
867
|
type: el.type.toUpperCase(),
|
|
806
868
|
}));
|
|
807
869
|
|
|
808
870
|
expect(transformed.size).toBe(2);
|
|
871
|
+
|
|
809
872
|
expect(transformed.has({ id: 1, type: 'USER' })).toBe(true);
|
|
873
|
+
|
|
810
874
|
expect(transformed.has({ id: 2, type: 'ADMIN' })).toBe(true);
|
|
811
875
|
});
|
|
812
876
|
});
|
|
@@ -822,11 +886,15 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
822
886
|
testElementToString,
|
|
823
887
|
stringToTestElement,
|
|
824
888
|
);
|
|
889
|
+
|
|
825
890
|
const filtered = set.filter((el) => el.type === 'user');
|
|
826
891
|
|
|
827
892
|
expect(filtered.size).toBe(2);
|
|
893
|
+
|
|
828
894
|
expect(filtered.has({ id: 1, type: 'user' })).toBe(true);
|
|
895
|
+
|
|
829
896
|
expect(filtered.has({ id: 3, type: 'user' })).toBe(true);
|
|
897
|
+
|
|
830
898
|
expect(filtered.has({ id: 2, type: 'admin' })).toBe(false);
|
|
831
899
|
});
|
|
832
900
|
});
|
|
@@ -842,11 +910,15 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
842
910
|
testElementToString,
|
|
843
911
|
stringToTestElement,
|
|
844
912
|
);
|
|
913
|
+
|
|
845
914
|
const filtered = set.filterNot((el) => el.type === 'user');
|
|
846
915
|
|
|
847
916
|
expect(filtered.size).toBe(1);
|
|
917
|
+
|
|
848
918
|
expect(filtered.has({ id: 2, type: 'admin' })).toBe(true);
|
|
919
|
+
|
|
849
920
|
expect(filtered.has({ id: 1, type: 'user' })).toBe(false);
|
|
921
|
+
|
|
850
922
|
expect(filtered.has({ id: 3, type: 'user' })).toBe(false);
|
|
851
923
|
});
|
|
852
924
|
});
|
|
@@ -861,6 +933,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
861
933
|
testElementToString,
|
|
862
934
|
stringToTestElement,
|
|
863
935
|
);
|
|
936
|
+
|
|
864
937
|
const mut_collected: TestElement[] = [];
|
|
865
938
|
|
|
866
939
|
for (const el of set) {
|
|
@@ -868,7 +941,9 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
868
941
|
}
|
|
869
942
|
|
|
870
943
|
expect(mut_collected).toHaveLength(2);
|
|
944
|
+
|
|
871
945
|
expect(mut_collected).toContainEqual({ id: 1, type: 'user' });
|
|
946
|
+
|
|
872
947
|
expect(mut_collected).toContainEqual({ id: 2, type: 'admin' });
|
|
873
948
|
});
|
|
874
949
|
});
|
|
@@ -880,6 +955,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
880
955
|
testElementToString,
|
|
881
956
|
stringToTestElement,
|
|
882
957
|
);
|
|
958
|
+
|
|
883
959
|
const superset = ISetMapped.create(
|
|
884
960
|
[
|
|
885
961
|
{ id: 1, type: 'user' },
|
|
@@ -901,6 +977,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
901
977
|
testElementToString,
|
|
902
978
|
stringToTestElement,
|
|
903
979
|
);
|
|
980
|
+
|
|
904
981
|
const set2 = ISetMapped.create(
|
|
905
982
|
[
|
|
906
983
|
{ id: 1, type: 'user' },
|
|
@@ -924,6 +1001,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
924
1001
|
testElementToString,
|
|
925
1002
|
stringToTestElement,
|
|
926
1003
|
);
|
|
1004
|
+
|
|
927
1005
|
const subset = ISetMapped.create(
|
|
928
1006
|
[{ id: 1, type: 'user' }],
|
|
929
1007
|
testElementToString,
|
|
@@ -942,6 +1020,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
942
1020
|
testElementToString,
|
|
943
1021
|
stringToTestElement,
|
|
944
1022
|
);
|
|
1023
|
+
|
|
945
1024
|
const set2 = ISetMapped.create(
|
|
946
1025
|
[
|
|
947
1026
|
{ id: 1, type: 'user' },
|
|
@@ -966,6 +1045,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
966
1045
|
testElementToString,
|
|
967
1046
|
stringToTestElement,
|
|
968
1047
|
);
|
|
1048
|
+
|
|
969
1049
|
const set2 = ISetMapped.create(
|
|
970
1050
|
[
|
|
971
1051
|
{ id: 2, type: 'admin' },
|
|
@@ -974,11 +1054,15 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
974
1054
|
testElementToString,
|
|
975
1055
|
stringToTestElement,
|
|
976
1056
|
);
|
|
1057
|
+
|
|
977
1058
|
const result = set1.subtract(set2);
|
|
978
1059
|
|
|
979
1060
|
expect(result.size).toBe(2);
|
|
1061
|
+
|
|
980
1062
|
expect(result.has({ id: 1, type: 'user' })).toBe(true);
|
|
1063
|
+
|
|
981
1064
|
expect(result.has({ id: 3, type: 'guest' })).toBe(true);
|
|
1065
|
+
|
|
982
1066
|
expect(result.has({ id: 2, type: 'admin' })).toBe(false);
|
|
983
1067
|
});
|
|
984
1068
|
});
|
|
@@ -994,6 +1078,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
994
1078
|
testElementToString,
|
|
995
1079
|
stringToTestElement,
|
|
996
1080
|
);
|
|
1081
|
+
|
|
997
1082
|
const set2 = ISetMapped.create(
|
|
998
1083
|
[
|
|
999
1084
|
{ id: 2, type: 'admin' },
|
|
@@ -1003,11 +1088,15 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
1003
1088
|
testElementToString,
|
|
1004
1089
|
stringToTestElement,
|
|
1005
1090
|
);
|
|
1091
|
+
|
|
1006
1092
|
const result = set1.intersect(set2);
|
|
1007
1093
|
|
|
1008
1094
|
expect(result.size).toBe(2);
|
|
1095
|
+
|
|
1009
1096
|
expect(result.has({ id: 2, type: 'admin' })).toBe(true);
|
|
1097
|
+
|
|
1010
1098
|
expect(result.has({ id: 3, type: 'guest' })).toBe(true);
|
|
1099
|
+
|
|
1011
1100
|
expect(result.has({ id: 1, type: 'user' })).toBe(false);
|
|
1012
1101
|
});
|
|
1013
1102
|
});
|
|
@@ -1022,6 +1111,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
1022
1111
|
testElementToString,
|
|
1023
1112
|
stringToTestElement,
|
|
1024
1113
|
);
|
|
1114
|
+
|
|
1025
1115
|
const set2 = ISetMapped.create(
|
|
1026
1116
|
[
|
|
1027
1117
|
{ id: 3, type: 'guest' },
|
|
@@ -1030,12 +1120,17 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
1030
1120
|
testElementToString,
|
|
1031
1121
|
stringToTestElement,
|
|
1032
1122
|
);
|
|
1123
|
+
|
|
1033
1124
|
const result = set1.union(set2);
|
|
1034
1125
|
|
|
1035
1126
|
expect(result.size).toBe(4);
|
|
1127
|
+
|
|
1036
1128
|
expect(result.has({ id: 1, type: 'user' })).toBe(true);
|
|
1129
|
+
|
|
1037
1130
|
expect(result.has({ id: 2, type: 'admin' })).toBe(true);
|
|
1131
|
+
|
|
1038
1132
|
expect(result.has({ id: 3, type: 'guest' })).toBe(true);
|
|
1133
|
+
|
|
1039
1134
|
expect(result.has({ id: 4, type: 'user' })).toBe(true);
|
|
1040
1135
|
});
|
|
1041
1136
|
});
|
|
@@ -1050,10 +1145,13 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
1050
1145
|
testElementToString,
|
|
1051
1146
|
stringToTestElement,
|
|
1052
1147
|
);
|
|
1148
|
+
|
|
1053
1149
|
const keys = Array.from(set.keys());
|
|
1054
1150
|
|
|
1055
1151
|
expect(keys).toHaveLength(2);
|
|
1152
|
+
|
|
1056
1153
|
expect(keys).toContainEqual({ id: 1, type: 'user' });
|
|
1154
|
+
|
|
1057
1155
|
expect(keys).toContainEqual({ id: 2, type: 'admin' });
|
|
1058
1156
|
});
|
|
1059
1157
|
|
|
@@ -1066,10 +1164,13 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
1066
1164
|
testElementToString,
|
|
1067
1165
|
stringToTestElement,
|
|
1068
1166
|
);
|
|
1167
|
+
|
|
1069
1168
|
const values = Array.from(set.values());
|
|
1070
1169
|
|
|
1071
1170
|
expect(values).toHaveLength(2);
|
|
1171
|
+
|
|
1072
1172
|
expect(values).toContainEqual({ id: 1, type: 'user' });
|
|
1173
|
+
|
|
1073
1174
|
expect(values).toContainEqual({ id: 2, type: 'admin' });
|
|
1074
1175
|
});
|
|
1075
1176
|
|
|
@@ -1082,6 +1183,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
1082
1183
|
testElementToString,
|
|
1083
1184
|
stringToTestElement,
|
|
1084
1185
|
);
|
|
1186
|
+
|
|
1085
1187
|
const entries = Array.from(set.entries());
|
|
1086
1188
|
|
|
1087
1189
|
expect(entries).toHaveLength(2);
|
|
@@ -1100,6 +1202,7 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
1100
1202
|
testElementToString,
|
|
1101
1203
|
stringToTestElement,
|
|
1102
1204
|
);
|
|
1205
|
+
|
|
1103
1206
|
const mut_collected: TestElement[] = [];
|
|
1104
1207
|
|
|
1105
1208
|
for (const element of set) {
|
|
@@ -1107,7 +1210,9 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
1107
1210
|
}
|
|
1108
1211
|
|
|
1109
1212
|
expect(mut_collected).toHaveLength(2);
|
|
1213
|
+
|
|
1110
1214
|
expect(mut_collected).toContainEqual({ id: 1, type: 'user' });
|
|
1215
|
+
|
|
1111
1216
|
expect(mut_collected).toContainEqual({ id: 2, type: 'admin' });
|
|
1112
1217
|
});
|
|
1113
1218
|
});
|
|
@@ -1122,10 +1227,13 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
1122
1227
|
testElementToString,
|
|
1123
1228
|
stringToTestElement,
|
|
1124
1229
|
);
|
|
1230
|
+
|
|
1125
1231
|
const array = set.toArray();
|
|
1126
1232
|
|
|
1127
1233
|
expect(array).toHaveLength(2);
|
|
1234
|
+
|
|
1128
1235
|
expect(array).toContainEqual({ id: 1, type: 'user' });
|
|
1236
|
+
|
|
1129
1237
|
expect(array).toContainEqual({ id: 2, type: 'admin' });
|
|
1130
1238
|
});
|
|
1131
1239
|
|
|
@@ -1138,10 +1246,13 @@ describe('ISetMapped additional functionality with complex types', () => {
|
|
|
1138
1246
|
testElementToString,
|
|
1139
1247
|
stringToTestElement,
|
|
1140
1248
|
);
|
|
1249
|
+
|
|
1141
1250
|
const rawSet = set.toRawSet();
|
|
1142
1251
|
|
|
1143
1252
|
expect(rawSet.size).toBe(2);
|
|
1253
|
+
|
|
1144
1254
|
expect(rawSet.has('user_1')).toBe(true);
|
|
1255
|
+
|
|
1145
1256
|
expect(rawSet.has('admin_2')).toBe(true);
|
|
1146
1257
|
});
|
|
1147
1258
|
});
|