ts-data-forge 9.0.0 → 10.0.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 +1 -1
- package/dist/array/impl/array-utils-creation.d.mts +4 -4
- package/dist/array/impl/array-utils-creation.d.mts.map +1 -1
- package/dist/array/impl/array-utils-creation.mjs +17 -112
- package/dist/array/impl/array-utils-creation.mjs.map +1 -1
- package/dist/array/impl/array-utils-element-access.d.mts.map +1 -1
- package/dist/array/impl/array-utils-element-access.mjs +22 -61
- package/dist/array/impl/array-utils-element-access.mjs.map +1 -1
- package/dist/array/impl/array-utils-iterators.d.mts.map +1 -1
- package/dist/array/impl/array-utils-iterators.mjs +9 -63
- package/dist/array/impl/array-utils-iterators.mjs.map +1 -1
- package/dist/array/impl/array-utils-modification.d.mts +7 -7
- package/dist/array/impl/array-utils-modification.d.mts.map +1 -1
- package/dist/array/impl/array-utils-modification.mjs +78 -78
- package/dist/array/impl/array-utils-modification.mjs.map +1 -1
- package/dist/array/impl/array-utils-reducing-value.mjs +95 -89
- package/dist/array/impl/array-utils-reducing-value.mjs.map +1 -1
- package/dist/array/impl/array-utils-search.mjs +100 -92
- package/dist/array/impl/array-utils-search.mjs.map +1 -1
- package/dist/array/impl/array-utils-set-op.d.mts.map +1 -1
- package/dist/array/impl/array-utils-set-op.mjs +31 -141
- package/dist/array/impl/array-utils-set-op.mjs.map +1 -1
- package/dist/array/impl/array-utils-size.d.mts.map +1 -1
- package/dist/array/impl/array-utils-size.mjs +4 -8
- package/dist/array/impl/array-utils-size.mjs.map +1 -1
- package/dist/array/impl/array-utils-slice-clamped.mjs +11 -12
- package/dist/array/impl/array-utils-slice-clamped.mjs.map +1 -1
- package/dist/array/impl/array-utils-slicing.d.mts.map +1 -1
- package/dist/array/impl/array-utils-slicing.mjs +44 -96
- package/dist/array/impl/array-utils-slicing.mjs.map +1 -1
- package/dist/array/impl/array-utils-transformation.d.mts +4 -4
- package/dist/array/impl/array-utils-transformation.d.mts.map +1 -1
- package/dist/array/impl/array-utils-transformation.mjs +150 -292
- package/dist/array/impl/array-utils-transformation.mjs.map +1 -1
- package/dist/array/impl/array-utils-validation.d.mts +17 -17
- package/dist/array/impl/array-utils-validation.d.mts.map +1 -1
- package/dist/array/impl/array-utils-validation.mjs +23 -174
- package/dist/array/impl/array-utils-validation.mjs.map +1 -1
- package/dist/array/impl/index.mjs +1 -1
- package/dist/collections/imap-mapped.d.mts.map +1 -1
- package/dist/collections/imap-mapped.mjs +243 -330
- package/dist/collections/imap-mapped.mjs.map +1 -1
- package/dist/collections/imap.d.mts.map +1 -1
- package/dist/collections/imap.mjs +190 -275
- package/dist/collections/imap.mjs.map +1 -1
- package/dist/collections/iset-mapped.d.mts +1 -1
- package/dist/collections/iset-mapped.d.mts.map +1 -1
- package/dist/collections/iset-mapped.mjs +222 -444
- package/dist/collections/iset-mapped.mjs.map +1 -1
- package/dist/collections/iset.d.mts +1 -1
- package/dist/collections/iset.d.mts.map +1 -1
- package/dist/collections/iset.mjs +158 -324
- package/dist/collections/iset.mjs.map +1 -1
- package/dist/collections/queue.d.mts.map +1 -1
- package/dist/collections/queue.mjs +106 -178
- package/dist/collections/queue.mjs.map +1 -1
- package/dist/collections/stack.d.mts.map +1 -1
- package/dist/collections/stack.mjs +95 -165
- package/dist/collections/stack.mjs.map +1 -1
- package/dist/entry-point.mjs +2 -0
- package/dist/entry-point.mjs.map +1 -1
- package/dist/expect-type.d.mts +1 -1
- package/dist/expect-type.d.mts.map +1 -1
- package/dist/expect-type.mjs +1 -69
- package/dist/expect-type.mjs.map +1 -1
- package/dist/functional/match.mjs +9 -9
- package/dist/functional/match.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-expect-to-be.mjs +13 -14
- package/dist/functional/optional/impl/optional-expect-to-be.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-filter.mjs +14 -15
- package/dist/functional/optional/impl/optional-filter.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-flat-map.mjs +10 -11
- package/dist/functional/optional/impl/optional-flat-map.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-from-nullable.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-from-nullable.mjs +1 -25
- package/dist/functional/optional/impl/optional-from-nullable.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-is-none.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-is-none.mjs +0 -19
- package/dist/functional/optional/impl/optional-is-none.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-is-optional.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-is-optional.mjs +1 -23
- package/dist/functional/optional/impl/optional-is-optional.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-is-some.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-is-some.mjs +0 -20
- package/dist/functional/optional/impl/optional-is-some.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-map.mjs +13 -14
- package/dist/functional/optional/impl/optional-map.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-none.mjs +0 -16
- package/dist/functional/optional/impl/optional-none.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-or-else.mjs +10 -11
- package/dist/functional/optional/impl/optional-or-else.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-some.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-some.mjs +2 -21
- package/dist/functional/optional/impl/optional-some.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-to-nullable.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-to-nullable.mjs +1 -27
- package/dist/functional/optional/impl/optional-to-nullable.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-or.mjs +9 -10
- package/dist/functional/optional/impl/optional-unwrap-or.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-throw.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-throw.mjs +4 -32
- package/dist/functional/optional/impl/optional-unwrap-throw.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap.mjs +4 -4
- package/dist/functional/optional/impl/optional-unwrap.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-zip.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-zip.mjs +1 -35
- package/dist/functional/optional/impl/optional-zip.mjs.map +1 -1
- package/dist/functional/optional/impl/tag.mjs +2 -3
- package/dist/functional/optional/impl/tag.mjs.map +1 -1
- package/dist/functional/pipe.d.mts.map +1 -1
- package/dist/functional/pipe.mjs +9 -34
- package/dist/functional/pipe.mjs.map +1 -1
- package/dist/functional/result/impl/result-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-err.mjs +2 -27
- package/dist/functional/result/impl/result-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-expect-to-be.mjs +13 -15
- package/dist/functional/result/impl/result-expect-to-be.mjs.map +1 -1
- package/dist/functional/result/impl/result-flat-map.mjs +16 -16
- package/dist/functional/result/impl/result-flat-map.mjs.map +1 -1
- package/dist/functional/result/impl/result-fold.mjs +16 -16
- package/dist/functional/result/impl/result-fold.mjs.map +1 -1
- package/dist/functional/result/impl/result-from-promise.d.mts.map +1 -1
- package/dist/functional/result/impl/result-from-promise.mjs +4 -31
- package/dist/functional/result/impl/result-from-promise.mjs.map +1 -1
- package/dist/functional/result/impl/result-from-throwable.d.mts.map +1 -1
- package/dist/functional/result/impl/result-from-throwable.mjs +8 -38
- package/dist/functional/result/impl/result-from-throwable.mjs.map +1 -1
- package/dist/functional/result/impl/result-is-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-is-err.mjs +0 -19
- package/dist/functional/result/impl/result-is-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-is-ok.d.mts.map +1 -1
- package/dist/functional/result/impl/result-is-ok.mjs +0 -19
- package/dist/functional/result/impl/result-is-ok.mjs.map +1 -1
- package/dist/functional/result/impl/result-is-result.d.mts.map +1 -1
- package/dist/functional/result/impl/result-is-result.mjs +1 -23
- package/dist/functional/result/impl/result-is-result.mjs.map +1 -1
- package/dist/functional/result/impl/result-map-err.mjs +16 -16
- package/dist/functional/result/impl/result-map-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-map.mjs +16 -16
- package/dist/functional/result/impl/result-map.mjs.map +1 -1
- package/dist/functional/result/impl/result-ok.d.mts.map +1 -1
- package/dist/functional/result/impl/result-ok.mjs +2 -27
- package/dist/functional/result/impl/result-ok.mjs.map +1 -1
- package/dist/functional/result/impl/result-or-else.mjs +10 -12
- package/dist/functional/result/impl/result-or-else.mjs.map +1 -1
- package/dist/functional/result/impl/result-swap.d.mts.map +1 -1
- package/dist/functional/result/impl/result-swap.mjs +4 -22
- package/dist/functional/result/impl/result-swap.mjs.map +1 -1
- package/dist/functional/result/impl/result-to-optional.d.mts.map +1 -1
- package/dist/functional/result/impl/result-to-optional.mjs +0 -27
- package/dist/functional/result/impl/result-to-optional.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-or.mjs +9 -11
- package/dist/functional/result/impl/result-unwrap-err-or.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-throw.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-throw.mjs +13 -40
- package/dist/functional/result/impl/result-unwrap-err-throw.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err.mjs +4 -32
- package/dist/functional/result/impl/result-unwrap-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-ok-or.mjs +9 -11
- package/dist/functional/result/impl/result-unwrap-ok-or.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-ok.mjs +4 -4
- package/dist/functional/result/impl/result-unwrap-ok.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-throw.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-throw.mjs +4 -35
- package/dist/functional/result/impl/result-unwrap-throw.mjs.map +1 -1
- package/dist/functional/result/impl/result-zip.d.mts.map +1 -1
- package/dist/functional/result/impl/result-zip.mjs +1 -34
- package/dist/functional/result/impl/result-zip.mjs.map +1 -1
- package/dist/functional/result/impl/tag.mjs +2 -3
- package/dist/functional/result/impl/tag.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/tag.mjs +3 -5
- package/dist/functional/ternary-result/impl/tag.mjs.map +1 -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 +2 -15
- package/dist/functional/ternary-result/impl/ternary-result-err.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.mjs +13 -13
- 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.mjs +27 -26
- package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-fold.mjs +21 -22
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs +4 -20
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs +7 -25
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-err.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-err.mjs +0 -17
- package/dist/functional/ternary-result/impl/ternary-result-is-err.mjs.map +1 -1
- 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 +0 -19
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs +1 -25
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs +0 -18
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs +13 -15
- package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs +18 -18
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map.mjs +21 -22
- package/dist/functional/ternary-result/impl/ternary-result-map.mjs.map +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 +2 -16
- package/dist/functional/ternary-result/impl/ternary-result-ok.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-or-else.mjs +9 -9
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs +4 -22
- 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.mjs +9 -9
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs +12 -27
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs +4 -19
- 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.mjs +9 -9
- 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.mjs +4 -5
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs +15 -27
- 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.mjs +9 -9
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs +10 -24
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs +4 -19
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-warn.mjs +3 -19
- package/dist/functional/ternary-result/impl/ternary-result-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-zip.mjs +14 -45
- package/dist/functional/ternary-result/impl/ternary-result-zip.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/variant-name.d.mts +1 -1
- package/dist/functional/ternary-result/impl/variant-name.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/variant-name.mjs +8 -9
- package/dist/functional/ternary-result/impl/variant-name.mjs.map +1 -1
- package/dist/guard/as-length-bounded-array.d.mts +117 -0
- package/dist/guard/as-length-bounded-array.d.mts.map +1 -0
- package/dist/guard/as-length-bounded-array.mjs +37 -0
- package/dist/guard/as-length-bounded-array.mjs.map +1 -0
- package/dist/guard/has-key.d.mts.map +1 -1
- package/dist/guard/has-key.mjs +0 -41
- package/dist/guard/has-key.mjs.map +1 -1
- package/dist/guard/index.d.mts +2 -0
- package/dist/guard/index.d.mts.map +1 -1
- package/dist/guard/index.mjs +2 -0
- package/dist/guard/index.mjs.map +1 -1
- package/dist/guard/is-length-bounded-array.d.mts +159 -0
- package/dist/guard/is-length-bounded-array.d.mts.map +1 -0
- package/dist/guard/is-length-bounded-array.mjs +7 -0
- package/dist/guard/is-length-bounded-array.mjs.map +1 -0
- package/dist/guard/is-length-bounded-string.d.mts +5 -6
- package/dist/guard/is-length-bounded-string.d.mts.map +1 -1
- package/dist/guard/is-length-bounded-string.mjs +0 -157
- package/dist/guard/is-length-bounded-string.mjs.map +1 -1
- package/dist/guard/is-non-empty-string.d.mts +1 -1
- package/dist/guard/is-non-empty-string.d.mts.map +1 -1
- package/dist/guard/is-non-empty-string.mjs +1 -38
- package/dist/guard/is-non-empty-string.mjs.map +1 -1
- package/dist/guard/is-non-null-object.d.mts.map +1 -1
- package/dist/guard/is-non-null-object.mjs +1 -35
- package/dist/guard/is-non-null-object.mjs.map +1 -1
- package/dist/guard/is-primitive.d.mts.map +1 -1
- package/dist/guard/is-primitive.mjs +12 -43
- package/dist/guard/is-primitive.mjs.map +1 -1
- package/dist/guard/is-record.d.mts.map +1 -1
- package/dist/guard/is-record.mjs +0 -86
- package/dist/guard/is-record.mjs.map +1 -1
- package/dist/guard/is-type.d.mts.map +1 -1
- package/dist/guard/is-type.mjs +12 -399
- package/dist/guard/is-type.mjs.map +1 -1
- package/dist/guard/key-is-in.d.mts.map +1 -1
- package/dist/guard/key-is-in.mjs +0 -40
- package/dist/guard/key-is-in.mjs.map +1 -1
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/dist/iterator/range.mjs +16 -16
- package/dist/iterator/range.mjs.map +1 -1
- package/dist/json/json.d.mts.map +1 -1
- package/dist/json/json.mjs +52 -340
- package/dist/json/json.mjs.map +1 -1
- package/dist/number/branded-types/finite-number.d.mts +3 -3
- package/dist/number/branded-types/finite-number.mjs +135 -154
- package/dist/number/branded-types/finite-number.mjs.map +1 -1
- package/dist/number/branded-types/int.d.mts +4 -4
- package/dist/number/branded-types/int.mjs +205 -245
- package/dist/number/branded-types/int.mjs.map +1 -1
- package/dist/number/branded-types/int16.d.mts +15 -15
- package/dist/number/branded-types/int16.mjs +116 -123
- package/dist/number/branded-types/int16.mjs.map +1 -1
- package/dist/number/branded-types/int32.d.mts +11 -11
- package/dist/number/branded-types/int32.mjs +116 -123
- package/dist/number/branded-types/int32.mjs.map +1 -1
- package/dist/number/branded-types/negative-finite-number.d.mts +4 -4
- package/dist/number/branded-types/negative-finite-number.mjs +129 -144
- package/dist/number/branded-types/negative-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/negative-int.d.mts +5 -5
- package/dist/number/branded-types/negative-int.mjs +94 -113
- package/dist/number/branded-types/negative-int.mjs.map +1 -1
- package/dist/number/branded-types/negative-safe-int.d.mts +5 -5
- package/dist/number/branded-types/negative-safe-int.mjs +103 -124
- package/dist/number/branded-types/negative-safe-int.mjs.map +1 -1
- package/dist/number/branded-types/non-negative-finite-number.d.mts +5 -5
- package/dist/number/branded-types/non-negative-finite-number.mjs +136 -142
- package/dist/number/branded-types/non-negative-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/non-negative-int16.d.mts +16 -16
- package/dist/number/branded-types/non-negative-int16.mjs +109 -118
- package/dist/number/branded-types/non-negative-int16.mjs.map +1 -1
- package/dist/number/branded-types/non-negative-int32.d.mts +12 -12
- package/dist/number/branded-types/non-negative-int32.mjs +110 -119
- package/dist/number/branded-types/non-negative-int32.mjs.map +1 -1
- package/dist/number/branded-types/non-positive-finite-number.d.mts +3 -3
- package/dist/number/branded-types/non-positive-finite-number.mjs +120 -124
- package/dist/number/branded-types/non-positive-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/non-positive-int.d.mts +4 -4
- package/dist/number/branded-types/non-positive-int.mjs +167 -212
- package/dist/number/branded-types/non-positive-int.mjs.map +1 -1
- package/dist/number/branded-types/non-positive-safe-int.d.mts +4 -4
- package/dist/number/branded-types/non-positive-safe-int.mjs +95 -106
- package/dist/number/branded-types/non-positive-safe-int.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-finite-number.d.mts +4 -4
- package/dist/number/branded-types/non-zero-finite-number.mjs +114 -123
- package/dist/number/branded-types/non-zero-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-int.d.mts +2 -2
- package/dist/number/branded-types/non-zero-int.mjs +72 -83
- package/dist/number/branded-types/non-zero-int.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-int16.d.mts +7 -7
- package/dist/number/branded-types/non-zero-int16.mjs +96 -107
- package/dist/number/branded-types/non-zero-int16.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-int32.d.mts +5 -5
- package/dist/number/branded-types/non-zero-int32.mjs +97 -108
- package/dist/number/branded-types/non-zero-int32.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-safe-int.d.mts +2 -2
- package/dist/number/branded-types/non-zero-safe-int.mjs +100 -111
- package/dist/number/branded-types/non-zero-safe-int.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-uint16.d.mts +8 -8
- package/dist/number/branded-types/non-zero-uint16.mjs +96 -107
- package/dist/number/branded-types/non-zero-uint16.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-uint32.d.mts +6 -6
- package/dist/number/branded-types/non-zero-uint32.mjs +96 -107
- package/dist/number/branded-types/non-zero-uint32.mjs.map +1 -1
- package/dist/number/branded-types/positive-finite-number.d.mts +8 -8
- package/dist/number/branded-types/positive-finite-number.mjs +139 -141
- package/dist/number/branded-types/positive-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/positive-int.d.mts +11 -11
- package/dist/number/branded-types/positive-int.mjs +228 -271
- package/dist/number/branded-types/positive-int.mjs.map +1 -1
- package/dist/number/branded-types/positive-int16.d.mts +19 -19
- package/dist/number/branded-types/positive-int16.mjs +109 -118
- package/dist/number/branded-types/positive-int16.mjs.map +1 -1
- package/dist/number/branded-types/positive-int32.d.mts +15 -15
- package/dist/number/branded-types/positive-int32.mjs +109 -118
- package/dist/number/branded-types/positive-int32.mjs.map +1 -1
- package/dist/number/branded-types/positive-safe-int.d.mts +11 -11
- package/dist/number/branded-types/positive-safe-int.mjs +244 -275
- package/dist/number/branded-types/positive-safe-int.mjs.map +1 -1
- package/dist/number/branded-types/positive-uint16.d.mts +17 -17
- package/dist/number/branded-types/positive-uint16.mjs +109 -118
- package/dist/number/branded-types/positive-uint16.mjs.map +1 -1
- package/dist/number/branded-types/positive-uint32.d.mts +13 -13
- package/dist/number/branded-types/positive-uint32.mjs +110 -119
- package/dist/number/branded-types/positive-uint32.mjs.map +1 -1
- package/dist/number/branded-types/safe-int.d.mts +4 -4
- package/dist/number/branded-types/safe-int.mjs +251 -292
- package/dist/number/branded-types/safe-int.mjs.map +1 -1
- package/dist/number/branded-types/safe-uint.d.mts +8 -8
- package/dist/number/branded-types/safe-uint.mjs +111 -119
- package/dist/number/branded-types/safe-uint.mjs.map +1 -1
- package/dist/number/branded-types/uint.d.mts +8 -8
- package/dist/number/branded-types/uint.mjs +198 -225
- package/dist/number/branded-types/uint.mjs.map +1 -1
- package/dist/number/branded-types/uint16.d.mts +14 -14
- package/dist/number/branded-types/uint16.mjs +109 -119
- package/dist/number/branded-types/uint16.mjs.map +1 -1
- package/dist/number/branded-types/uint32.d.mts +10 -10
- package/dist/number/branded-types/uint32.mjs +110 -117
- package/dist/number/branded-types/uint32.mjs.map +1 -1
- package/dist/number/enum/int8.mjs +119 -145
- package/dist/number/enum/int8.mjs.map +1 -1
- package/dist/number/enum/uint8.mjs +107 -121
- package/dist/number/enum/uint8.mjs.map +1 -1
- package/dist/number/num.d.mts +2 -2
- package/dist/number/num.d.mts.map +1 -1
- package/dist/number/num.mjs +76 -537
- package/dist/number/num.mjs.map +1 -1
- package/dist/number/refined-number-utils.d.mts +1 -1
- package/dist/number/refined-number-utils.d.mts.map +1 -1
- package/dist/number/refined-number-utils.mjs +127 -263
- package/dist/number/refined-number-utils.mjs.map +1 -1
- package/dist/object/object.d.mts.map +1 -1
- package/dist/object/object.mjs +107 -222
- package/dist/object/object.mjs.map +1 -1
- package/dist/others/cast-mutable.d.mts.map +1 -1
- package/dist/others/cast-mutable.mjs +8 -37
- package/dist/others/cast-mutable.mjs.map +1 -1
- package/dist/others/cast-readonly.d.mts.map +1 -1
- package/dist/others/cast-readonly.mjs +8 -36
- package/dist/others/cast-readonly.mjs.map +1 -1
- package/dist/others/debounce-function.d.mts.map +1 -1
- package/dist/others/debounce-function.mjs +7 -16
- package/dist/others/debounce-function.mjs.map +1 -1
- package/dist/others/fast-deep-equal.d.mts.map +1 -1
- package/dist/others/fast-deep-equal.mjs +43 -59
- package/dist/others/fast-deep-equal.mjs.map +1 -1
- package/dist/others/if-then.d.mts.map +1 -1
- package/dist/others/if-then.mjs +0 -29
- package/dist/others/if-then.mjs.map +1 -1
- package/dist/others/map-nullable.mjs +9 -9
- package/dist/others/map-nullable.mjs.map +1 -1
- package/dist/others/memoize-function.mjs +12 -12
- package/dist/others/memoize-function.mjs.map +1 -1
- package/dist/others/tuple.d.mts.map +1 -1
- package/dist/others/tuple.mjs +0 -50
- 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 +41 -88
- package/dist/others/unknown-to-string.mjs.map +1 -1
- package/dist/promise/promise.d.mts.map +1 -1
- package/dist/promise/promise.mjs +4 -49
- package/dist/promise/promise.mjs.map +1 -1
- package/package.json +14 -13
- package/src/array/impl/array-utils-creation.mts +3 -3
- package/src/array/impl/array-utils-modification.mts +7 -7
- package/src/array/impl/array-utils-modification.test.mts +4 -4
- package/src/array/impl/array-utils-transformation.mts +4 -4
- package/src/array/impl/array-utils-transformation.test.mts +7 -7
- package/src/array/impl/array-utils-validation.mts +24 -24
- package/src/array/impl/array-utils-validation.test.mts +94 -92
- package/src/collections/queue.test.mts +1 -1
- package/src/guard/as-length-bounded-array.mts +190 -0
- package/src/guard/as-length-bounded-array.test.mts +118 -0
- package/src/guard/index.mts +2 -0
- package/src/guard/is-length-bounded-array.mts +195 -0
- package/src/guard/is-length-bounded-array.test.mts +169 -0
- package/src/guard/is-length-bounded-string.mts +6 -6
- package/src/object/object.test.mts +3 -3
package/README.md
CHANGED
|
@@ -384,7 +384,7 @@ const sum = Arr.sum(numbers);
|
|
|
384
384
|
assert.isTrue(sum === 20);
|
|
385
385
|
|
|
386
386
|
// Type-safe length checking
|
|
387
|
-
if (Arr.
|
|
387
|
+
if (Arr.isMinLengthTuple(numbers, 2)) {
|
|
388
388
|
// numbers is now guaranteed to have at least 2 elements
|
|
389
389
|
expectType<typeof numbers, readonly [number, number, ...number[]]>('=');
|
|
390
390
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type BoolOr, type FixedLengthTuple, type Index, type IsUnion, type List, type Min, type NonEmptyArray, type NonZeroSafeIntWithSmallInt, type PositiveSafeIntWithSmallInt, type RelaxedExclude, type SafeInt, type SafeIntWithSmallInt, type SafeUint, type SafeUintWithSmallInt, type Seq, type SmallUint } from 'ts-type-forge';
|
|
2
2
|
import { type SizeType } from '../../types.mjs';
|
|
3
3
|
/**
|
|
4
4
|
* Creates an array of zeros with the specified length.
|
|
@@ -15,7 +15,7 @@ import { type SizeType } from '../../types.mjs';
|
|
|
15
15
|
* assert.deepStrictEqual(threeZeros, [0, 0, 0]);
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
export declare const zeros: <N extends SizeType.ArgArr>(len: N) => N extends SmallUint ?
|
|
18
|
+
export declare const zeros: <N extends SizeType.ArgArr>(len: N) => N extends SmallUint ? FixedLengthTuple<N, 0> : N extends SizeType.ArgArrPositive ? NonEmptyArray<0> : readonly 0[];
|
|
19
19
|
/**
|
|
20
20
|
* Creates a sequence of consecutive integers from 0 to `len-1`.
|
|
21
21
|
*
|
|
@@ -47,13 +47,13 @@ export declare const seq: <N extends SizeType.ArgArr>(len: N) => N extends Small
|
|
|
47
47
|
* assert.deepStrictEqual(emptyStrings, []);
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
export declare const create: <N extends SizeType.ArgArr, const V>(len: N, init: V) => N extends SmallUint ?
|
|
50
|
+
export declare const create: <N extends SizeType.ArgArr, const V>(len: N, init: V) => N extends SmallUint ? FixedLengthTuple<N, V> : N extends SizeType.ArgArrPositive ? NonEmptyArray<V> : readonly V[];
|
|
51
51
|
/**
|
|
52
52
|
* Alias for `create`.
|
|
53
53
|
*
|
|
54
54
|
* @see {@link create}
|
|
55
55
|
*/
|
|
56
|
-
export declare const newArray: <N extends SizeType.ArgArr, const V>(len: N, init: V) => N extends SmallUint ?
|
|
56
|
+
export declare const newArray: <N extends SizeType.ArgArr, const V>(len: N, init: V) => N extends SmallUint ? FixedLengthTuple<N, V> : N extends SizeType.ArgArrPositive ? NonEmptyArray<V> : readonly V[];
|
|
57
57
|
/**
|
|
58
58
|
* Generates an array from a generator function.
|
|
59
59
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-utils-creation.d.mts","sourceRoot":"","sources":["../../../src/array/impl/array-utils-creation.mts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,
|
|
1
|
+
{"version":3,"file":"array-utils-creation.d.mts","sourceRoot":"","sources":["../../../src/array/impl/array-utils-creation.mts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,GAAG,EACR,K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C,EACN,IAAI,CAAC,EAAE,CAAC,GACP,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEnB,wBAAgB,KAAK,CACnB,KAAK,EAAE,oBAAoB,EAC3B,GAAG,EAAE,oBAAoB,EACzB,IAAI,CAAC,EAAE,2BAA2B,GACjC,SAAS,QAAQ,EAAE,CAAC;AAEvB,wBAAgB,KAAK,CACnB,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,mBAAmB,EACxB,IAAI,CAAC,EAAE,0BAA0B,GAChC,SAAS,OAAO,EAAE,CAAC"}
|
|
@@ -1,121 +1,26 @@
|
|
|
1
1
|
import { range as range$1 } from '../../iterator/range.mjs';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* assert.deepStrictEqual(threeZeros, [0, 0, 0]);
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
const zeros = (len) =>
|
|
19
|
-
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
20
|
-
Array.from({ length: len }, () => 0);
|
|
21
|
-
/**
|
|
22
|
-
* Creates a sequence of consecutive integers from 0 to `len-1`.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
*
|
|
26
|
-
* ```ts
|
|
27
|
-
* const emptySeq = Arr.seq(0);
|
|
28
|
-
*
|
|
29
|
-
* const firstFive = Arr.seq(5);
|
|
30
|
-
*
|
|
31
|
-
* assert.deepStrictEqual(emptySeq, []);
|
|
32
|
-
*
|
|
33
|
-
* assert.deepStrictEqual(firstFive, [0, 1, 2, 3, 4]);
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
const seq = (len) =>
|
|
37
|
-
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
38
|
-
Array.from({ length: len }, (_, i) => i);
|
|
39
|
-
/**
|
|
40
|
-
* Creates a new array of the specified length, filled with the initial value.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
*
|
|
44
|
-
* ```ts
|
|
45
|
-
* const threeOnes = Arr.create(3, 1);
|
|
46
|
-
*
|
|
47
|
-
* const emptyStrings = Arr.create(0, 'Ada');
|
|
48
|
-
*
|
|
49
|
-
* assert.deepStrictEqual(threeOnes, [1, 1, 1]);
|
|
50
|
-
*
|
|
51
|
-
* assert.deepStrictEqual(emptyStrings, []);
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
const create = (len, init) =>
|
|
55
|
-
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
56
|
-
Array.from({ length: Math.max(0, len) }, () => init);
|
|
57
|
-
/**
|
|
58
|
-
* Alias for `create`.
|
|
59
|
-
*
|
|
60
|
-
* @see {@link create}
|
|
61
|
-
*/
|
|
3
|
+
const zeros = (len) => (
|
|
4
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
5
|
+
Array.from({ length: len }, () => 0)
|
|
6
|
+
);
|
|
7
|
+
const seq = (len) => (
|
|
8
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
9
|
+
Array.from({ length: len }, (_, i) => i)
|
|
10
|
+
);
|
|
11
|
+
const create = (len, init) => (
|
|
12
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
13
|
+
Array.from({ length: Math.max(0, len) }, () => init)
|
|
14
|
+
);
|
|
62
15
|
const newArray = create;
|
|
63
|
-
/**
|
|
64
|
-
* Generates an array from a generator function.
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
*
|
|
68
|
-
* ```ts
|
|
69
|
-
* const numbers = Arr.generate(function* () {
|
|
70
|
-
* yield 1;
|
|
71
|
-
*
|
|
72
|
-
* yield 2;
|
|
73
|
-
*
|
|
74
|
-
* yield 3;
|
|
75
|
-
* });
|
|
76
|
-
*
|
|
77
|
-
* assert.deepStrictEqual(numbers, [1, 2, 3]);
|
|
78
|
-
* ```
|
|
79
|
-
*/
|
|
80
16
|
const generate = (generatorFn) => Array.from(generatorFn());
|
|
81
|
-
/**
|
|
82
|
-
* Generates an array from an async generator function.
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
*
|
|
86
|
-
* ```ts
|
|
87
|
-
* const values = await Arr.generateAsync(async function* () {
|
|
88
|
-
* yield 'Ada';
|
|
89
|
-
*
|
|
90
|
-
* await Promise.resolve();
|
|
91
|
-
*
|
|
92
|
-
* yield 'Lovelace';
|
|
93
|
-
* });
|
|
94
|
-
*
|
|
95
|
-
* assert.deepStrictEqual(values, ['Ada', 'Lovelace']);
|
|
96
|
-
* ```
|
|
97
|
-
*/
|
|
98
17
|
const generateAsync = (generatorFn) => Array.fromAsync(generatorFn());
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
*
|
|
104
|
-
* ```ts
|
|
105
|
-
* const original = [{ id: 1 }, { id: 2 }] as const;
|
|
106
|
-
*
|
|
107
|
-
* const cloned = Arr.copy(original);
|
|
108
|
-
*
|
|
109
|
-
* assert.deepStrictEqual(cloned, original);
|
|
110
|
-
*
|
|
111
|
-
* assert.notStrictEqual(cloned, original);
|
|
112
|
-
* ```
|
|
113
|
-
*/
|
|
114
|
-
const copy = (array) =>
|
|
115
|
-
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
116
|
-
array.slice();
|
|
18
|
+
const copy = (array) => (
|
|
19
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
20
|
+
array.slice()
|
|
21
|
+
);
|
|
117
22
|
function range(start, end, step = 1) {
|
|
118
|
-
|
|
23
|
+
return Array.from(range$1(start, end, step));
|
|
119
24
|
}
|
|
120
25
|
|
|
121
26
|
export { copy, create, generate, generateAsync, newArray, range, seq, zeros };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-utils-creation.mjs","sources":["../../../src/array/impl/array-utils-creation.mts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"array-utils-creation.mjs","sources":["../../../src/array/impl/array-utils-creation.mts"],"sourcesContent":["import {\n type BoolOr,\n type FixedLengthTuple,\n type Index,\n type IsUnion,\n type List,\n type Min,\n type NonEmptyArray,\n type NonZeroSafeIntWithSmallInt,\n type PositiveSafeIntWithSmallInt,\n type RelaxedExclude,\n type SafeInt,\n type SafeIntWithSmallInt,\n type SafeUint,\n type SafeUintWithSmallInt,\n type Seq,\n type SmallUint,\n} from 'ts-type-forge';\nimport { expectType } from '../../expect-type.mjs';\nimport { range as rangeIterator } from '../../iterator/index.mjs';\nimport { type SizeType } from '../../types.mjs';\n\n/**\n * Creates an array of zeros with the specified length.\n *\n * @example\n *\n * ```ts\n * const emptyZeros = Arr.zeros(0);\n *\n * const threeZeros = Arr.zeros(3);\n *\n * assert.deepStrictEqual(emptyZeros, []);\n *\n * assert.deepStrictEqual(threeZeros, [0, 0, 0]);\n * ```\n */\nexport const zeros = <N extends SizeType.ArgArr>(\n len: N,\n): N extends SmallUint\n ? FixedLengthTuple<N, 0>\n : N extends SizeType.ArgArrPositive\n ? NonEmptyArray<0>\n : readonly 0[] =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n Array.from({ length: len }, () => 0) as never;\n\n/**\n * Creates a sequence of consecutive integers from 0 to `len-1`.\n *\n * @example\n *\n * ```ts\n * const emptySeq = Arr.seq(0);\n *\n * const firstFive = Arr.seq(5);\n *\n * assert.deepStrictEqual(emptySeq, []);\n *\n * assert.deepStrictEqual(firstFive, [0, 1, 2, 3, 4]);\n * ```\n */\nexport const seq = <N extends SizeType.ArgArr>(\n len: N,\n): N extends SmallUint\n ? Seq<N>\n : N extends SizeType.ArgArrPositive\n ? NonEmptyArray<SizeType.Arr>\n : readonly SizeType.Arr[] =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n Array.from({ length: len }, (_, i) => i) as never;\n\n/**\n * Creates a new array of the specified length, filled with the initial value.\n *\n * @example\n *\n * ```ts\n * const threeOnes = Arr.create(3, 1);\n *\n * const emptyStrings = Arr.create(0, 'Ada');\n *\n * assert.deepStrictEqual(threeOnes, [1, 1, 1]);\n *\n * assert.deepStrictEqual(emptyStrings, []);\n * ```\n */\nexport const create = <N extends SizeType.ArgArr, const V>(\n len: N,\n init: V,\n): N extends SmallUint\n ? FixedLengthTuple<N, V>\n : N extends SizeType.ArgArrPositive\n ? NonEmptyArray<V>\n : readonly V[] =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n Array.from({ length: Math.max(0, len) }, () => init) as never;\n\n/**\n * Alias for `create`.\n *\n * @see {@link create}\n */\nexport const newArray = create;\n\n/**\n * Generates an array from a generator function.\n *\n * @example\n *\n * ```ts\n * const numbers = Arr.generate(function* () {\n * yield 1;\n *\n * yield 2;\n *\n * yield 3;\n * });\n *\n * assert.deepStrictEqual(numbers, [1, 2, 3]);\n * ```\n */\nexport const generate = <T,>(\n generatorFn: () => Generator<T, void, unknown>,\n): readonly T[] => Array.from(generatorFn());\n\n/**\n * Generates an array from an async generator function.\n *\n * @example\n *\n * ```ts\n * const values = await Arr.generateAsync(async function* () {\n * yield 'Ada';\n *\n * await Promise.resolve();\n *\n * yield 'Lovelace';\n * });\n *\n * assert.deepStrictEqual(values, ['Ada', 'Lovelace']);\n * ```\n */\nexport const generateAsync = <T,>(\n generatorFn: () => AsyncGenerator<T, void, unknown>,\n): Promise<readonly T[]> => Array.fromAsync(generatorFn());\n\n/**\n * Creates a shallow copy of an array.\n *\n * @example\n *\n * ```ts\n * const original = [{ id: 1 }, { id: 2 }] as const;\n *\n * const cloned = Arr.copy(original);\n *\n * assert.deepStrictEqual(cloned, original);\n *\n * assert.notStrictEqual(cloned, original);\n * ```\n */\nexport const copy = <const Ar extends readonly unknown[]>(array: Ar): Ar =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n array.slice() as unknown as Ar;\n\ntype LT = Readonly<{ [N in SmallUint]: Index<N> }>;\n\ntype RangeList<S extends SmallUint, E extends SmallUint> =\n BoolOr<IsUnion<S>, IsUnion<E>> extends true\n ? readonly RelaxedExclude<LT[E], LT[Min<S>]>[] // Avoid incorrect type calculation for unions with Seq\n : List.Skip<S, Seq<E>>;\n\nexpectType<RangeList<1, 5>, readonly [1, 2, 3, 4]>('=');\n\nexpectType<RangeList<1, 2>, readonly [1]>('=');\n\nexpectType<RangeList<1, 1>, readonly []>('=');\n\nexpectType<RangeList<1, 1 | 3>, readonly (1 | 2)[]>('=');\n\nexpectType<RangeList<1 | 3, 3 | 5>, readonly (1 | 2 | 3 | 4)[]>('=');\n\nexpectType<RangeList<1 | 2 | 3, 5 | 6 | 7>, readonly (1 | 2 | 3 | 4 | 5 | 6)[]>(\n '=',\n);\n\nexpectType<RangeList<5, 1>, readonly []>('=');\n\n/**\n * Creates an array of numbers within a specified range with optional step.\n *\n * @example\n *\n * ```ts\n * const ascending = Arr.range(asUint32(1), asUint32(5));\n *\n * const empty = Arr.range(asUint32(2), asUint32(2));\n *\n * assert.deepStrictEqual(ascending, [1, 2, 3, 4]);\n *\n * assert.deepStrictEqual(empty, []);\n * ```\n */\nexport function range<S extends SmallUint, E extends SmallUint>(\n start: S,\n end: E,\n step?: 1,\n): RangeList<S, E>;\n\nexport function range(\n start: SafeUintWithSmallInt,\n end: SafeUintWithSmallInt,\n step?: PositiveSafeIntWithSmallInt,\n): readonly SafeUint[];\n\nexport function range(\n start: SafeIntWithSmallInt,\n end: SafeIntWithSmallInt,\n step?: NonZeroSafeIntWithSmallInt,\n): readonly SafeInt[];\n\nexport function range(\n start: SafeIntWithSmallInt,\n end: SafeIntWithSmallInt,\n step: NonZeroSafeIntWithSmallInt = 1,\n): readonly SafeInt[] {\n return Array.from(rangeIterator(start, end, step));\n}\n"],"names":["rangeIterator"],"mappings":";;AAqCO,MAAM,QAAQ,CACnB,GAAA;AAAA;AAAA,EAOA,MAAM,IAAA,CAAK,EAAE,QAAQ,GAAA,EAAI,EAAG,MAAM,CAAC;AAAA;AAiB9B,MAAM,MAAM,CACjB,GAAA;AAAA;AAAA,EAOA,KAAA,CAAM,KAAK,EAAE,MAAA,EAAQ,KAAI,EAAG,CAAC,CAAA,EAAG,CAAA,KAAM,CAAC;AAAA;MAiB5B,MAAA,GAAS,CACpB,GAAA,EACA,IAAA;AAAA;AAAA,EAOA,KAAA,CAAM,IAAA,CAAK,EAAE,MAAA,EAAQ,IAAA,CAAK,GAAA,CAAI,CAAA,EAAG,GAAG,CAAA,EAAE,EAAG,MAAM,IAAI;AAAA;AAO9C,MAAM,QAAA,GAAW;AAmBjB,MAAM,WAAW,CACtB,WAAA,KACiB,KAAA,CAAM,IAAA,CAAK,aAAa;AAmBpC,MAAM,gBAAgB,CAC3B,WAAA,KAC0B,KAAA,CAAM,SAAA,CAAU,aAAa;AAiBlD,MAAM,OAAO,CAAsC,KAAA;AAAA;AAAA,EAExD,MAAM,KAAA;AAAM;AA0DP,SAAS,KAAA,CACd,KAAA,EACA,GAAA,EACA,IAAA,GAAmC,CAAA,EACf;AACpB,EAAA,OAAO,MAAM,IAAA,CAAKA,OAAA,CAAc,KAAA,EAAO,GAAA,EAAK,IAAI,CAAC,CAAA;AACnD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-utils-element-access.d.mts","sourceRoot":"","sources":["../../../src/array/impl/array-utils-element-access.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAQ,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,IAAI,EACV,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE,SAAS,SAAS,OAAO,EAAE,EACpD,KAAK,EAAE,EAAE,EACT,KA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
-
return (array) => at(array, index);
|
|
18
|
-
}
|
|
7
|
+
switch (args.length) {
|
|
8
|
+
case 2: {
|
|
9
|
+
const [array, index$1] = args;
|
|
10
|
+
return pipe(index$1 < 0 ? array.length + index$1 : index$1).map(
|
|
11
|
+
(normalizedIndex) => normalizedIndex < 0 || normalizedIndex >= array.length ? none : (
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
13
|
+
some(array[normalizedIndex])
|
|
14
|
+
)
|
|
15
|
+
).value;
|
|
19
16
|
}
|
|
17
|
+
case 1: {
|
|
18
|
+
const [index] = args;
|
|
19
|
+
return (array) => at(array, index);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
20
22
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* const empty: readonly Readonly<{ id: number }>[] = [] as const;
|
|
30
|
-
*
|
|
31
|
-
* const first = Arr.head(users);
|
|
32
|
-
*
|
|
33
|
-
* const none = Arr.head(empty);
|
|
34
|
-
*
|
|
35
|
-
* assert.deepStrictEqual(first, Optional.some({ id: 1 }));
|
|
36
|
-
*
|
|
37
|
-
* assert.deepStrictEqual(none, Optional.none);
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
const head = (array) =>
|
|
41
|
-
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
42
|
-
(array.length === 0 ? none : some(array.at(0)));
|
|
43
|
-
/**
|
|
44
|
-
* Returns the last element of an array as an Optional.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
*
|
|
48
|
-
* ```ts
|
|
49
|
-
* const queue = ['first', 'second'] as const;
|
|
50
|
-
*
|
|
51
|
-
* const emptyQueue: readonly string[] = [] as const;
|
|
52
|
-
*
|
|
53
|
-
* const lastValue = Arr.last(queue);
|
|
54
|
-
*
|
|
55
|
-
* const none = Arr.last(emptyQueue);
|
|
56
|
-
*
|
|
57
|
-
* assert.deepStrictEqual(lastValue, Optional.some('second'));
|
|
58
|
-
*
|
|
59
|
-
* assert.deepStrictEqual(none, Optional.none);
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
const last = (array) =>
|
|
63
|
-
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
64
|
-
(array.length === 0 ? none : some(array.at(-1)));
|
|
65
|
-
/**
|
|
66
|
-
* Alias for `head`.
|
|
67
|
-
*
|
|
68
|
-
* @see {@link head}
|
|
69
|
-
*/
|
|
23
|
+
const head = (array) => (
|
|
24
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
25
|
+
array.length === 0 ? none : some(array.at(0))
|
|
26
|
+
);
|
|
27
|
+
const last = (array) => (
|
|
28
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
29
|
+
array.length === 0 ? none : some(array.at(-1))
|
|
30
|
+
);
|
|
70
31
|
const first = head;
|
|
71
32
|
|
|
72
33
|
export { at, first, head, last };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-utils-element-access.mjs","sources":["../../../src/array/impl/array-utils-element-access.mts"],"sourcesContent":[null],"names":["index","Optional.none","Optional.some"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"array-utils-element-access.mjs","sources":["../../../src/array/impl/array-utils-element-access.mts"],"sourcesContent":["import { type NonEmptyArray } from 'ts-type-forge';\nimport { Optional, pipe } from '../../functional/index.mjs';\nimport {\n type ArgArrayIndexWithNegative,\n type None,\n type SizeType,\n type Some,\n} from '../../types.mjs';\n\n/**\n * Safely retrieves an element at a given index from an array, returning an Optional.\n *\n * @example\n *\n * ```ts\n * const letters: readonly string[] = ['a', 'b', 'c'] as const;\n *\n * const two = Arr.at(letters, 1);\n *\n * const last = Arr.at(-1)(letters);\n *\n * const missing = Arr.at(letters, 5);\n *\n * assert.deepStrictEqual(two, Optional.some('b'));\n *\n * assert.deepStrictEqual(last, Optional.some('c'));\n *\n * assert.deepStrictEqual(missing, Optional.none);\n * ```\n */\nexport function at<const Ar extends readonly unknown[]>(\n array: Ar,\n index: ArgArrayIndexWithNegative<Ar>,\n): Optional<Ar[number]>;\n\n// Curried version\n\nexport function at(\n index: SizeType.ArgArrWithNegative,\n): <E>(array: readonly E[]) => Optional<E>;\n\nexport function at<E>(\n ...args:\n | readonly [array: readonly E[], index: SizeType.ArgArrWithNegative]\n | readonly [index: SizeType.ArgArrWithNegative]\n): Optional<E> | ((array: readonly E[]) => Optional<E>) {\n switch (args.length) {\n case 2: {\n const [array, index] = args;\n\n return pipe(index < 0 ? array.length + index : index).map(\n (normalizedIndex) =>\n normalizedIndex < 0 || normalizedIndex >= array.length\n ? Optional.none\n : // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n Optional.some(array[normalizedIndex]!),\n ).value;\n }\n\n case 1: {\n const [index] = args;\n\n return (array) => at(array, index);\n }\n }\n}\n\n/**\n * Returns the first element of an array as an Optional.\n *\n * @example\n *\n * ```ts\n * const users = [{ id: 1 }, { id: 2 }] as const;\n *\n * const empty: readonly Readonly<{ id: number }>[] = [] as const;\n *\n * const first = Arr.head(users);\n *\n * const none = Arr.head(empty);\n *\n * assert.deepStrictEqual(first, Optional.some({ id: 1 }));\n *\n * assert.deepStrictEqual(none, Optional.none);\n * ```\n */\nexport const head = <const Ar extends readonly unknown[]>(\n array: Ar,\n): Ar extends readonly []\n ? None\n : Ar extends readonly [infer E, ...unknown[]]\n ? Some<E>\n : Ar extends NonEmptyArray<infer E>\n ? Some<E>\n : Optional<Ar[number]> =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n (array.length === 0 ? Optional.none : Optional.some(array.at(0))) as never;\n\n/**\n * Returns the last element of an array as an Optional.\n *\n * @example\n *\n * ```ts\n * const queue = ['first', 'second'] as const;\n *\n * const emptyQueue: readonly string[] = [] as const;\n *\n * const lastValue = Arr.last(queue);\n *\n * const none = Arr.last(emptyQueue);\n *\n * assert.deepStrictEqual(lastValue, Optional.some('second'));\n *\n * assert.deepStrictEqual(none, Optional.none);\n * ```\n */\nexport const last = <const Ar extends readonly unknown[]>(\n array: Ar,\n): Ar extends readonly []\n ? None\n : Ar extends readonly [...unknown[], infer E]\n ? Some<E>\n : Ar extends NonEmptyArray<infer E>\n ? Some<E>\n : Optional<Ar[number]> =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n (array.length === 0 ? Optional.none : Optional.some(array.at(-1))) as never;\n\n/**\n * Alias for `head`.\n *\n * @see {@link head}\n */\nexport const first = head;\n"],"names":["index","Optional.none","Optional.some"],"mappings":";;;;;AAyCO,SAAS,MACX,IAAA,EAGmD;AACtD,EAAA,QAAQ,KAAK,MAAA;AAAQ,IACnB,KAAK,CAAA,EAAG;AACN,MAAA,MAAM,CAAC,KAAA,EAAOA,OAAK,CAAA,GAAI,IAAA;AAEvB,MAAA,OAAO,KAAKA,OAAA,GAAQ,CAAA,GAAI,MAAM,MAAA,GAASA,OAAA,GAAQA,OAAK,CAAA,CAAE,GAAA;AAAA,QACpD,CAAC,eAAA,KACC,eAAA,GAAkB,KAAK,eAAA,IAAmB,KAAA,CAAM,SAC5CC,IAAS;AAAA;AAAA,UAETC,IAAS,CAAK,KAAA,CAAM,eAAe,CAAE;AAAA;AAAA,OAC7C,CAAE,KAAA;AAAA,IACJ;AAAA,IAEA,KAAK,CAAA,EAAG;AACN,MAAA,MAAM,CAAC,KAAK,CAAA,GAAI,IAAA;AAEhB,MAAA,OAAO,CAAC,KAAA,KAAU,EAAA,CAAG,KAAA,EAAO,KAAK,CAAA;AAAA,IACnC;AAAA;AAEJ;AAqBO,MAAM,OAAO,CAClB,KAAA;AAAA;AAAA,EASC,KAAA,CAAM,MAAA,KAAW,CAAA,GAAID,IAAS,GAAOC,IAAS,CAAK,KAAA,CAAM,EAAA,CAAG,CAAC,CAAC;AAAA;AAqB1D,MAAM,OAAO,CAClB,KAAA;AAAA;AAAA,EASC,KAAA,CAAM,MAAA,KAAW,CAAA,GAAID,IAAS,GAAOC,IAAS,CAAK,KAAA,CAAM,EAAA,CAAG,EAAE,CAAC;AAAA;AAO3D,MAAM,KAAA,GAAQ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-utils-iterators.d.mts","sourceRoot":"","sources":["../../../src/array/impl/array-utils-iterators.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,OAAO,GAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"array-utils-iterators.d.mts","sourceRoot":"","sources":["../../../src/array/impl/array-utils-iterators.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,OAAO,GAAc,CAAC,SAC1B,SAAS,CAAC,EAAE,KAClB,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,CAI1C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,GAAc,CAAC,SAAS,SAAS,CAAC,EAAE,KAAG,aAAa,CAAC,CAAC,CAIxE,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,GAAc,CAAC,SAC1B,SAAS,CAAC,EAAE,KAClB,aAAa,CAAC,QAAQ,CAAC,GAAG,CAI5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,IAAI,GAbiB,CAAC,SAC1B,SAAS,CAAC,EAAE,KAClB,aAAa,CAAC,QAAQ,CAAC,GAAG,CAWF,CAAC"}
|
|
@@ -35,75 +35,21 @@ import '../../number/enum/uint8.mjs';
|
|
|
35
35
|
import '../../number/num.mjs';
|
|
36
36
|
import '../../number/refined-number-utils.mjs';
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
* Returns an iterator of `[index, value]` pairs for an array.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
*
|
|
43
|
-
* ```ts
|
|
44
|
-
* const tags = ['alpha', 'beta', 'gamma'] as const;
|
|
45
|
-
*
|
|
46
|
-
* const entryList = Array.from(
|
|
47
|
-
* Arr.entries(tags),
|
|
48
|
-
* ([index, tag]) => [Number(index), tag] as const,
|
|
49
|
-
* );
|
|
50
|
-
*
|
|
51
|
-
* assert.deepStrictEqual(
|
|
52
|
-
* entryList,
|
|
53
|
-
* Array.from([
|
|
54
|
-
* [0, 'alpha'],
|
|
55
|
-
* [1, 'beta'],
|
|
56
|
-
* [2, 'gamma'],
|
|
57
|
-
* ]),
|
|
58
|
-
* );
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
38
|
const entries = function* (array) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
39
|
+
for (const [index, value] of array.entries()) {
|
|
40
|
+
yield [asUint32(index), value];
|
|
41
|
+
}
|
|
65
42
|
};
|
|
66
|
-
/**
|
|
67
|
-
* Returns an iterator of values for an array.
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
*
|
|
71
|
-
* ```ts
|
|
72
|
-
* const players = ['Ada', 'Grace', 'Alan'] as readonly string[];
|
|
73
|
-
*
|
|
74
|
-
* const valueList = Array.from(Arr.values(players));
|
|
75
|
-
*
|
|
76
|
-
* assert.deepStrictEqual(valueList, players);
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
43
|
const values = function* (array) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
44
|
+
for (const value of array) {
|
|
45
|
+
yield value;
|
|
46
|
+
}
|
|
83
47
|
};
|
|
84
|
-
/**
|
|
85
|
-
* Returns an iterator of indices for an array.
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
*
|
|
89
|
-
* ```ts
|
|
90
|
-
* const items = ['zero', 'one', 'two'] as const;
|
|
91
|
-
*
|
|
92
|
-
* const indexList = Array.from(Arr.indices(items));
|
|
93
|
-
*
|
|
94
|
-
* assert.deepStrictEqual(indexList, [0, 1, 2]);
|
|
95
|
-
* ```
|
|
96
|
-
*/
|
|
97
48
|
const indices = function* (array) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
49
|
+
for (const key of array.keys()) {
|
|
50
|
+
yield asUint32(key);
|
|
51
|
+
}
|
|
101
52
|
};
|
|
102
|
-
/**
|
|
103
|
-
* Alias for `indices`.
|
|
104
|
-
*
|
|
105
|
-
* @see {@link indices}
|
|
106
|
-
*/
|
|
107
53
|
const keys = indices;
|
|
108
54
|
|
|
109
55
|
export { entries, indices, keys, values };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-utils-iterators.mjs","sources":["../../../src/array/impl/array-utils-iterators.mts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"array-utils-iterators.mjs","sources":["../../../src/array/impl/array-utils-iterators.mts"],"sourcesContent":["import { asUint32 } from '../../number/index.mjs';\nimport { type SizeType } from '../../types.mjs';\n\n/**\n * Returns an iterator of `[index, value]` pairs for an array.\n *\n * @example\n *\n * ```ts\n * const tags = ['alpha', 'beta', 'gamma'] as const;\n *\n * const entryList = Array.from(\n * Arr.entries(tags),\n * ([index, tag]) => [Number(index), tag] as const,\n * );\n *\n * assert.deepStrictEqual(\n * entryList,\n * Array.from([\n * [0, 'alpha'],\n * [1, 'beta'],\n * [2, 'gamma'],\n * ]),\n * );\n * ```\n */\nexport const entries = function* <E>(\n array: readonly E[],\n): ArrayIterator<readonly [SizeType.Arr, E]> {\n for (const [index, value] of array.entries()) {\n yield [asUint32(index), value] as const;\n }\n};\n\n/**\n * Returns an iterator of values for an array.\n *\n * @example\n *\n * ```ts\n * const players = ['Ada', 'Grace', 'Alan'] as readonly string[];\n *\n * const valueList = Array.from(Arr.values(players));\n *\n * assert.deepStrictEqual(valueList, players);\n * ```\n */\nexport const values = function* <E>(array: readonly E[]): ArrayIterator<E> {\n for (const value of array) {\n yield value;\n }\n};\n\n/**\n * Returns an iterator of indices for an array.\n *\n * @example\n *\n * ```ts\n * const items = ['zero', 'one', 'two'] as const;\n *\n * const indexList = Array.from(Arr.indices(items));\n *\n * assert.deepStrictEqual(indexList, [0, 1, 2]);\n * ```\n */\nexport const indices = function* <E>(\n array: readonly E[],\n): ArrayIterator<SizeType.Arr> {\n for (const key of array.keys()) {\n yield asUint32(key);\n }\n};\n\n/**\n * Alias for `indices`.\n *\n * @see {@link indices}\n */\nexport const keys = indices;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,MAAM,OAAA,GAAU,WACrB,KAAA,EAC2C;AAC3C,EAAA,KAAA,MAAW,CAAC,KAAA,EAAO,KAAK,CAAA,IAAK,KAAA,CAAM,SAAQ,EAAG;AAC5C,IAAA,MAAM,CAAC,QAAA,CAAS,KAAK,CAAA,EAAG,KAAK,CAAA;AAAA,EAC/B;AACF;AAeO,MAAM,MAAA,GAAS,WAAc,KAAA,EAAuC;AACzE,EAAA,KAAA,MAAW,SAAS,KAAA,EAAO;AACzB,IAAA,MAAM,KAAA;AAAA,EACR;AACF;AAeO,MAAM,OAAA,GAAU,WACrB,KAAA,EAC6B;AAC7B,EAAA,KAAA,MAAW,GAAA,IAAO,KAAA,CAAM,IAAA,EAAK,EAAG;AAC9B,IAAA,MAAM,SAAS,GAAG,CAAA;AAAA,EACpB;AACF;AAOO,MAAM,IAAA,GAAO;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type FixedLengthTuple, type Increment, type IsFixedLengthList, type NonEmptyArray } from 'ts-type-forge';
|
|
2
2
|
import { type ArgArrayIndex, type ArgArrayIndexWithNegative, type SizeType } from '../../types.mjs';
|
|
3
3
|
/**
|
|
4
4
|
* Returns a new array with an element at the specified index replaced.
|
|
@@ -62,8 +62,8 @@ export declare function toUpdated<E, const V = E>(index: SizeType.ArgArr, update
|
|
|
62
62
|
* assert.deepStrictEqual(appendFive, [1, 2, 4, 5]);
|
|
63
63
|
* ```
|
|
64
64
|
*/
|
|
65
|
-
export declare function toInserted<const Ar extends readonly unknown[], const V = Ar[number]>(array: Ar, index: ArgArrayIndexWithNegative<Ar>, newValue: V): IsFixedLengthList<Ar> extends true ?
|
|
66
|
-
export declare function toInserted<const V>(index: SizeType.ArgArrWithNegative, newValue: V): <const Ar extends readonly unknown[]>(array: Ar) => IsFixedLengthList<Ar> extends true ?
|
|
65
|
+
export declare function toInserted<const Ar extends readonly unknown[], const V = Ar[number]>(array: Ar, index: ArgArrayIndexWithNegative<Ar>, newValue: V): IsFixedLengthList<Ar> extends true ? FixedLengthTuple<CastToNumber<Increment<Ar['length']>>, Ar[number] | V> : NonEmptyArray<Ar[number] | V>;
|
|
66
|
+
export declare function toInserted<const V>(index: SizeType.ArgArrWithNegative, newValue: V): <const Ar extends readonly unknown[]>(array: Ar) => IsFixedLengthList<Ar> extends true ? FixedLengthTuple<CastToNumber<Increment<Ar['length']>>, Ar[number] | V> : NonEmptyArray<Ar[number] | V>;
|
|
67
67
|
type CastToNumber<T> = T extends number ? T : never;
|
|
68
68
|
/**
|
|
69
69
|
* Returns a new array with the element at the specified index removed.
|
|
@@ -139,8 +139,8 @@ export declare function toUnshifted<const V>(newValue: V): <const Ar extends rea
|
|
|
139
139
|
* assert.deepStrictEqual(filledCurried, ['x', 'x', 'x']);
|
|
140
140
|
* ```
|
|
141
141
|
*/
|
|
142
|
-
export declare function toFilled<const Ar extends readonly unknown[], const V>(array: Ar, value: V): IsFixedLengthList<Ar> extends true ?
|
|
143
|
-
export declare function toFilled<const V>(value: V): <const Ar extends readonly unknown[]>(array: Ar) => IsFixedLengthList<Ar> extends true ?
|
|
142
|
+
export declare function toFilled<const Ar extends readonly unknown[], const V>(array: Ar, value: V): IsFixedLengthList<Ar> extends true ? FixedLengthTuple<Ar['length'], V> : Ar extends NonEmptyArray<unknown> ? NonEmptyArray<V> : readonly V[];
|
|
143
|
+
export declare function toFilled<const V>(value: V): <const Ar extends readonly unknown[]>(array: Ar) => IsFixedLengthList<Ar> extends true ? FixedLengthTuple<Ar['length'], V> : Ar extends NonEmptyArray<unknown> ? NonEmptyArray<V> : readonly V[];
|
|
144
144
|
/**
|
|
145
145
|
* Returns a new array with elements in the specified range replaced by the specified value.
|
|
146
146
|
*
|
|
@@ -161,10 +161,10 @@ export declare function toFilled<const V>(value: V): <const Ar extends readonly
|
|
|
161
161
|
export declare function toRangeFilled<const Ar extends readonly unknown[], const V>(array: Ar, value: V, fillRange: readonly [
|
|
162
162
|
start: ArgArrayIndexWithNegative<Ar>,
|
|
163
163
|
end: ArgArrayIndexWithNegative<Ar>
|
|
164
|
-
]): IsFixedLengthList<Ar> extends true ?
|
|
164
|
+
]): IsFixedLengthList<Ar> extends true ? FixedLengthTuple<Ar['length'], V | Ar[number]> : Ar extends NonEmptyArray<unknown> ? NonEmptyArray<V | Ar[number]> : readonly (V | Ar[number])[];
|
|
165
165
|
export declare function toRangeFilled<const V>(value: V, fillRange: readonly [
|
|
166
166
|
start: SizeType.ArgArrWithNegative,
|
|
167
167
|
end: SizeType.ArgArrWithNegative
|
|
168
|
-
]): <const Ar extends readonly unknown[]>(array: Ar) => IsFixedLengthList<Ar> extends true ?
|
|
168
|
+
]): <const Ar extends readonly unknown[]>(array: Ar) => IsFixedLengthList<Ar> extends true ? FixedLengthTuple<Ar['length'], V | Ar[number]> : Ar extends NonEmptyArray<unknown> ? NonEmptyArray<V | Ar[number]> : readonly (V | Ar[number])[];
|
|
169
169
|
export {};
|
|
170
170
|
//# sourceMappingURL=array-utils-modification.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-utils-modification.d.mts","sourceRoot":"","sources":["../../../src/array/impl/array-utils-modification.mts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,
|
|
1
|
+
{"version":3,"file":"array-utils-modification.d.mts","sourceRoot":"","sources":["../../../src/array/impl/array-utils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