functype 0.2.0 → 0.4.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/chunk-2XH6TPQK.mjs +1 -0
- package/dist/chunk-4P46BMZQ.js +1 -0
- package/dist/chunk-7JTQ2BTE.mjs +1 -0
- package/dist/chunk-CPB6NX2S.js +1 -0
- package/dist/chunk-GZIDEEAG.mjs +1 -0
- package/dist/chunk-HF33BEHO.js +1 -0
- package/dist/chunk-LLZGG3YT.js +1 -0
- package/dist/chunk-LO5XBCIY.js +1 -0
- package/dist/chunk-OLJYBLCT.js +1 -0
- package/dist/chunk-Q4H3PCBH.mjs +0 -0
- package/dist/chunk-S5YAJ7CP.mjs +1 -0
- package/dist/chunk-SPNWCOGV.mjs +1 -0
- package/dist/chunk-UVR6IELR.mjs +1 -0
- package/dist/chunk-V2J3R5IU.mjs +0 -0
- package/dist/chunk-V5UFW2E4.js +1 -0
- package/dist/chunk-WMSIRQ3W.mjs +1 -0
- package/dist/chunk-XVHCBGUW.js +1 -0
- package/dist/chunk-ZOH672YH.js +1 -0
- package/dist/collections/index.d.mts +2 -4
- package/dist/collections/index.d.ts +2 -4
- package/dist/either/Either.d.mts +3 -0
- package/dist/either/Either.d.ts +3 -0
- package/dist/either/Either.js +1 -0
- package/dist/either/Either.mjs +1 -0
- package/dist/either/index.d.mts +3 -44
- package/dist/either/index.d.ts +3 -44
- package/dist/either/index.js +1 -1
- package/dist/either/index.mjs +1 -1
- package/dist/error/ParseError.js +1 -1
- package/dist/error/ParseError.mjs +1 -1
- package/dist/functor/index.d.mts +13 -13
- package/dist/functor/index.d.ts +13 -13
- package/dist/functor/index.js +1 -1
- package/dist/functor/index.mjs +1 -0
- package/dist/index-BSx1ncJ9.d.ts +231 -0
- package/dist/index-uP_Hoh2D.d.mts +231 -0
- package/dist/index.d.mts +3 -13
- package/dist/index.d.ts +3 -13
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -0
- package/dist/iterable/Seq.d.mts +2 -28
- package/dist/iterable/Seq.d.ts +2 -28
- package/dist/iterable/Seq.js +1 -1
- package/dist/iterable/Seq.mjs +1 -1
- package/dist/iterable/index.d.mts +2 -2
- package/dist/iterable/index.d.ts +2 -2
- package/dist/iterable/index.js +1 -1
- package/dist/iterable/index.mjs +1 -0
- package/dist/list/List.d.mts +2 -24
- package/dist/list/List.d.ts +2 -24
- package/dist/list/List.js +1 -1
- package/dist/list/List.mjs +1 -1
- package/dist/list/index.d.mts +2 -11
- package/dist/list/index.d.ts +2 -11
- package/dist/list/index.js +1 -1
- package/dist/list/index.mjs +1 -1
- package/dist/map/Map.d.mts +2 -6
- package/dist/map/Map.d.ts +2 -6
- package/dist/map/Map.js +1 -1
- package/dist/map/Map.mjs +1 -1
- package/dist/map/index.d.mts +2 -37
- package/dist/map/index.d.ts +2 -37
- package/dist/map/index.js +1 -1
- package/dist/map/index.mjs +1 -1
- package/dist/map/shim.d.mts +1 -1
- package/dist/map/shim.d.ts +1 -1
- package/dist/map/shim.js +1 -1
- package/dist/map/shim.mjs +1 -1
- package/dist/option/Option.d.mts +3 -0
- package/dist/option/Option.d.ts +3 -0
- package/dist/option/Option.js +1 -0
- package/dist/option/Option.mjs +1 -0
- package/dist/option/index.d.mts +2 -8
- package/dist/option/index.d.ts +2 -8
- package/dist/option/index.js +1 -1
- package/dist/option/index.mjs +1 -1
- package/dist/set/Set.d.mts +2 -19
- package/dist/set/Set.d.ts +2 -19
- package/dist/set/Set.js +1 -1
- package/dist/set/Set.mjs +1 -1
- package/dist/set/index.d.mts +2 -4
- package/dist/set/index.d.ts +2 -4
- package/dist/set/index.js +1 -1
- package/dist/set/index.mjs +1 -0
- package/dist/set/shim.d.mts +1 -1
- package/dist/set/shim.d.ts +1 -1
- package/dist/set/shim.js +1 -1
- package/dist/set/shim.mjs +1 -1
- package/dist/try/Try.d.mts +2 -29
- package/dist/try/Try.d.ts +2 -29
- package/dist/try/Try.js +1 -1
- package/dist/try/Try.mjs +1 -1
- package/dist/try/index.d.mts +3 -0
- package/dist/try/index.d.ts +3 -0
- package/dist/try/index.js +1 -0
- package/dist/try/index.mjs +1 -0
- package/dist/tuple/Tuple.d.mts +19 -2
- package/dist/tuple/Tuple.d.ts +19 -2
- package/dist/tuple/Tuple.js +1 -1
- package/dist/tuple/Tuple.mjs +1 -1
- package/dist/tuple/index.d.mts +2 -20
- package/dist/tuple/index.d.ts +2 -20
- package/dist/tuple/index.js +1 -1
- package/dist/tuple/index.mjs +1 -1
- package/dist/util/index.d.mts +2 -8
- package/dist/util/index.d.ts +2 -8
- package/dist/util/index.js +1 -1
- package/dist/util/index.mjs +1 -1
- package/dist/util/isIterable.js +1 -1
- package/dist/util/isIterable.mjs +1 -1
- package/package.json +17 -17
- package/dist/chunk-35Y3S46C.js +0 -1
- package/dist/chunk-5OCPRWBH.mjs +0 -1
- package/dist/chunk-5RNU6GKU.mjs +0 -1
- package/dist/chunk-5SPJ52B5.js +0 -1
- package/dist/chunk-5XVNJUCA.js +0 -1
- package/dist/chunk-AGJ7VCYK.mjs +0 -1
- package/dist/chunk-AU3JU6VY.js +0 -1
- package/dist/chunk-FBZLCLTN.mjs +0 -1
- package/dist/chunk-L4P3MMUC.mjs +0 -1
- package/dist/chunk-NBPFHDR5.js +0 -1
- package/dist/chunk-SSP26X5Y.js +0 -1
- package/dist/chunk-V5DD7UJW.mjs +0 -1
- package/dist/chunk-VM6KG6UB.mjs +0 -1
- package/dist/chunk-ZQB7I77M.js +0 -1
- package/dist/either/Left.d.mts +0 -9
- package/dist/either/Left.d.ts +0 -9
- package/dist/either/Left.js +0 -1
- package/dist/either/Left.mjs +0 -1
- package/dist/either/Right.d.mts +0 -9
- package/dist/either/Right.d.ts +0 -9
- package/dist/either/Right.js +0 -1
- package/dist/either/Right.mjs +0 -1
- package/dist/index-18491592.d.ts +0 -33
- package/dist/index-3628fb7a.d.ts +0 -15
- package/dist/index-64357013.d.ts +0 -33
- package/dist/index-8434e22f.d.ts +0 -15
- package/dist/list/IList.d.mts +0 -9
- package/dist/list/IList.d.ts +0 -9
- package/dist/option/IOption.d.mts +0 -3
- package/dist/option/IOption.d.ts +0 -3
- package/dist/option/None.d.mts +0 -21
- package/dist/option/None.d.ts +0 -21
- package/dist/option/None.js +0 -1
- package/dist/option/None.mjs +0 -1
- package/dist/option/Some.d.mts +0 -23
- package/dist/option/Some.d.ts +0 -23
- package/dist/option/Some.js +0 -1
- package/dist/option/Some.mjs +0 -1
- /package/dist/{list/IList.mjs → chunk-3OHJLCSR.mjs} +0 -0
- /package/dist/{list/IList.js → chunk-6BEXQNLZ.js} +0 -0
- /package/dist/{option/IOption.mjs → chunk-74TKYQJS.mjs} +0 -0
- /package/dist/{chunk-VTKL7OQI.js → chunk-D22QKJZO.js} +0 -0
- /package/dist/{chunk-U5EUM74A.mjs → chunk-U37JTC3U.mjs} +0 -0
- /package/dist/{option/IOption.js → chunk-XORABVON.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLO5XBCIYjs = require('../chunk-LO5XBCIY.js');require('../chunk-BNNK42JC.js');require('../chunk-D22QKJZO.js');exports.None = _chunkLO5XBCIYjs.b; exports.Some = _chunkLO5XBCIYjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"../chunk-WMSIRQ3W.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-U37JTC3U.mjs";export{b as None,a as Some};
|
package/dist/option/index.d.mts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
export { N as None, S as Some, _ as _Option_, n as none, o as option, s as some } from '../index-uP_Hoh2D.mjs';
|
|
2
2
|
import '../functor/index.mjs';
|
|
3
|
-
import '../
|
|
4
|
-
|
|
5
|
-
declare const option: <T extends unknown>(value?: T | undefined) => IOption<T>;
|
|
6
|
-
declare const some: <T extends unknown>(value: T) => IOption<T>;
|
|
7
|
-
declare const none: <T extends unknown>() => IOption<T>;
|
|
8
|
-
|
|
9
|
-
export { none, option, some };
|
|
3
|
+
import '../tuple/Tuple.mjs';
|
package/dist/option/index.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
export { N as None, S as Some, _ as _Option_, n as none, o as option, s as some } from '../index-BSx1ncJ9.js';
|
|
2
2
|
import '../functor/index.js';
|
|
3
|
-
import '../
|
|
4
|
-
|
|
5
|
-
declare const option: <T extends unknown>(value?: T | undefined) => IOption<T>;
|
|
6
|
-
declare const some: <T extends unknown>(value: T) => IOption<T>;
|
|
7
|
-
declare const none: <T extends unknown>() => IOption<T>;
|
|
8
|
-
|
|
9
|
-
export { none, option, some };
|
|
3
|
+
import '../tuple/Tuple.js';
|
package/dist/option/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLO5XBCIYjs = require('../chunk-LO5XBCIY.js');require('../chunk-BNNK42JC.js');require('../chunk-D22QKJZO.js');exports.None = _chunkLO5XBCIYjs.b; exports.Some = _chunkLO5XBCIYjs.a; exports.none = _chunkLO5XBCIYjs.e; exports.option = _chunkLO5XBCIYjs.c; exports.some = _chunkLO5XBCIYjs.d;
|
package/dist/option/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-WMSIRQ3W.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-U37JTC3U.mjs";export{b as None,a as Some,e as none,c as option,d as some};
|
package/dist/set/Set.d.mts
CHANGED
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { Seq } from '../iterable/Seq.mjs';
|
|
3
|
-
import { a as IIterable } from '../index-18491592.js';
|
|
4
|
-
import { IList } from '../list/IList.mjs';
|
|
1
|
+
export { d as Set, c as _Set_ } from '../index-uP_Hoh2D.mjs';
|
|
5
2
|
import '../functor/index.mjs';
|
|
6
|
-
import '../
|
|
7
|
-
|
|
8
|
-
declare class Set<A> extends Seq<A> implements ISet<A> {
|
|
9
|
-
constructor(iterable?: Iterable<A>);
|
|
10
|
-
add(value: A): Set<A>;
|
|
11
|
-
remove(value: A): Set<A>;
|
|
12
|
-
contains(value: A): boolean;
|
|
13
|
-
has(value: A): boolean;
|
|
14
|
-
map<B>(f: (a: A) => B): Set<B>;
|
|
15
|
-
flatMap<B>(f: (a: A) => IIterable<B>): Set<B>;
|
|
16
|
-
toList(): IList<A>;
|
|
17
|
-
toSet(): ISet<A>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { Set };
|
|
3
|
+
import '../tuple/Tuple.mjs';
|
package/dist/set/Set.d.ts
CHANGED
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { Seq } from '../iterable/Seq.js';
|
|
3
|
-
import { a as IIterable } from '../index-64357013.js';
|
|
4
|
-
import { IList } from '../list/IList.js';
|
|
1
|
+
export { d as Set, c as _Set_ } from '../index-BSx1ncJ9.js';
|
|
5
2
|
import '../functor/index.js';
|
|
6
|
-
import '../
|
|
7
|
-
|
|
8
|
-
declare class Set<A> extends Seq<A> implements ISet<A> {
|
|
9
|
-
constructor(iterable?: Iterable<A>);
|
|
10
|
-
add(value: A): Set<A>;
|
|
11
|
-
remove(value: A): Set<A>;
|
|
12
|
-
contains(value: A): boolean;
|
|
13
|
-
has(value: A): boolean;
|
|
14
|
-
map<B>(f: (a: A) => B): Set<B>;
|
|
15
|
-
flatMap<B>(f: (a: A) => IIterable<B>): Set<B>;
|
|
16
|
-
toList(): IList<A>;
|
|
17
|
-
toSet(): ISet<A>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { Set };
|
|
3
|
+
import '../tuple/Tuple.js';
|
package/dist/set/Set.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCPB6NX2Sjs = require('../chunk-CPB6NX2S.js');require('../chunk-3VJERXBP.js');require('../chunk-XVHCBGUW.js');require('../chunk-LO5XBCIY.js');require('../chunk-BNNK42JC.js');require('../chunk-D22QKJZO.js');exports.Set = _chunkCPB6NX2Sjs.a;
|
package/dist/set/Set.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-UVR6IELR.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-74TKYQJS.mjs";import"../chunk-WMSIRQ3W.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-U37JTC3U.mjs";export{a as Set};
|
package/dist/set/index.d.mts
CHANGED
package/dist/set/index.d.ts
CHANGED
package/dist/set/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCPB6NX2Sjs = require('../chunk-CPB6NX2S.js');require('../chunk-3VJERXBP.js');require('../chunk-XVHCBGUW.js');require('../chunk-LO5XBCIY.js');require('../chunk-BNNK42JC.js');require('../chunk-D22QKJZO.js');exports.Set = _chunkCPB6NX2Sjs.a;
|
package/dist/set/index.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-UVR6IELR.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-74TKYQJS.mjs";import"../chunk-WMSIRQ3W.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-U37JTC3U.mjs";export{a as Set};
|
package/dist/set/shim.d.mts
CHANGED
package/dist/set/shim.d.ts
CHANGED
package/dist/set/shim.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3VJERXBPjs = require('../chunk-3VJERXBP.js');require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3VJERXBPjs = require('../chunk-3VJERXBP.js');require('../chunk-D22QKJZO.js');exports.ESSet = _chunk3VJERXBPjs.a;
|
package/dist/set/shim.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-HA5XD5KC.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-HA5XD5KC.mjs";import"../chunk-U37JTC3U.mjs";export{a as ESSet};
|
package/dist/try/Try.d.mts
CHANGED
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import '../list/List.mjs';
|
|
3
|
-
import '../index-18491592.js';
|
|
1
|
+
export { T as Try, j as _Try_ } from '../index-uP_Hoh2D.mjs';
|
|
4
2
|
import '../functor/index.mjs';
|
|
5
|
-
import '../
|
|
6
|
-
import '../iterable/Seq.mjs';
|
|
7
|
-
import '../index-3628fb7a.js';
|
|
8
|
-
import '../list/IList.mjs';
|
|
9
|
-
import '../set/Set.mjs';
|
|
10
|
-
|
|
11
|
-
interface ITry<T> {
|
|
12
|
-
isSuccess(): boolean;
|
|
13
|
-
isFailure(): boolean;
|
|
14
|
-
getOrElse(defaultValue: T): T;
|
|
15
|
-
orElse(alternative: ITry<T>): ITry<T>;
|
|
16
|
-
toEither(): Either<Error, T>;
|
|
17
|
-
}
|
|
18
|
-
declare class Try<T> implements ITry<T> {
|
|
19
|
-
private readonly value;
|
|
20
|
-
private readonly error;
|
|
21
|
-
private constructor();
|
|
22
|
-
static of<T>(f: () => T): Try<T>;
|
|
23
|
-
isSuccess(): boolean;
|
|
24
|
-
isFailure(): boolean;
|
|
25
|
-
getOrElse(defaultValue: T): T;
|
|
26
|
-
orElse(alternative: ITry<T>): ITry<T>;
|
|
27
|
-
toEither(): Either<Error, T>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { Try };
|
|
3
|
+
import '../tuple/Tuple.mjs';
|
package/dist/try/Try.d.ts
CHANGED
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import '../list/List.js';
|
|
3
|
-
import '../index-64357013.js';
|
|
1
|
+
export { T as Try, j as _Try_ } from '../index-BSx1ncJ9.js';
|
|
4
2
|
import '../functor/index.js';
|
|
5
|
-
import '../
|
|
6
|
-
import '../iterable/Seq.js';
|
|
7
|
-
import '../index-8434e22f.js';
|
|
8
|
-
import '../list/IList.js';
|
|
9
|
-
import '../set/Set.js';
|
|
10
|
-
|
|
11
|
-
interface ITry<T> {
|
|
12
|
-
isSuccess(): boolean;
|
|
13
|
-
isFailure(): boolean;
|
|
14
|
-
getOrElse(defaultValue: T): T;
|
|
15
|
-
orElse(alternative: ITry<T>): ITry<T>;
|
|
16
|
-
toEither(): Either<Error, T>;
|
|
17
|
-
}
|
|
18
|
-
declare class Try<T> implements ITry<T> {
|
|
19
|
-
private readonly value;
|
|
20
|
-
private readonly error;
|
|
21
|
-
private constructor();
|
|
22
|
-
static of<T>(f: () => T): Try<T>;
|
|
23
|
-
isSuccess(): boolean;
|
|
24
|
-
isFailure(): boolean;
|
|
25
|
-
getOrElse(defaultValue: T): T;
|
|
26
|
-
orElse(alternative: ITry<T>): ITry<T>;
|
|
27
|
-
toEither(): Either<Error, T>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { Try };
|
|
3
|
+
import '../tuple/Tuple.js';
|
package/dist/try/Try.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkOLJYBLCTjs = require('../chunk-OLJYBLCT.js');require('../chunk-LLZGG3YT.js');require('../chunk-HF33BEHO.js');require('../chunk-CPB6NX2S.js');require('../chunk-3VJERXBP.js');require('../chunk-XVHCBGUW.js');require('../chunk-LO5XBCIY.js');require('../chunk-BNNK42JC.js');require('../chunk-D22QKJZO.js');exports.Try = _chunkOLJYBLCTjs.a;
|
package/dist/try/Try.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import{a}from"../chunk-SPNWCOGV.mjs";import"../chunk-GZIDEEAG.mjs";import"../chunk-S5YAJ7CP.mjs";import"../chunk-UVR6IELR.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-74TKYQJS.mjs";import"../chunk-WMSIRQ3W.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-U37JTC3U.mjs";export{a as Try};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6BEXQNLZ.js');var _chunkOLJYBLCTjs = require('../chunk-OLJYBLCT.js');require('../chunk-LLZGG3YT.js');require('../chunk-HF33BEHO.js');require('../chunk-CPB6NX2S.js');require('../chunk-3VJERXBP.js');require('../chunk-XVHCBGUW.js');require('../chunk-LO5XBCIY.js');require('../chunk-BNNK42JC.js');require('../chunk-D22QKJZO.js');exports.Try = _chunkOLJYBLCTjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../chunk-Q4H3PCBH.mjs";import{a}from"../chunk-SPNWCOGV.mjs";import"../chunk-GZIDEEAG.mjs";import"../chunk-S5YAJ7CP.mjs";import"../chunk-UVR6IELR.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-74TKYQJS.mjs";import"../chunk-WMSIRQ3W.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-U37JTC3U.mjs";export{a as Try};
|
package/dist/tuple/Tuple.d.mts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ArrayType, _ArrayFunctor_ } from '../functor/index.mjs';
|
|
2
|
+
|
|
3
|
+
type _Tuple_<T extends ArrayType> = _ArrayFunctor_<T> & {
|
|
4
|
+
get(index: number): T[number];
|
|
5
|
+
getAs<U>(index: number, f?: (item: T) => boolean): U;
|
|
6
|
+
map<U extends any[]>(f: (value: T) => U): _Tuple_<U>;
|
|
7
|
+
flatMap<U extends any[]>(f: (value: T) => _Tuple_<U>): _Tuple_<U>;
|
|
8
|
+
};
|
|
9
|
+
declare class Tuple<T extends ArrayType> implements _Tuple_<T> {
|
|
10
|
+
private readonly values;
|
|
11
|
+
constructor(values: T);
|
|
12
|
+
map<U extends ArrayType>(f: (value: T) => U): Tuple<U>;
|
|
13
|
+
flatMap<U extends ArrayType>(f: (value: T) => Tuple<U>): Tuple<U>;
|
|
14
|
+
get(index: number): T[number];
|
|
15
|
+
getAs<U>(index: number, f?: (item: T) => boolean): U;
|
|
16
|
+
toArray(): T;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { Tuple, type _Tuple_ };
|
package/dist/tuple/Tuple.d.ts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ArrayType, _ArrayFunctor_ } from '../functor/index.js';
|
|
2
|
+
|
|
3
|
+
type _Tuple_<T extends ArrayType> = _ArrayFunctor_<T> & {
|
|
4
|
+
get(index: number): T[number];
|
|
5
|
+
getAs<U>(index: number, f?: (item: T) => boolean): U;
|
|
6
|
+
map<U extends any[]>(f: (value: T) => U): _Tuple_<U>;
|
|
7
|
+
flatMap<U extends any[]>(f: (value: T) => _Tuple_<U>): _Tuple_<U>;
|
|
8
|
+
};
|
|
9
|
+
declare class Tuple<T extends ArrayType> implements _Tuple_<T> {
|
|
10
|
+
private readonly values;
|
|
11
|
+
constructor(values: T);
|
|
12
|
+
map<U extends ArrayType>(f: (value: T) => U): Tuple<U>;
|
|
13
|
+
flatMap<U extends ArrayType>(f: (value: T) => Tuple<U>): Tuple<U>;
|
|
14
|
+
get(index: number): T[number];
|
|
15
|
+
getAs<U>(index: number, f?: (item: T) => boolean): U;
|
|
16
|
+
toArray(): T;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { Tuple, type _Tuple_ };
|
package/dist/tuple/Tuple.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkV5UFW2E4js = require('../chunk-V5UFW2E4.js');require('../chunk-D22QKJZO.js');exports.Tuple = _chunkV5UFW2E4js.a;
|
package/dist/tuple/Tuple.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-2XH6TPQK.mjs";import"../chunk-U37JTC3U.mjs";export{a as Tuple};
|
package/dist/tuple/index.d.mts
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare class Tuple<T extends ArrayType> implements ITuple<T> {
|
|
4
|
-
private readonly values;
|
|
5
|
-
constructor(values: T);
|
|
6
|
-
map<U extends ArrayType>(f: (value: T) => U): Tuple<U>;
|
|
7
|
-
flatMap<U extends ArrayType>(f: (value: T) => Tuple<U>): Tuple<U>;
|
|
8
|
-
get(index: number): T[number];
|
|
9
|
-
getAs<U>(index: number, f?: (item: T) => boolean): U;
|
|
10
|
-
toArray(): T;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface ITuple<T extends ArrayType> extends IArrayFunctor<T> {
|
|
14
|
-
get(index: number): T[number];
|
|
15
|
-
getAs<U>(index: number, f?: (item: T) => boolean): U;
|
|
16
|
-
map<U extends any[]>(f: (value: T) => U): ITuple<U>;
|
|
17
|
-
flatMap<U extends any[]>(f: (value: T) => ITuple<U>): ITuple<U>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { ITuple, Tuple };
|
|
1
|
+
export { Tuple, _Tuple_ } from './Tuple.mjs';
|
|
2
|
+
import '../functor/index.mjs';
|
package/dist/tuple/index.d.ts
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare class Tuple<T extends ArrayType> implements ITuple<T> {
|
|
4
|
-
private readonly values;
|
|
5
|
-
constructor(values: T);
|
|
6
|
-
map<U extends ArrayType>(f: (value: T) => U): Tuple<U>;
|
|
7
|
-
flatMap<U extends ArrayType>(f: (value: T) => Tuple<U>): Tuple<U>;
|
|
8
|
-
get(index: number): T[number];
|
|
9
|
-
getAs<U>(index: number, f?: (item: T) => boolean): U;
|
|
10
|
-
toArray(): T;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface ITuple<T extends ArrayType> extends IArrayFunctor<T> {
|
|
14
|
-
get(index: number): T[number];
|
|
15
|
-
getAs<U>(index: number, f?: (item: T) => boolean): U;
|
|
16
|
-
map<U extends any[]>(f: (value: T) => U): ITuple<U>;
|
|
17
|
-
flatMap<U extends any[]>(f: (value: T) => ITuple<U>): ITuple<U>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { ITuple, Tuple };
|
|
1
|
+
export { Tuple, _Tuple_ } from './Tuple.js';
|
|
2
|
+
import '../functor/index.js';
|
package/dist/tuple/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-TVZBBVEV.js');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-TVZBBVEV.js');var _chunkV5UFW2E4js = require('../chunk-V5UFW2E4.js');require('../chunk-D22QKJZO.js');exports.Tuple = _chunkV5UFW2E4js.a;
|
package/dist/tuple/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-LBQXRIXP.mjs";import{a}from"../chunk-
|
|
1
|
+
import"../chunk-LBQXRIXP.mjs";import{a}from"../chunk-2XH6TPQK.mjs";import"../chunk-U37JTC3U.mjs";export{a as Tuple};
|
package/dist/util/index.d.mts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { ParseError } from '../error/ParseError.mjs';
|
|
2
|
-
import { Either } from '../
|
|
3
|
-
import '../list/List.mjs';
|
|
4
|
-
import '../index-18491592.js';
|
|
2
|
+
import { E as Either } from '../index-uP_Hoh2D.mjs';
|
|
5
3
|
import '../functor/index.mjs';
|
|
6
|
-
import '../
|
|
7
|
-
import '../iterable/Seq.mjs';
|
|
8
|
-
import '../index-3628fb7a.js';
|
|
9
|
-
import '../list/IList.mjs';
|
|
10
|
-
import '../set/Set.mjs';
|
|
4
|
+
import '../tuple/Tuple.mjs';
|
|
11
5
|
|
|
12
6
|
declare const parseNumber: (input: string) => Either<ParseError, number>;
|
|
13
7
|
|
package/dist/util/index.d.ts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { ParseError } from '../error/ParseError.js';
|
|
2
|
-
import { Either } from '../
|
|
3
|
-
import '../list/List.js';
|
|
4
|
-
import '../index-64357013.js';
|
|
2
|
+
import { E as Either } from '../index-BSx1ncJ9.js';
|
|
5
3
|
import '../functor/index.js';
|
|
6
|
-
import '../
|
|
7
|
-
import '../iterable/Seq.js';
|
|
8
|
-
import '../index-8434e22f.js';
|
|
9
|
-
import '../list/IList.js';
|
|
10
|
-
import '../set/Set.js';
|
|
4
|
+
import '../tuple/Tuple.js';
|
|
11
5
|
|
|
12
6
|
declare const parseNumber: (input: string) => Either<ParseError, number>;
|
|
13
7
|
|
package/dist/util/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLLZGG3YTjs = require('../chunk-LLZGG3YT.js');require('../chunk-HF33BEHO.js');require('../chunk-CPB6NX2S.js');require('../chunk-3VJERXBP.js');require('../chunk-XVHCBGUW.js');require('../chunk-LO5XBCIY.js');require('../chunk-BNNK42JC.js');var _chunkZTL76QDLjs = require('../chunk-ZTL76QDL.js');require('../chunk-D22QKJZO.js');var n=s=>{let r=parseInt(s,10);return isNaN(r)?_chunkLLZGG3YTjs.a.call(void 0, new (0, _chunkZTL76QDLjs.a)(`${r}`)):_chunkLLZGG3YTjs.b.call(void 0, r)};exports.parseNumber = n;
|
package/dist/util/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t}from"../chunk-
|
|
1
|
+
import{a as e,b as t}from"../chunk-GZIDEEAG.mjs";import"../chunk-S5YAJ7CP.mjs";import"../chunk-UVR6IELR.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-74TKYQJS.mjs";import"../chunk-WMSIRQ3W.mjs";import"../chunk-RRAIFS3D.mjs";import{a as o}from"../chunk-CFYIJKWF.mjs";import"../chunk-U37JTC3U.mjs";var n=s=>{let r=parseInt(s,10);return isNaN(r)?e(new o(`${r}`)):t(r)};export{n as parseNumber};
|
package/dist/util/isIterable.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBNNK42JCjs = require('../chunk-BNNK42JC.js');require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBNNK42JCjs = require('../chunk-BNNK42JC.js');require('../chunk-D22QKJZO.js');exports.isIterable = _chunkBNNK42JCjs.a;
|
package/dist/util/isIterable.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-RRAIFS3D.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-RRAIFS3D.mjs";import"../chunk-U37JTC3U.mjs";export{a as isIterable};
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "functype",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A smallish functional library for TypeScript",
|
|
5
5
|
"author": "jordan.burke@gmail.com",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"url": "https://github.com/jordanburke/TypeScript/tree/main/functype",
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@types/node": "^
|
|
10
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
11
|
-
"@typescript-eslint/parser": "^
|
|
12
|
-
"@types/jest": "29.5.
|
|
9
|
+
"@types/node": "^20.12.8",
|
|
10
|
+
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
|
11
|
+
"@typescript-eslint/parser": "^7.5.0",
|
|
12
|
+
"@types/jest": "29.5.12",
|
|
13
13
|
"cross-env": "^7.0.3",
|
|
14
|
-
"eslint": "^8.
|
|
15
|
-
"eslint-config-prettier": "^9.
|
|
16
|
-
"eslint-plugin-import": "^2.
|
|
17
|
-
"eslint-plugin-prettier": "^5.
|
|
18
|
-
"eslint-plugin-simple-import-sort": "^
|
|
19
|
-
"jest": "29.
|
|
20
|
-
"prettier": "^3.
|
|
21
|
-
"rimraf": "^5.0.
|
|
22
|
-
"tsup": "^
|
|
23
|
-
"ts-jest": "^29.1.
|
|
24
|
-
"ts-node": "^10.9.
|
|
25
|
-
"typescript": "^5.
|
|
14
|
+
"eslint": "^8.57.0",
|
|
15
|
+
"eslint-config-prettier": "^9.1.0",
|
|
16
|
+
"eslint-plugin-import": "^2.29.1",
|
|
17
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
18
|
+
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
19
|
+
"jest": "29.7.0",
|
|
20
|
+
"prettier": "^3.2.5",
|
|
21
|
+
"rimraf": "^5.0.5",
|
|
22
|
+
"tsup": "^8.0.2",
|
|
23
|
+
"ts-jest": "^29.1.2",
|
|
24
|
+
"ts-node": "^10.9.2",
|
|
25
|
+
"typescript": "^5.4.5"
|
|
26
26
|
},
|
|
27
27
|
"main": "./dist/index.js",
|
|
28
28
|
"module": "./dist/index.mjs",
|
package/dist/chunk-35Y3S46C.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3VJERXBPjs = require('./chunk-3VJERXBP.js');var _chunkAU3JU6VYjs = require('./chunk-AU3JU6VY.js');var n=class r extends _chunkAU3JU6VYjs.a{constructor(t){super(t)}map(t){return new r(super.map(t).toArray())}flatMap(t){return new r(super.flatMap(t).toArray())}remove(t){let i=new r().toArray().indexOf(t);return this.removeAt(i)}contains(t){return this.toArray().indexOf(t)!==-1}add(t){let i=[...this.toArray(),t];return new r(i)}removeAt(t){if(t<0||t>=this.toArray().length)return this;let e=[...this.toArray().slice(0,t),...this.toArray().slice(t+1)];return new r(e)}get(t){return _chunkAU3JU6VYjs.d.call(void 0, this.toArray()[t])}concat(t){return new r([...this.toArray(),...t.toArray()])}toList(){return this}toSet(){return new s(this.toArray())}toString(){return`List(${this.toArray().toString()})`}};var s=class r extends _chunkAU3JU6VYjs.a{constructor(t){super(new (0, _chunk3VJERXBPjs.a)(t))}add(t){return new r([...this.values,t])}remove(t){let e=new _chunk3VJERXBPjs.a;return e.delete(t)?new r(e):this}contains(t){return this.has(t)}has(t){return this.values.has(t)}map(t){return new r(super.map(t).toArray())}flatMap(t){return new r(super.flatMap(t).toArray())}toList(){return new n(this.toArray())}toSet(){return this}};exports.a = s; exports.b = n;
|
package/dist/chunk-5OCPRWBH.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./chunk-FBZLCLTN.mjs";import{e}from"./chunk-5RNU6GKU.mjs";var i=class s{constructor(t){this.value=t}isLeft(){return!1}isRight(){return!0}map(t){return new s(t(this.value))}flatMap(t){return t(this.value)}toOption(){return e(this.value)}toList(){return new r([this.value])}};export{i as a};
|
package/dist/chunk-5RNU6GKU.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-RRAIFS3D.mjs";import{a as p}from"./chunk-U5EUM74A.mjs";var a=class t{constructor(e){this.value=e}get isEmpty(){return!1}get(){return this.value}getOrElse(e){return this.value}orElse(e){return this}map(e){return new t(e(this.value))}flatMap(e){return e(this.value)}reduce(e){return e(void 0,this.value)}reduceRight(e){return e(void 0,this.value)}foldLeft(e){return r=>r(e,this.value)}foldRight(e){return r=>r(this.value,e)}toList(){return new n([this.value])}contains(e){return!1}get size(){return 0}};var i=class t{get isEmpty(){return!0}get(){throw new Error("Cannot call get() on a None")}getOrElse(e){return e}orElse(e){return e}map(e){return new t}flatMap(e){return new t}reduce(e){return e(void 0,void 0)}reduceRight(e){return e(void 0,void 0)}foldLeft(e){return r=>e}foldRight(e){return r=>e}toList(){return new n}contains(e){return!1}get size(){return 0}};var s=t=>t?f(t):A(),f=t=>new a(t),A=()=>new i;var n=class t{constructor(e){p(this,"values");l(e)?this.values=e:e instanceof t?this.values=e.toArray():e||(this.values=[])}get length(){return this.toArray().length}map(e){return new t(this.toArray().map(e))}flatMap(e){let r=[];for(let u of this.values){let o=e(u);o instanceof t&&r.push(...o.values)}return new t(r)}forEach(e){this.toArray().forEach(e)}count(e){return 0}exists(e){return!this.find(e).isEmpty}filter(e){return new t(this.toArray().filter(e))}filterNot(e){return new t(this.toArray().filter(r=>!e(r)))}find(e){let r=this.toArray().find(e);return s(r)}get head(){return this.values[0]}get headOption(){return this.isEmpty?s(this.head):A()}get isEmpty(){return this.toArray().length===0}get size(){return 0}toArray(){return Array.from(this.values)}reduce(e){return this.toArray().reduce(e)}reduceRight(e){return this.toArray().reduceRight(e)}foldLeft(e){return r=>this.toArray().reduce(r,e)}foldRight(e){return r=>this.toArray().reduceRight((u,o)=>r(o,u),e)}};export{n as a,a as b,i as c,s as d,f as e,A as f};
|
package/dist/chunk-5SPJ52B5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZQB7I77Mjs = require('./chunk-ZQB7I77M.js');var _chunk5XVNJUCAjs = require('./chunk-5XVNJUCA.js');var L=t=>new (0, _chunkZQB7I77Mjs.a)(t),R= exports.b =t=>new (0, _chunk5XVNJUCAjs.a)(t);exports.a = L; exports.b = R;
|
package/dist/chunk-5XVNJUCA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk35Y3S46Cjs = require('./chunk-35Y3S46C.js');var _chunkAU3JU6VYjs = require('./chunk-AU3JU6VY.js');var i=class s{constructor(t){this.value=t}isLeft(){return!1}isRight(){return!0}map(t){return new s(t(this.value))}flatMap(t){return t(this.value)}toOption(){return _chunkAU3JU6VYjs.e.call(void 0, this.value)}toList(){return new (0, _chunk35Y3S46Cjs.b)([this.value])}};exports.a = i;
|
package/dist/chunk-AGJ7VCYK.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./chunk-L4P3MMUC.mjs";import{a as r}from"./chunk-5OCPRWBH.mjs";var L=t=>new i(t),R=t=>new r(t);export{L as a,R as b};
|
package/dist/chunk-AU3JU6VY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBNNK42JCjs = require('./chunk-BNNK42JC.js');var _chunkVTKL7OQIjs = require('./chunk-VTKL7OQI.js');var a=class t{constructor(e){this.value=e}get isEmpty(){return!1}get(){return this.value}getOrElse(e){return this.value}orElse(e){return this}map(e){return new t(e(this.value))}flatMap(e){return e(this.value)}reduce(e){return e(void 0,this.value)}reduceRight(e){return e(void 0,this.value)}foldLeft(e){return r=>r(e,this.value)}foldRight(e){return r=>r(this.value,e)}toList(){return new n([this.value])}contains(e){return!1}get size(){return 0}};var i=class t{get isEmpty(){return!0}get(){throw new Error("Cannot call get() on a None")}getOrElse(e){return e}orElse(e){return e}map(e){return new t}flatMap(e){return new t}reduce(e){return e(void 0,void 0)}reduceRight(e){return e(void 0,void 0)}foldLeft(e){return r=>e}foldRight(e){return r=>e}toList(){return new n}contains(e){return!1}get size(){return 0}};var s=t=>t?f(t):A(),f= exports.e =t=>new a(t),A= exports.f =()=>new i;var n=class t{constructor(e){_chunkVTKL7OQIjs.a.call(void 0, this,"values");_chunkBNNK42JCjs.a.call(void 0, e)?this.values=e:e instanceof t?this.values=e.toArray():e||(this.values=[])}get length(){return this.toArray().length}map(e){return new t(this.toArray().map(e))}flatMap(e){let r=[];for(let u of this.values){let o=e(u);o instanceof t&&r.push(...o.values)}return new t(r)}forEach(e){this.toArray().forEach(e)}count(e){return 0}exists(e){return!this.find(e).isEmpty}filter(e){return new t(this.toArray().filter(e))}filterNot(e){return new t(this.toArray().filter(r=>!e(r)))}find(e){let r=this.toArray().find(e);return s(r)}get head(){return this.values[0]}get headOption(){return this.isEmpty?s(this.head):A()}get isEmpty(){return this.toArray().length===0}get size(){return 0}toArray(){return Array.from(this.values)}reduce(e){return this.toArray().reduce(e)}reduceRight(e){return this.toArray().reduceRight(e)}foldLeft(e){return r=>this.toArray().reduce(r,e)}foldRight(e){return r=>this.toArray().reduceRight((u,o)=>r(o,u),e)}};exports.a = n; exports.b = a; exports.c = i; exports.d = s; exports.e = f; exports.f = A;
|
package/dist/chunk-FBZLCLTN.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-HA5XD5KC.mjs";import{a as o,d as A}from"./chunk-5RNU6GKU.mjs";var n=class r extends o{constructor(t){super(t)}map(t){return new r(super.map(t).toArray())}flatMap(t){return new r(super.flatMap(t).toArray())}remove(t){let i=new r().toArray().indexOf(t);return this.removeAt(i)}contains(t){return this.toArray().indexOf(t)!==-1}add(t){let i=[...this.toArray(),t];return new r(i)}removeAt(t){if(t<0||t>=this.toArray().length)return this;let e=[...this.toArray().slice(0,t),...this.toArray().slice(t+1)];return new r(e)}get(t){return A(this.toArray()[t])}concat(t){return new r([...this.toArray(),...t.toArray()])}toList(){return this}toSet(){return new s(this.toArray())}toString(){return`List(${this.toArray().toString()})`}};var s=class r extends o{constructor(t){super(new a(t))}add(t){return new r([...this.values,t])}remove(t){let e=new a;return e.delete(t)?new r(e):this}contains(t){return this.has(t)}has(t){return this.values.has(t)}map(t){return new r(super.map(t).toArray())}flatMap(t){return new r(super.flatMap(t).toArray())}toList(){return new n(this.toArray())}toSet(){return this}};export{s as a,n as b};
|
package/dist/chunk-L4P3MMUC.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-FBZLCLTN.mjs";import{f as i}from"./chunk-5RNU6GKU.mjs";var o=class t{constructor(r){this.value=r}isLeft(){return!0}isRight(){return!1}map(r){return new t(this.value)}flatMap(r){return new t(this.value)}toOption(){return i()}toList(){return new e}};export{o as a};
|
package/dist/chunk-NBPFHDR5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSSP26X5Yjs = require('./chunk-SSP26X5Y.js');var _chunk5VTXJIR3js = require('./chunk-5VTXJIR3.js');var _chunk35Y3S46Cjs = require('./chunk-35Y3S46C.js');var _chunkAU3JU6VYjs = require('./chunk-AU3JU6VY.js');var _chunkVTKL7OQIjs = require('./chunk-VTKL7OQI.js');var o=class s{constructor(e){_chunkVTKL7OQIjs.a.call(void 0, this,"values");this.values=new (0, _chunk5VTXJIR3js.a)(e)}get entries(){return Array.from(this.values.entries()).map(([e,t])=>new (0, _chunkSSP26X5Yjs.a)([e,t]))}add(e){return new s(this.values.set(e[0],e[1]).entries())}remove(e){let t=new s([...this.values.entries()]);return t.values.delete(e[0])?t:this}contains(e){return this.values.get(e[0])===e[1]}get size(){return this.values.size}map(e){let t=[];for(let[r,u]of this.values.entries())t.push([r,e(u)]);return new s(t)}flatMap(e){let t=[];for(let[r,u]of this.values.entries()){let a=e(u);if(a instanceof s)for(let[f,c]of a.values.entries())t.push([f,c])}return new s(t)}reduce(e){return new (0, _chunkAU3JU6VYjs.a)(this.entries).reduce(e)}reduceRight(e){return new (0, _chunkAU3JU6VYjs.a)(this.entries).reduceRight(e)}foldLeft(e){let t=new (0, _chunkAU3JU6VYjs.a)(this.entries);return r=>t.foldLeft(e)(r)}foldRight(e){let t=new (0, _chunkAU3JU6VYjs.a)(this.entries);return r=>t.foldRight(e)(r)}get(e){return _chunkAU3JU6VYjs.d.call(void 0, this.values.get(e))}getOrElse(e,t){return _chunkAU3JU6VYjs.d.call(void 0, this.values.get(e)).getOrElse(t)}get isEmpty(){return this.values.size===0}orElse(e,t){let r=_chunkAU3JU6VYjs.d.call(void 0, this.values.get(e));return t}toList(){return new (0, _chunk35Y3S46Cjs.b)(this.entries)}toSet(){return new (0, _chunk35Y3S46Cjs.a)(this.entries)}},M=new o([["a",1],["b",2],["c",3]]);exports.a = o;
|
package/dist/chunk-SSP26X5Y.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var t=class s{constructor(e){this.values=e}map(e){let r=e(this.values);return new s(r)}flatMap(e){return e(this.values)}get(e){return this.values[e]}getAs(e,r){let a=this.values[e];if(r){if(r(this.values))return a;throw new Error("Cannot cast tuple value")}else return a}toArray(){return this.values}};exports.a = t;
|
package/dist/chunk-V5DD7UJW.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as m}from"./chunk-VM6KG6UB.mjs";import{a as V}from"./chunk-377WQNCB.mjs";import{a as p,b as K}from"./chunk-FBZLCLTN.mjs";import{a as n,d as i}from"./chunk-5RNU6GKU.mjs";import{a as l}from"./chunk-U5EUM74A.mjs";var o=class s{constructor(e){l(this,"values");this.values=new V(e)}get entries(){return Array.from(this.values.entries()).map(([e,t])=>new m([e,t]))}add(e){return new s(this.values.set(e[0],e[1]).entries())}remove(e){let t=new s([...this.values.entries()]);return t.values.delete(e[0])?t:this}contains(e){return this.values.get(e[0])===e[1]}get size(){return this.values.size}map(e){let t=[];for(let[r,u]of this.values.entries())t.push([r,e(u)]);return new s(t)}flatMap(e){let t=[];for(let[r,u]of this.values.entries()){let a=e(u);if(a instanceof s)for(let[f,c]of a.values.entries())t.push([f,c])}return new s(t)}reduce(e){return new n(this.entries).reduce(e)}reduceRight(e){return new n(this.entries).reduceRight(e)}foldLeft(e){let t=new n(this.entries);return r=>t.foldLeft(e)(r)}foldRight(e){let t=new n(this.entries);return r=>t.foldRight(e)(r)}get(e){return i(this.values.get(e))}getOrElse(e,t){return i(this.values.get(e)).getOrElse(t)}get isEmpty(){return this.values.size===0}orElse(e,t){let r=i(this.values.get(e));return t}toList(){return new K(this.entries)}toSet(){return new p(this.entries)}},M=new o([["a",1],["b",2],["c",3]]);export{o as a};
|
package/dist/chunk-VM6KG6UB.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=class s{constructor(e){this.values=e}map(e){let r=e(this.values);return new s(r)}flatMap(e){return e(this.values)}get(e){return this.values[e]}getAs(e,r){let a=this.values[e];if(r){if(r(this.values))return a;throw new Error("Cannot cast tuple value")}else return a}toArray(){return this.values}};export{t as a};
|
package/dist/chunk-ZQB7I77M.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk35Y3S46Cjs = require('./chunk-35Y3S46C.js');var _chunkAU3JU6VYjs = require('./chunk-AU3JU6VY.js');var o=class t{constructor(r){this.value=r}isLeft(){return!0}isRight(){return!1}map(r){return new t(this.value)}flatMap(r){return new t(this.value)}toOption(){return _chunkAU3JU6VYjs.f.call(void 0, )}toList(){return new _chunk35Y3S46Cjs.b}};exports.a = o;
|
package/dist/either/Left.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { Left } from './index.mjs';
|
|
2
|
-
import '../list/List.mjs';
|
|
3
|
-
import '../index-18491592.js';
|
|
4
|
-
import '../functor/index.mjs';
|
|
5
|
-
import '../iterable/Seq.mjs';
|
|
6
|
-
import '../index.mjs';
|
|
7
|
-
import '../index-3628fb7a.js';
|
|
8
|
-
import '../list/IList.mjs';
|
|
9
|
-
import '../set/Set.mjs';
|
package/dist/either/Left.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { Left } from './index.js';
|
|
2
|
-
import '../list/List.js';
|
|
3
|
-
import '../index-64357013.js';
|
|
4
|
-
import '../functor/index.js';
|
|
5
|
-
import '../iterable/Seq.js';
|
|
6
|
-
import '../index.js';
|
|
7
|
-
import '../index-8434e22f.js';
|
|
8
|
-
import '../list/IList.js';
|
|
9
|
-
import '../set/Set.js';
|
package/dist/either/Left.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZQB7I77Mjs = require('../chunk-ZQB7I77M.js');require('../chunk-35Y3S46C.js');require('../chunk-3VJERXBP.js');require('../chunk-AU3JU6VY.js');require('../chunk-BNNK42JC.js');require('../chunk-VTKL7OQI.js');exports.Left = _chunkZQB7I77Mjs.a;
|
package/dist/either/Left.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../chunk-L4P3MMUC.mjs";import"../chunk-FBZLCLTN.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-5RNU6GKU.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-U5EUM74A.mjs";export{a as Left};
|
package/dist/either/Right.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { Right } from './index.mjs';
|
|
2
|
-
import '../list/List.mjs';
|
|
3
|
-
import '../index-18491592.js';
|
|
4
|
-
import '../functor/index.mjs';
|
|
5
|
-
import '../iterable/Seq.mjs';
|
|
6
|
-
import '../index.mjs';
|
|
7
|
-
import '../index-3628fb7a.js';
|
|
8
|
-
import '../list/IList.mjs';
|
|
9
|
-
import '../set/Set.mjs';
|
package/dist/either/Right.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { Right } from './index.js';
|
|
2
|
-
import '../list/List.js';
|
|
3
|
-
import '../index-64357013.js';
|
|
4
|
-
import '../functor/index.js';
|
|
5
|
-
import '../iterable/Seq.js';
|
|
6
|
-
import '../index.js';
|
|
7
|
-
import '../index-8434e22f.js';
|
|
8
|
-
import '../list/IList.js';
|
|
9
|
-
import '../set/Set.js';
|
package/dist/either/Right.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5XVNJUCAjs = require('../chunk-5XVNJUCA.js');require('../chunk-35Y3S46C.js');require('../chunk-3VJERXBP.js');require('../chunk-AU3JU6VY.js');require('../chunk-BNNK42JC.js');require('../chunk-VTKL7OQI.js');exports.Right = _chunk5XVNJUCAjs.a;
|