ts-data-forge 4.0.0 → 5.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/dist/entry-point.mjs +2 -0
- package/dist/entry-point.mjs.map +1 -1
- package/dist/functional/index.d.mts +1 -0
- package/dist/functional/index.d.mts.map +1 -1
- package/dist/functional/index.mjs +2 -0
- package/dist/functional/index.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/index.d.mts +29 -0
- package/dist/functional/ternary-result/impl/index.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/index.mjs +28 -0
- package/dist/functional/ternary-result/impl/index.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/tag.d.mts +7 -0
- package/dist/functional/ternary-result/impl/tag.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/tag.mjs +9 -0
- package/dist/functional/ternary-result/impl/tag.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-err.d.mts +14 -0
- package/dist/functional/ternary-result/impl/ternary-result-err.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-err.mjs +21 -0
- package/dist/functional/ternary-result/impl/ternary-result-err.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.d.mts +18 -0
- package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.mjs +24 -0
- package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-flat-map.d.mts +29 -0
- package/dist/functional/ternary-result/impl/ternary-result-flat-map.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs +41 -0
- package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-fold.d.mts +27 -0
- package/dist/functional/ternary-result/impl/ternary-result-fold.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-fold.mjs +36 -0
- package/dist/functional/ternary-result/impl/ternary-result-fold.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts +20 -0
- package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs +24 -0
- package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts +17 -0
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs +33 -0
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-err.d.mts +20 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-err.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-err.mjs +23 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-err.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts +21 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs +24 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts +17 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs +28 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts +21 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs +24 -0
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-map-err.d.mts +23 -0
- package/dist/functional/ternary-result/impl/ternary-result-map-err.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs +26 -0
- package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.d.mts +21 -0
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs +29 -0
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-map.d.mts +29 -0
- package/dist/functional/ternary-result/impl/ternary-result-map.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-map.mjs +35 -0
- package/dist/functional/ternary-result/impl/ternary-result-map.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts +16 -0
- package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-ok.mjs +23 -0
- package/dist/functional/ternary-result/impl/ternary-result-ok.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-or-else.d.mts +26 -0
- package/dist/functional/ternary-result/impl/ternary-result-or-else.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-or-else.mjs +19 -0
- package/dist/functional/ternary-result/impl/ternary-result-or-else.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-to-optional.d.mts +16 -0
- package/dist/functional/ternary-result/impl/ternary-result-to-optional.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs +25 -0
- package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.d.mts +22 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.mjs +17 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.d.mts +18 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs +36 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts +17 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs +22 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.d.mts +22 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mjs +17 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.d.mts +17 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.mjs +13 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.d.mts +18 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs +36 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.d.mts +19 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mjs +17 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.d.mts +18 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs +32 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts +17 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs +22 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts +18 -0
- package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-warn.mjs +26 -0
- package/dist/functional/ternary-result/impl/ternary-result-warn.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts +26 -0
- package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-zip.mjs +48 -0
- package/dist/functional/ternary-result/impl/ternary-result-zip.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/types.d.mts +25 -0
- package/dist/functional/ternary-result/impl/types.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/types.mjs +2 -0
- package/dist/functional/ternary-result/impl/types.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/variant-name.d.mts +3 -0
- package/dist/functional/ternary-result/impl/variant-name.d.mts.map +1 -0
- package/dist/functional/ternary-result/impl/variant-name.mjs +16 -0
- package/dist/functional/ternary-result/impl/variant-name.mjs.map +1 -0
- package/dist/functional/ternary-result/index.d.mts +2 -0
- package/dist/functional/ternary-result/index.d.mts.map +1 -0
- package/dist/functional/ternary-result/index.mjs +3 -0
- package/dist/functional/ternary-result/index.mjs.map +1 -0
- package/dist/globals.d.mts +55 -2
- package/dist/json/json.d.mts +9 -3
- package/dist/json/json.d.mts.map +1 -1
- package/dist/json/json.mjs +6 -0
- package/dist/json/json.mjs.map +1 -1
- package/package.json +13 -13
- package/src/array/impl/array-utils-creation.test.mts +187 -74
- package/src/array/impl/array-utils-element-access.test.mts +19 -3
- package/src/array/impl/array-utils-iterators.test.mts +44 -24
- package/src/array/impl/array-utils-modification.test.mts +36 -33
- package/src/array/impl/array-utils-reducing-value.test.mts +47 -16
- package/src/array/impl/array-utils-search.test.mts +42 -9
- package/src/array/impl/array-utils-set-op.test.mts +54 -26
- package/src/array/impl/array-utils-size.test.mts +1 -0
- package/src/array/impl/array-utils-slice-clamped.test.mts +20 -11
- package/src/array/impl/array-utils-slicing.test.mts +27 -21
- package/src/array/impl/array-utils-transformation.test.mts +140 -92
- package/src/array/impl/array-utils-validation.test.mts +58 -10
- package/src/array/impl/array.test.mts +5 -5
- package/src/collections/imap-mapped.test.mts +63 -18
- package/src/collections/imap.test.mts +74 -26
- package/src/collections/iset-mapped.test.mts +81 -30
- package/src/collections/iset.test.mts +168 -68
- package/src/collections/queue.test.mts +32 -1
- package/src/collections/stack.test.mts +22 -8
- package/src/functional/index.mts +1 -0
- package/src/functional/match.test.mts +1 -1
- package/src/functional/optional.test.mts +61 -4
- package/src/functional/pipe.test.mts +10 -1
- package/src/functional/result.test.mts +127 -4
- package/src/functional/ternary-result/impl/index.mts +28 -0
- package/src/functional/ternary-result/impl/tag.mts +11 -0
- package/src/functional/ternary-result/impl/ternary-result-err.mts +18 -0
- package/src/functional/ternary-result/impl/ternary-result-expect-to-be.mts +53 -0
- package/src/functional/ternary-result/impl/ternary-result-flat-map.mts +95 -0
- package/src/functional/ternary-result/impl/ternary-result-fold.mts +93 -0
- package/src/functional/ternary-result/impl/ternary-result-from-promise.mts +27 -0
- package/src/functional/ternary-result/impl/ternary-result-from-throwable.mts +31 -0
- package/src/functional/ternary-result/impl/ternary-result-is-err.mts +23 -0
- package/src/functional/ternary-result/impl/ternary-result-is-ok.mts +24 -0
- package/src/functional/ternary-result/impl/ternary-result-is-ternary-result.mts +27 -0
- package/src/functional/ternary-result/impl/ternary-result-is-warn.mts +24 -0
- package/src/functional/ternary-result/impl/ternary-result-map-err.mts +64 -0
- package/src/functional/ternary-result/impl/ternary-result-map-warn.mts +66 -0
- package/src/functional/ternary-result/impl/ternary-result-map.mts +81 -0
- package/src/functional/ternary-result/impl/ternary-result-ok.mts +20 -0
- package/src/functional/ternary-result/impl/ternary-result-or-else.mts +66 -0
- package/src/functional/ternary-result/impl/ternary-result-to-optional.mts +25 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-err-or.mts +45 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mts +40 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-err.mts +22 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mts +45 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-ok.mts +32 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-throw.mts +45 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mts +42 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mts +38 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-warn.mts +22 -0
- package/src/functional/ternary-result/impl/ternary-result-warn.mts +23 -0
- package/src/functional/ternary-result/impl/ternary-result-zip.mts +53 -0
- package/src/functional/ternary-result/impl/types.mts +39 -0
- package/src/functional/ternary-result/impl/variant-name.mts +17 -0
- package/src/functional/ternary-result/index.mts +1 -0
- package/src/functional/ternary-result.test.mts +214 -0
- package/src/globals.d.mts +55 -2
- package/src/guard/is-non-empty-string.test.mts +5 -2
- package/src/guard/is-non-null-object.test.mts +3 -5
- package/src/guard/is-primitive.test.mts +5 -3
- package/src/guard/is-record.test.mts +1 -1
- package/src/guard/is-type.test.mts +35 -20
- package/src/guard/key-is-in.test.mts +1 -1
- package/src/iterator/range.test.mts +22 -16
- package/src/json/json.mts +9 -3
- package/src/json/json.test.mts +140 -64
- package/src/number/branded-types/finite-number.test.mts +3 -2
- package/src/number/branded-types/int.test.mts +4 -3
- package/src/number/branded-types/int16.test.mts +9 -3
- package/src/number/branded-types/int32.test.mts +9 -3
- package/src/number/branded-types/non-negative-finite-number.test.mts +6 -4
- package/src/number/branded-types/non-negative-int16.test.mts +8 -3
- package/src/number/branded-types/non-negative-int32.test.mts +8 -3
- package/src/number/branded-types/non-zero-finite-number.test.mts +6 -3
- package/src/number/branded-types/non-zero-int.test.mts +6 -3
- package/src/number/branded-types/non-zero-int16.test.mts +9 -3
- package/src/number/branded-types/non-zero-int32.test.mts +9 -3
- package/src/number/branded-types/non-zero-safe-int.test.mts +10 -3
- package/src/number/branded-types/non-zero-uint16.test.mts +8 -3
- package/src/number/branded-types/non-zero-uint32.test.mts +8 -3
- package/src/number/branded-types/positive-finite-number.test.mts +7 -3
- package/src/number/branded-types/positive-int.test.mts +5 -3
- package/src/number/branded-types/positive-int16.test.mts +8 -3
- package/src/number/branded-types/positive-int32.test.mts +8 -3
- package/src/number/branded-types/positive-safe-int.test.mts +8 -3
- package/src/number/branded-types/positive-uint16.test.mts +8 -3
- package/src/number/branded-types/positive-uint32.test.mts +8 -3
- package/src/number/branded-types/safe-int.test.mts +8 -2
- package/src/number/branded-types/safe-uint.test.mts +8 -3
- package/src/number/branded-types/uint.test.mts +5 -3
- package/src/number/branded-types/uint16.test.mts +8 -3
- package/src/number/branded-types/uint32.test.mts +8 -3
- package/src/number/enum/int8.test.mts +8 -3
- package/src/number/enum/uint8.test.mts +6 -3
- package/src/number/num.test.mts +16 -2
- package/src/object/object.test.mts +26 -13
- package/src/others/cast-mutable.test.mts +10 -8
- package/src/others/cast-readonly.test.mts +9 -5
- package/src/others/if-then.test.mts +4 -1
- package/src/others/map-nullable.test.mts +28 -1
- package/src/others/memoize-function.test.mts +20 -17
- package/src/others/tuple.test.mts +3 -2
- package/src/others/unknown-to-string.test.mts +15 -2
- package/src/promise/promise.test.mts +6 -1
|
@@ -9,12 +9,13 @@ import {
|
|
|
9
9
|
} from './array-utils-set-op.mjs';
|
|
10
10
|
|
|
11
11
|
describe('Arr set operations', () => {
|
|
12
|
-
describe(
|
|
12
|
+
describe(eq, () => {
|
|
13
13
|
{
|
|
14
14
|
const xs = [1, 2, 3] as const;
|
|
15
15
|
const ys = [1, 2, 3] as const;
|
|
16
16
|
const result = eq(xs, ys);
|
|
17
17
|
expectType<typeof result, boolean>('=');
|
|
18
|
+
|
|
18
19
|
test('should return true for equal arrays of numbers', () => {
|
|
19
20
|
expect(result).toBe(true);
|
|
20
21
|
});
|
|
@@ -24,6 +25,7 @@ describe('Arr set operations', () => {
|
|
|
24
25
|
const ys = [1, 2, 4] as const;
|
|
25
26
|
const result = eq(xs, ys);
|
|
26
27
|
expectType<typeof result, boolean>('=');
|
|
28
|
+
|
|
27
29
|
test('should return false for different arrays of numbers', () => {
|
|
28
30
|
expect(result).toBe(false);
|
|
29
31
|
});
|
|
@@ -33,6 +35,7 @@ describe('Arr set operations', () => {
|
|
|
33
35
|
const ys = [1, 2] as const;
|
|
34
36
|
const result = eq(xs, ys);
|
|
35
37
|
expectType<typeof result, boolean>('=');
|
|
38
|
+
|
|
36
39
|
test('should return false for arrays of different lengths', () => {
|
|
37
40
|
expect(result).toBe(false);
|
|
38
41
|
});
|
|
@@ -42,6 +45,7 @@ describe('Arr set operations', () => {
|
|
|
42
45
|
const ys = ['a', 'b'] as const;
|
|
43
46
|
const result = eq(xs, ys);
|
|
44
47
|
expectType<typeof result, boolean>('=');
|
|
48
|
+
|
|
45
49
|
test('should return true for equal arrays of strings', () => {
|
|
46
50
|
expect(result).toBe(true);
|
|
47
51
|
});
|
|
@@ -51,6 +55,7 @@ describe('Arr set operations', () => {
|
|
|
51
55
|
const ys = [] as const;
|
|
52
56
|
const result = eq(xs, ys);
|
|
53
57
|
expectType<typeof result, boolean>('=');
|
|
58
|
+
|
|
54
59
|
test('should return true for empty arrays', () => {
|
|
55
60
|
expect(result).toBe(true);
|
|
56
61
|
});
|
|
@@ -61,6 +66,7 @@ describe('Arr set operations', () => {
|
|
|
61
66
|
// Default eq uses reference equality for objects
|
|
62
67
|
const result = eq(xs, ys);
|
|
63
68
|
expectType<typeof result, boolean>('=');
|
|
69
|
+
|
|
64
70
|
test('should return false for arrays of objects with default equality (reference check)', () => {
|
|
65
71
|
expect(result).toBe(false);
|
|
66
72
|
});
|
|
@@ -72,6 +78,7 @@ describe('Arr set operations', () => {
|
|
|
72
78
|
const ys = [objA, objB] as const;
|
|
73
79
|
const result = eq(xs, ys);
|
|
74
80
|
expectType<typeof result, boolean>('=');
|
|
81
|
+
|
|
75
82
|
test('should return true for arrays of same object references', () => {
|
|
76
83
|
expect(result).toBe(true);
|
|
77
84
|
});
|
|
@@ -85,13 +92,14 @@ describe('Arr set operations', () => {
|
|
|
85
92
|
(o1, o2) => JSON.stringify(o1) === JSON.stringify(o2),
|
|
86
93
|
);
|
|
87
94
|
expectType<typeof result, boolean>('=');
|
|
95
|
+
|
|
88
96
|
test('should return true for arrays of objects with custom equality function', () => {
|
|
89
97
|
expect(result).toBe(true);
|
|
90
98
|
});
|
|
91
99
|
}
|
|
92
100
|
});
|
|
93
101
|
|
|
94
|
-
describe(
|
|
102
|
+
describe(isSubset, () => {
|
|
95
103
|
{
|
|
96
104
|
const xs = [1, 2, 3] as const;
|
|
97
105
|
const ys = [3, 2] as const;
|
|
@@ -118,7 +126,7 @@ describe('Arr set operations', () => {
|
|
|
118
126
|
}
|
|
119
127
|
});
|
|
120
128
|
|
|
121
|
-
describe(
|
|
129
|
+
describe(isSuperset, () => {
|
|
122
130
|
{
|
|
123
131
|
const xs = [1, 2, 3] as const;
|
|
124
132
|
const ys = [3, 2] as const;
|
|
@@ -151,14 +159,15 @@ describe('Arr set operations', () => {
|
|
|
151
159
|
}
|
|
152
160
|
});
|
|
153
161
|
|
|
154
|
-
describe(
|
|
162
|
+
describe(setIntersection, () => {
|
|
155
163
|
{
|
|
156
164
|
const xs = [1, 2, 3] as const;
|
|
157
165
|
const ys = [2, 3, 4] as const;
|
|
158
166
|
const result = setIntersection(xs, ys);
|
|
159
167
|
expectType<typeof result, readonly (2 | 3)[]>('=');
|
|
168
|
+
|
|
160
169
|
test('should return the intersection of two number arrays', () => {
|
|
161
|
-
|
|
170
|
+
assert.deepStrictEqual(result, [2, 3]);
|
|
162
171
|
});
|
|
163
172
|
}
|
|
164
173
|
{
|
|
@@ -166,8 +175,9 @@ describe('Arr set operations', () => {
|
|
|
166
175
|
const ys = ['b', 'c', 'd'] as const;
|
|
167
176
|
const result = setIntersection(xs, ys);
|
|
168
177
|
expectType<typeof result, readonly ('b' | 'c')[]>('=');
|
|
178
|
+
|
|
169
179
|
test('should return the intersection of two string arrays', () => {
|
|
170
|
-
|
|
180
|
+
assert.deepStrictEqual(result, ['b', 'c']);
|
|
171
181
|
});
|
|
172
182
|
}
|
|
173
183
|
{
|
|
@@ -175,8 +185,9 @@ describe('Arr set operations', () => {
|
|
|
175
185
|
const ys = [4, 5, 6] as const;
|
|
176
186
|
const result = setIntersection(xs, ys);
|
|
177
187
|
expectType<typeof result, readonly never[]>('=');
|
|
188
|
+
|
|
178
189
|
test('should return an empty array if there is no intersection', () => {
|
|
179
|
-
|
|
190
|
+
assert.deepStrictEqual(result, []);
|
|
180
191
|
});
|
|
181
192
|
}
|
|
182
193
|
{
|
|
@@ -184,8 +195,9 @@ describe('Arr set operations', () => {
|
|
|
184
195
|
const ys = [] as const;
|
|
185
196
|
const result = setIntersection(xs, ys);
|
|
186
197
|
expectType<typeof result, readonly never[]>('=');
|
|
198
|
+
|
|
187
199
|
test('should return an empty array if one array is empty', () => {
|
|
188
|
-
|
|
200
|
+
assert.deepStrictEqual(result, []);
|
|
189
201
|
});
|
|
190
202
|
}
|
|
191
203
|
{
|
|
@@ -193,20 +205,22 @@ describe('Arr set operations', () => {
|
|
|
193
205
|
const ys = [1, 2, 3] as const;
|
|
194
206
|
const result = setIntersection(xs, ys);
|
|
195
207
|
expectType<typeof result, readonly never[]>('=');
|
|
208
|
+
|
|
196
209
|
test('should return an empty array if the first array is empty', () => {
|
|
197
|
-
|
|
210
|
+
assert.deepStrictEqual(result, []);
|
|
198
211
|
});
|
|
199
212
|
}
|
|
200
213
|
});
|
|
201
214
|
|
|
202
|
-
describe(
|
|
215
|
+
describe(setDifference, () => {
|
|
203
216
|
{
|
|
204
217
|
const xs = [1, 2, 3] as const;
|
|
205
218
|
const ys = [2, 3, 4] as const;
|
|
206
219
|
const result = setDifference(xs, ys);
|
|
207
220
|
expectType<typeof result, readonly (1 | 2 | 3 | 4)[]>('=');
|
|
221
|
+
|
|
208
222
|
test('should return the difference xs - ys for number arrays', () => {
|
|
209
|
-
|
|
223
|
+
assert.deepStrictEqual(result, [1]);
|
|
210
224
|
});
|
|
211
225
|
}
|
|
212
226
|
{
|
|
@@ -214,8 +228,9 @@ describe('Arr set operations', () => {
|
|
|
214
228
|
const ys = ['b', 'c', 'd'] as const;
|
|
215
229
|
const result = setDifference(xs, ys);
|
|
216
230
|
expectType<typeof result, readonly ('a' | 'b' | 'c' | 'd')[]>('=');
|
|
231
|
+
|
|
217
232
|
test('should return the difference xs - ys for string arrays', () => {
|
|
218
|
-
|
|
233
|
+
assert.deepStrictEqual(result, ['a']);
|
|
219
234
|
});
|
|
220
235
|
}
|
|
221
236
|
{
|
|
@@ -223,8 +238,9 @@ describe('Arr set operations', () => {
|
|
|
223
238
|
const ys = [1, 2, 3] as const;
|
|
224
239
|
const result = setDifference(xs, ys);
|
|
225
240
|
expectType<typeof result, readonly (1 | 2 | 3)[]>('=');
|
|
241
|
+
|
|
226
242
|
test('should return an empty array if xs is a subset of ys', () => {
|
|
227
|
-
|
|
243
|
+
assert.deepStrictEqual(result, []);
|
|
228
244
|
});
|
|
229
245
|
}
|
|
230
246
|
{
|
|
@@ -232,8 +248,9 @@ describe('Arr set operations', () => {
|
|
|
232
248
|
const ys = [4, 5, 6] as const;
|
|
233
249
|
const result = setDifference(xs, ys);
|
|
234
250
|
expectType<typeof result, readonly (1 | 2 | 3 | 4 | 5 | 6)[]>('=');
|
|
251
|
+
|
|
235
252
|
test('should return xs if there is no intersection', () => {
|
|
236
|
-
|
|
253
|
+
assert.deepStrictEqual(result, [1, 2, 3]);
|
|
237
254
|
});
|
|
238
255
|
}
|
|
239
256
|
{
|
|
@@ -241,8 +258,9 @@ describe('Arr set operations', () => {
|
|
|
241
258
|
const ys = [] as const;
|
|
242
259
|
const result = setDifference(xs, ys);
|
|
243
260
|
expectType<typeof result, readonly (1 | 2 | 3)[]>('=');
|
|
261
|
+
|
|
244
262
|
test('should return xs if ys is empty', () => {
|
|
245
|
-
|
|
263
|
+
assert.deepStrictEqual(result, [1, 2, 3]);
|
|
246
264
|
});
|
|
247
265
|
}
|
|
248
266
|
{
|
|
@@ -250,20 +268,22 @@ describe('Arr set operations', () => {
|
|
|
250
268
|
const ys = [1, 2, 3] as const;
|
|
251
269
|
const result = setDifference(xs, ys);
|
|
252
270
|
expectType<typeof result, readonly (1 | 2 | 3)[]>('=');
|
|
271
|
+
|
|
253
272
|
test('should return an empty array if xs is empty', () => {
|
|
254
|
-
|
|
273
|
+
assert.deepStrictEqual(result, []);
|
|
255
274
|
});
|
|
256
275
|
}
|
|
257
276
|
});
|
|
258
277
|
|
|
259
|
-
describe(
|
|
278
|
+
describe(sortedNumSetDifference, () => {
|
|
260
279
|
{
|
|
261
280
|
const xs = [1, 2, 3, 5] as const;
|
|
262
281
|
const ys = [2, 3, 4] as const;
|
|
263
282
|
const result = sortedNumSetDifference(xs, ys);
|
|
264
283
|
expectType<typeof result, readonly (1 | 2 | 3 | 4 | 5)[]>('=');
|
|
284
|
+
|
|
265
285
|
test('should return the difference for sorted number arrays (xs - ys)', () => {
|
|
266
|
-
|
|
286
|
+
assert.deepStrictEqual(result, [1, 5]);
|
|
267
287
|
});
|
|
268
288
|
}
|
|
269
289
|
{
|
|
@@ -271,8 +291,9 @@ describe('Arr set operations', () => {
|
|
|
271
291
|
const ys = [1, 2, 3] as const;
|
|
272
292
|
const result = sortedNumSetDifference(xs, ys);
|
|
273
293
|
expectType<typeof result, readonly (1 | 2 | 3)[]>('=');
|
|
294
|
+
|
|
274
295
|
test('should return an empty array if sets are equal', () => {
|
|
275
|
-
|
|
296
|
+
assert.deepStrictEqual(result, []);
|
|
276
297
|
});
|
|
277
298
|
}
|
|
278
299
|
{
|
|
@@ -280,8 +301,9 @@ describe('Arr set operations', () => {
|
|
|
280
301
|
const ys = [4, 5, 6] as const;
|
|
281
302
|
const result = sortedNumSetDifference(xs, ys);
|
|
282
303
|
expectType<typeof result, readonly (1 | 2 | 3 | 4 | 5 | 6)[]>('=');
|
|
304
|
+
|
|
283
305
|
test('should return xs if no common elements', () => {
|
|
284
|
-
|
|
306
|
+
assert.deepStrictEqual(result, [1, 2, 3]);
|
|
285
307
|
});
|
|
286
308
|
}
|
|
287
309
|
{
|
|
@@ -289,8 +311,9 @@ describe('Arr set operations', () => {
|
|
|
289
311
|
const ys = [1, 2, 3] as const;
|
|
290
312
|
const result = sortedNumSetDifference(xs, ys);
|
|
291
313
|
expectType<typeof result, readonly (1 | 2 | 3 | 4 | 5 | 6)[]>('=');
|
|
314
|
+
|
|
292
315
|
test('should return xs if no common elements (ys < xs)', () => {
|
|
293
|
-
|
|
316
|
+
assert.deepStrictEqual(result, [4, 5, 6]);
|
|
294
317
|
});
|
|
295
318
|
}
|
|
296
319
|
{
|
|
@@ -298,8 +321,9 @@ describe('Arr set operations', () => {
|
|
|
298
321
|
const ys = [2, 4] as const;
|
|
299
322
|
const result = sortedNumSetDifference(xs, ys);
|
|
300
323
|
expectType<typeof result, readonly (1 | 2 | 3 | 4 | 5)[]>('=');
|
|
324
|
+
|
|
301
325
|
test('should return correct difference when ys is subset of xs', () => {
|
|
302
|
-
|
|
326
|
+
assert.deepStrictEqual(result, [1, 3, 5]);
|
|
303
327
|
});
|
|
304
328
|
}
|
|
305
329
|
{
|
|
@@ -307,8 +331,9 @@ describe('Arr set operations', () => {
|
|
|
307
331
|
const ys = [1, 2, 3, 4, 5] as const;
|
|
308
332
|
const result = sortedNumSetDifference(xs, ys);
|
|
309
333
|
expectType<typeof result, readonly (1 | 2 | 3 | 4 | 5)[]>('=');
|
|
334
|
+
|
|
310
335
|
test('should return empty array when xs is subset of ys', () => {
|
|
311
|
-
|
|
336
|
+
assert.deepStrictEqual(result, []);
|
|
312
337
|
});
|
|
313
338
|
}
|
|
314
339
|
{
|
|
@@ -316,8 +341,9 @@ describe('Arr set operations', () => {
|
|
|
316
341
|
const ys = [1, 2, 3] as const;
|
|
317
342
|
const result = sortedNumSetDifference(xs, ys);
|
|
318
343
|
expectType<typeof result, readonly (1 | 2 | 3)[]>('='); // Type is `readonly number[]` due to `ys`
|
|
344
|
+
|
|
319
345
|
test('should return an empty array if xs is empty', () => {
|
|
320
|
-
|
|
346
|
+
assert.deepStrictEqual(result, []);
|
|
321
347
|
});
|
|
322
348
|
}
|
|
323
349
|
{
|
|
@@ -325,8 +351,9 @@ describe('Arr set operations', () => {
|
|
|
325
351
|
const ys = [] as const;
|
|
326
352
|
const result = sortedNumSetDifference(xs, ys);
|
|
327
353
|
expectType<typeof result, readonly (1 | 2 | 3)[]>('=');
|
|
354
|
+
|
|
328
355
|
test('should return xs if ys is empty', () => {
|
|
329
|
-
|
|
356
|
+
assert.deepStrictEqual(result, [1, 2, 3]);
|
|
330
357
|
});
|
|
331
358
|
}
|
|
332
359
|
{
|
|
@@ -334,8 +361,9 @@ describe('Arr set operations', () => {
|
|
|
334
361
|
const ys = [] as const;
|
|
335
362
|
const result = sortedNumSetDifference(xs, ys);
|
|
336
363
|
expectType<typeof result, readonly never[]>('='); // Type is `readonly number[]`
|
|
364
|
+
|
|
337
365
|
test('should return an empty array if both are empty', () => {
|
|
338
|
-
|
|
366
|
+
assert.deepStrictEqual(result, []);
|
|
339
367
|
});
|
|
340
368
|
}
|
|
341
369
|
});
|
|
@@ -2,7 +2,7 @@ import { asInt32, asUint32 } from '../../number/index.mjs';
|
|
|
2
2
|
import { sliceClamped } from './array-utils-slice-clamped.mjs';
|
|
3
3
|
|
|
4
4
|
describe('Arr', () => {
|
|
5
|
-
describe(
|
|
5
|
+
describe(sliceClamped, () => {
|
|
6
6
|
{
|
|
7
7
|
const list: readonly number[] = [0, 1, 2, 3, 4] as const;
|
|
8
8
|
|
|
@@ -73,7 +73,7 @@ describe('Arr', () => {
|
|
|
73
73
|
expected: [],
|
|
74
74
|
},
|
|
75
75
|
] as const)('sliceClamped($start, $end)', ({ end, expected, start }) => {
|
|
76
|
-
|
|
76
|
+
assert.deepStrictEqual(sliceClamped(list, start, end), expected);
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -82,56 +82,65 @@ describe('Arr', () => {
|
|
|
82
82
|
const array = [1, 2, 3, 4, 5] as const;
|
|
83
83
|
// @ts-expect-error end index is out of bounds
|
|
84
84
|
const result = sliceClamped(array, 0, 6);
|
|
85
|
-
|
|
85
|
+
|
|
86
|
+
assert.deepStrictEqual(result, array);
|
|
86
87
|
}
|
|
87
88
|
{
|
|
88
89
|
const array = [1, 2, 3, 4, 5] as const;
|
|
89
90
|
// @ts-expect-error end index is out of bounds
|
|
90
91
|
const result = sliceClamped(array, 0, -6);
|
|
91
|
-
|
|
92
|
+
|
|
93
|
+
assert.deepStrictEqual(result, []);
|
|
92
94
|
}
|
|
93
95
|
{
|
|
94
96
|
const array = [1, 2, 3, 4, 5] as const;
|
|
95
97
|
// @ts-expect-error start index is out of bounds
|
|
96
98
|
const result = sliceClamped(array, -6, 5);
|
|
97
|
-
|
|
99
|
+
|
|
100
|
+
assert.deepStrictEqual(result, array);
|
|
98
101
|
}
|
|
99
102
|
{
|
|
100
103
|
const array = [1, 2, 3, 4, 5] as const;
|
|
101
104
|
// @ts-expect-error start index is out of bounds
|
|
102
105
|
const result = sliceClamped(array, 6, 5);
|
|
103
|
-
|
|
106
|
+
|
|
107
|
+
assert.deepStrictEqual(result, []);
|
|
104
108
|
}
|
|
105
109
|
});
|
|
106
110
|
|
|
107
111
|
test('should slice with clamped indices', () => {
|
|
108
112
|
const array = [1, 2, 3, 4, 5];
|
|
109
113
|
const result = sliceClamped(array, 1, 3);
|
|
110
|
-
|
|
114
|
+
|
|
115
|
+
assert.deepStrictEqual(result, [2, 3]);
|
|
111
116
|
});
|
|
112
117
|
|
|
113
118
|
test('should clamp start index below 0', () => {
|
|
114
119
|
const array = [1, 2, 3, 4, 5];
|
|
115
120
|
const result = sliceClamped(array, -10, 3);
|
|
116
|
-
|
|
121
|
+
|
|
122
|
+
assert.deepStrictEqual(result, [1, 2, 3]);
|
|
117
123
|
});
|
|
118
124
|
|
|
119
125
|
test('should clamp end index above length', () => {
|
|
120
126
|
const array = [1, 2, 3, 4, 5];
|
|
121
127
|
const result = sliceClamped(array, asUint32(2), asUint32(100));
|
|
122
|
-
|
|
128
|
+
|
|
129
|
+
assert.deepStrictEqual(result, [3, 4, 5]);
|
|
123
130
|
});
|
|
124
131
|
|
|
125
132
|
test('should work with both indices out of range', () => {
|
|
126
133
|
const array = [1, 2, 3];
|
|
127
134
|
const result = sliceClamped(array, asInt32(-10), asUint32(100));
|
|
128
|
-
|
|
135
|
+
|
|
136
|
+
assert.deepStrictEqual(result, [1, 2, 3]);
|
|
129
137
|
});
|
|
130
138
|
|
|
131
139
|
test('should work with empty array', () => {
|
|
132
140
|
const array: readonly number[] = [];
|
|
133
141
|
const result = sliceClamped(array, 0, 5);
|
|
134
|
-
|
|
142
|
+
|
|
143
|
+
assert.deepStrictEqual(result, []);
|
|
135
144
|
});
|
|
136
145
|
});
|
|
137
146
|
});
|
|
@@ -9,62 +9,68 @@ import {
|
|
|
9
9
|
} from './array-utils-slicing.mjs';
|
|
10
10
|
|
|
11
11
|
describe('Arr slicing', () => {
|
|
12
|
-
describe(
|
|
12
|
+
describe(tail, () => {
|
|
13
13
|
test('should return all elements except the first', () => {
|
|
14
14
|
const array = [1, 2, 3, 4] as const;
|
|
15
15
|
const result = tail(array);
|
|
16
16
|
expectType<typeof result, readonly [2, 3, 4]>('=');
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
assert.deepStrictEqual(result, [2, 3, 4]);
|
|
18
19
|
});
|
|
19
20
|
|
|
20
21
|
test('should work with single element array', () => {
|
|
21
22
|
const array = [1] as const;
|
|
22
23
|
const result = tail(array);
|
|
23
24
|
expectType<typeof result, readonly []>('=');
|
|
24
|
-
|
|
25
|
+
|
|
26
|
+
assert.deepStrictEqual(result, []);
|
|
25
27
|
});
|
|
26
28
|
|
|
27
29
|
test('should work with empty array', () => {
|
|
28
30
|
const array = [] as const;
|
|
29
31
|
const result = tail(array);
|
|
30
32
|
expectType<typeof result, readonly []>('=');
|
|
31
|
-
|
|
33
|
+
|
|
34
|
+
assert.deepStrictEqual(result, []);
|
|
32
35
|
});
|
|
33
36
|
});
|
|
34
37
|
|
|
35
|
-
describe(
|
|
38
|
+
describe(butLast, () => {
|
|
36
39
|
test('readonly number[] type', () => {
|
|
37
40
|
const xs: readonly number[] = [1, 2, 3];
|
|
38
41
|
const bl = butLast(xs);
|
|
39
42
|
|
|
40
43
|
expectType<typeof bl, readonly number[]>('=');
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
assert.deepStrictEqual(bl, [1, 2]);
|
|
43
46
|
});
|
|
44
47
|
|
|
45
48
|
test('should return all elements except the last', () => {
|
|
46
49
|
const array = [1, 2, 3, 4] as const;
|
|
47
50
|
const result = butLast(array);
|
|
48
51
|
expectType<typeof result, readonly [1, 2, 3]>('=');
|
|
49
|
-
|
|
52
|
+
|
|
53
|
+
assert.deepStrictEqual(result, [1, 2, 3]);
|
|
50
54
|
});
|
|
51
55
|
|
|
52
56
|
test('should work with single element array', () => {
|
|
53
57
|
const array = [1] as const;
|
|
54
58
|
const result = butLast(array);
|
|
55
59
|
expectType<typeof result, readonly []>('=');
|
|
56
|
-
|
|
60
|
+
|
|
61
|
+
assert.deepStrictEqual(result, []);
|
|
57
62
|
});
|
|
58
63
|
|
|
59
64
|
test('should work with empty array', () => {
|
|
60
65
|
const array = [] as const;
|
|
61
66
|
const result = butLast(array);
|
|
62
67
|
expectType<typeof result, readonly []>('=');
|
|
63
|
-
|
|
68
|
+
|
|
69
|
+
assert.deepStrictEqual(result, []);
|
|
64
70
|
});
|
|
65
71
|
});
|
|
66
72
|
|
|
67
|
-
describe(
|
|
73
|
+
describe(take, () => {
|
|
68
74
|
{
|
|
69
75
|
const xs = [1, 2, 3] as const;
|
|
70
76
|
const t = take(xs, 2);
|
|
@@ -72,7 +78,7 @@ describe('Arr slicing', () => {
|
|
|
72
78
|
expectType<typeof t, readonly [1, 2]>('=');
|
|
73
79
|
|
|
74
80
|
test('case 1', () => {
|
|
75
|
-
|
|
81
|
+
assert.deepStrictEqual(t, [1, 2]);
|
|
76
82
|
});
|
|
77
83
|
}
|
|
78
84
|
{
|
|
@@ -82,12 +88,12 @@ describe('Arr slicing', () => {
|
|
|
82
88
|
expectType<typeof t, readonly number[]>('=');
|
|
83
89
|
|
|
84
90
|
test('case 2', () => {
|
|
85
|
-
|
|
91
|
+
assert.deepStrictEqual(t, [1, 2]);
|
|
86
92
|
});
|
|
87
93
|
}
|
|
88
94
|
});
|
|
89
95
|
|
|
90
|
-
describe(
|
|
96
|
+
describe(takeLast, () => {
|
|
91
97
|
{
|
|
92
98
|
const xs = [1, 2, 3] as const;
|
|
93
99
|
const t = takeLast(xs, 2);
|
|
@@ -95,7 +101,7 @@ describe('Arr slicing', () => {
|
|
|
95
101
|
expectType<typeof t, readonly [2, 3]>('=');
|
|
96
102
|
|
|
97
103
|
test('case 1', () => {
|
|
98
|
-
|
|
104
|
+
assert.deepStrictEqual(t, [2, 3]);
|
|
99
105
|
});
|
|
100
106
|
}
|
|
101
107
|
{
|
|
@@ -105,12 +111,12 @@ describe('Arr slicing', () => {
|
|
|
105
111
|
expectType<typeof t, readonly number[]>('=');
|
|
106
112
|
|
|
107
113
|
test('case 2', () => {
|
|
108
|
-
|
|
114
|
+
assert.deepStrictEqual(t, [2, 3]);
|
|
109
115
|
});
|
|
110
116
|
}
|
|
111
117
|
});
|
|
112
118
|
|
|
113
|
-
describe(
|
|
119
|
+
describe(skip, () => {
|
|
114
120
|
{
|
|
115
121
|
const xs = [1, 2, 3] as const;
|
|
116
122
|
const t = skip(xs, 2);
|
|
@@ -118,7 +124,7 @@ describe('Arr slicing', () => {
|
|
|
118
124
|
expectType<typeof t, readonly [3]>('=');
|
|
119
125
|
|
|
120
126
|
test('case 1', () => {
|
|
121
|
-
|
|
127
|
+
assert.deepStrictEqual(t, [3]);
|
|
122
128
|
});
|
|
123
129
|
}
|
|
124
130
|
{
|
|
@@ -128,12 +134,12 @@ describe('Arr slicing', () => {
|
|
|
128
134
|
expectType<typeof t, readonly number[]>('=');
|
|
129
135
|
|
|
130
136
|
test('case 2', () => {
|
|
131
|
-
|
|
137
|
+
assert.deepStrictEqual(t, [3]);
|
|
132
138
|
});
|
|
133
139
|
}
|
|
134
140
|
});
|
|
135
141
|
|
|
136
|
-
describe(
|
|
142
|
+
describe(skipLast, () => {
|
|
137
143
|
{
|
|
138
144
|
const xs = [1, 2, 3] as const;
|
|
139
145
|
const t = skipLast(xs, 2);
|
|
@@ -141,7 +147,7 @@ describe('Arr slicing', () => {
|
|
|
141
147
|
expectType<typeof t, readonly [1]>('=');
|
|
142
148
|
|
|
143
149
|
test('case 1', () => {
|
|
144
|
-
|
|
150
|
+
assert.deepStrictEqual(t, [1]);
|
|
145
151
|
});
|
|
146
152
|
}
|
|
147
153
|
{
|
|
@@ -151,7 +157,7 @@ describe('Arr slicing', () => {
|
|
|
151
157
|
expectType<typeof t, readonly number[]>('=');
|
|
152
158
|
|
|
153
159
|
test('case 2', () => {
|
|
154
|
-
|
|
160
|
+
assert.deepStrictEqual(t, [1]);
|
|
155
161
|
});
|
|
156
162
|
}
|
|
157
163
|
});
|