rsult 1.4.0 → 2.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/option.d.ts DELETED
@@ -1,307 +0,0 @@
1
- export type Option<T> = OptionSome<T> | OptionNone<T>;
2
- export interface IOptionCheck<T> {
3
- /**
4
- * Determines if the Option is Some.
5
- * @returns true if the Option is Some, otherwise false.
6
- *
7
- * Usage Example:
8
- * const myOption = Some(5);
9
- * if (myOption.is_some()) {
10
- * console.log("It's Some!");
11
- * }
12
- */
13
- is_some(): this is OptionSome<T>;
14
- /**
15
- * Determines if the Option is Some and the contained value meets a condition.
16
- * @param f The condition to apply to the contained value if it's Some.
17
- * @returns true if the Option is Some and the condition returns true, otherwise false.
18
- *
19
- * Usage Example:
20
- * const myOption = Some(5);
21
- * const isGreaterThanThree = myOption.is_some_and(x => x > 3); // true
22
- */
23
- is_some_and(f: (arg: T) => boolean): boolean;
24
- /**
25
- * Determines if the Option is None.
26
- * @returns true if the Option is None, otherwise false.
27
- *
28
- * Usage Example:
29
- * const myOption = None();
30
- * if (myOption.is_none()) {
31
- * console.log("It's None!");
32
- * }
33
- */
34
- is_none(): boolean;
35
- }
36
- export interface IOptionExpect<T> {
37
- /**
38
- * Extracts the value from a Some, throwing an error if it is None.
39
- * @param msg The error message to throw if the Option is None.
40
- * @returns The contained value if the Option is Some.
41
- * @throws Error with provided message if the Option is None.
42
- *
43
- * Usage Example:
44
- * const myOption = Some(5);
45
- * const value = myOption.expect("Expected a value!"); // 5
46
- */
47
- expect(msg: string): T | never;
48
- }
49
- export interface IOptionTransform<T> {
50
- /**
51
- * Transforms the contained value of a Some with a provided function. Returns None if this Option is None.
52
- * @param fn The mapping function to apply to the contained value.
53
- * @returns An Option containing the result of applying fn to the original value if it was Some, else None.
54
- *
55
- * Usage Example:
56
- * const myOption = Some(5);
57
- * const newOption = myOption.map(x => x * 2); // Some(10)
58
- */
59
- map<U>(fn: (arg: T) => U): Option<U>;
60
- /**
61
- * Applies a function to the contained value if Some, otherwise returns a provided default.
62
- * @param defaultVal The default value to return if the Option is None.
63
- * @param fn The function to apply to the contained value if Some.
64
- * @returns The result of applying fn to the contained value if this Option is Some, else defaultVal.
65
- *
66
- * Usage Example:
67
- * const myOption = None();
68
- * const value = myOption.map_or(0, x => x * 2); // 0
69
- */
70
- map_or<U>(defaultVal: U, fn: (arg: T) => U): U;
71
- }
72
- export interface IOptionCombine<T> {
73
- /**
74
- * Returns the passed Option if this Option is Some, else returns None.
75
- * @param opt The Option to return if this Option is Some.
76
- * @returns The passed Option if this Option is Some, else None.
77
- *
78
- * Usage Example:
79
- * const opt1 = Some(5);
80
- * const opt2 = Some(10);
81
- * const result = opt1.and(opt2); // Some(10)
82
- */
83
- and<U>(opt: Option<U>): Option<U>;
84
- /**
85
- * Returns the result of applying a function to the contained value if Some, otherwise returns None.
86
- * @param fn The function to apply to the contained value.
87
- * @returns An Option containing the result of applying fn to the original value if it was Some, else None.
88
- *
89
- * Usage Example:
90
- * const myOption = Some(5);
91
- * const newOption = myOption.and_then(x => Some(x * 2)); // Some(10)
92
- */
93
- and_then<U>(fn: (arg: T) => Option<U>): Option<U>;
94
- /**
95
- * Returns the passed Option if this Option is None, else returns this Option.
96
- * @param opt The alternative Option to return if this Option is None.
97
- * @returns This Option if it is Some, otherwise the passed Option.
98
- *
99
- * Usage Example:
100
- * const opt1 = None();
101
- * const opt2 = Some(10);
102
- * const result = opt1.or(opt2); // Some(10)
103
- */
104
- or<U>(opt: Option<U>): Option<T> | Option<U>;
105
- /**
106
- * Returns the result of applying a function if this Option is None, else returns this Option.
107
- * @param fn The function that produces an Option to return if this Option is None.
108
- * @returns This Option if it is Some, otherwise the Option produced by fn.
109
- *
110
- * Usage Example:
111
- * const opt1 = None();
112
- * const result = opt1.or_else(() => Some(10)); // Some(10)
113
- */
114
- or_else<U>(fn: () => Option<U>): Option<T> | Option<U>;
115
- /**
116
- * Returns None if both this and the passed Option are Some. Otherwise returns the Option that is Some.
117
- * @param optb The other Option to compare with.
118
- * @returns None if both Options are Some, otherwise the Option that is Some.
119
- *
120
- * Usage Example:
121
- * const opt1 = Some(5);
122
- * const opt2 = None();
123
- * const result = opt1.xor(opt2); // Some(5)
124
- */
125
- xor(optb: Option<T>): Option<T>;
126
- }
127
- export interface IOptionUtility<T> {
128
- /**
129
- * Unwraps the Option, returning the contained value, or throws an error if the Option is None.
130
- * @returns The contained value if this Option is Some.
131
- * @throws Error if this Option is None.
132
- *
133
- * Usage Example:
134
- * const myOption = Some(5);
135
- * const value = myOption.unwrap(); // 5
136
- */
137
- unwrap(): T | never;
138
- /**
139
- * Returns the contained value if Some, else returns a provided alternative.
140
- * @param optb The alternative value to return if this Option is None.
141
- * @returns The contained value if this Option is Some, else optb.
142
- *
143
- * Usage Example:
144
- * const myOption = None();
145
- * const value = myOption.unwrap_or(10); // 10
146
- */
147
- unwrap_or(optb: T): T;
148
- /**
149
- * Returns the contained value if Some, else computes a value from a provided function.
150
- * @param fn The function to compute the alternative value from if this Option is None.
151
- * @returns The contained value if this Option is Some, else the result of fn.
152
- *
153
- * Usage Example:
154
- * const myOption = None();
155
- * const value = myOption.unwrap_or_else(() => 10); // 10
156
- */
157
- unwrap_or_else(fn: () => T): T;
158
- /**
159
- * Returns the contained value if Some, otherwise the default value for the type.
160
- * @returns The contained value if Some, else the type’s default value.
161
- *
162
- * Usage Example:
163
- * const myOption is None<number>();
164
- * const value = myOption.unwrap_or_default(); // 0
165
- */
166
- unwrap_or_default(): T | null;
167
- }
168
- export interface IOptionMutate<T> {
169
- /**
170
- * Takes the contained value out of the Option, leaving a None in its place.
171
- * @returns The Option containing the original value before it was taken.
172
- *
173
- * Usage Example:
174
- * const myOption = Some(5);
175
- * const takenValue = myOption.take(); // Some(5), myOption is now None
176
- */
177
- take(): Option<T>;
178
- /**
179
- * Takes the contained value out of the Option if it satisfies a predicate, leaving a None in its place.
180
- * @param predicate The predicate to apply to the contained value.
181
- * @returns The Option containing the original value if the predicate returns true, otherwise None.
182
- *
183
- * Usage Example:
184
- * const myOption = Some(5);
185
- * const takenValue = myOption.take_if(x => x > 3); // Some(5), myOption is now None
186
- */
187
- take_if(predicate: (arg: T) => boolean): Option<T>;
188
- /**
189
- * Replaces the contained value with another, returning the old value wrapped in an Option.
190
- * @param value The new value to put in the Option.
191
- * @returns An Option containing the old value.
192
- *
193
- * Usage Example:
194
- * const myOption = Some(5);
195
- * const oldValue = myOption.replace(10); // Some(5), myOption now contains 10
196
- *
197
- */
198
- replace(value: T): Option<T>;
199
- }
200
- export interface IOptionZip<T> {
201
- /**
202
- * Combines two Option values into a single Option containing a tuple of their values if both are Some, otherwise returns None.
203
- * @param other The other Option to zip with.
204
- * @returns An Option containing a tuple of the two Option values if both are Some, otherwise None.
205
- *
206
- * Usage Example:
207
- * const opt1 = Some(5);
208
- * const opt2 = Some("hello");
209
- * const zipped = opt1.zip(opt2); // Some([5, "hello"])
210
- */
211
- zip<U>(other: Option<U>): Option<[T, U]>;
212
- /**
213
- * Combines two Option values by applying a function if both are Some, otherwise returns None.
214
- * @param other The other Option to zip with.
215
- * @param f The function to apply to the values if both Options are Some.
216
- * @returns An Option containing the result of the function if both Options are Some, otherwise None.
217
- *
218
- * Usage Example:
219
- * const opt1 = Some(5);
220
- * const opt2 = Some(10);
221
- * const added = opt1.zip_with(opt2, (a, b) => a + b); // Some(15)
222
- */
223
- zip_with<U, R>(other: Option<U>, f: (val: T, other: U) => R): Option<R>;
224
- }
225
- export interface IOptionFilter<T> {
226
- /**
227
- * Applies a predicate to the contained value if Some, returns None if the predicate does not hold or if this Option is None.
228
- * @param predicate The predicate function to apply.
229
- * @returns The original Option if it is Some and the predicate holds, else None.
230
- *
231
- * Usage Example:
232
- * const myOption = Some(5);
233
- * const filteredOption = myOption.filter(x => x > 3); // Some(5)
234
- */
235
- filter(predicate: (arg: T) => boolean): Option<T>;
236
- }
237
- export interface IOptionFlatten<T> {
238
- /**
239
- * Flattens a nested Option, if the Option contains another Option, returning the inner Option if it's Some.
240
- * @returns The contained Option if this is an Option of an Option and the inner Option is Some, otherwise None.
241
- *
242
- * Usage Example:
243
- * const opt = Some(Some(5));
244
- * const flattened = opt.flatten(); // Some(5)
245
- */
246
- flatten<T extends Option<T>>(): Option<T>;
247
- }
248
- export interface IOption<T> extends IOptionCheck<T>, IOptionExpect<T>, IOptionTransform<T>, IOptionCombine<T>, IOptionUtility<T>, IOptionMutate<T>, IOptionZip<T>, IOptionFilter<T>, IOptionFlatten<T> {
249
- }
250
- export declare class OptionSome<T> implements IOption<T> {
251
- readonly value: T;
252
- readonly _tag: "Some";
253
- readonly _T: T;
254
- constructor(value: T);
255
- is_some(): this is OptionSome<T>;
256
- is_some_and(f: (arg: T) => boolean): boolean;
257
- is_none(): this is never;
258
- expect(_msg: string): T;
259
- map<U>(fn: (arg: T) => U): Option<U>;
260
- map_or<U>(_defaultVal: U, fn: (arg: T) => U): U;
261
- and<U>(opt: Option<U>): Option<U>;
262
- and_then<U>(fn: (arg: T) => Option<U>): Option<U>;
263
- filter(predicate: (arg: T) => boolean): Option<T>;
264
- or<U>(_opt: Option<U>): Option<T>;
265
- or_else<U>(_fn: () => Option<U>): Option<T>;
266
- xor(optb: Option<T>): Option<T>;
267
- unwrap(): T;
268
- unwrap_or(optb: T): T;
269
- unwrap_or_else(_fn: () => T): T;
270
- unwrap_or_default(): T | null;
271
- take(): Option<T>;
272
- take_if(predicate: (arg: T) => boolean): Option<T>;
273
- replace(value: T): Option<T>;
274
- zip<U>(other: Option<U>): Option<[T, U]>;
275
- zip_with<U, R>(other: Option<U>, f: (val: T, other: U) => R): Option<R>;
276
- flatten<T extends Option<T>>(): Option<T>;
277
- }
278
- export declare class OptionNone<T> implements IOption<T> {
279
- private readonly _tag;
280
- private readonly _T;
281
- is_some(): this is never;
282
- is_some_and(_f: (arg: T) => boolean): boolean;
283
- is_none(): this is OptionNone<T>;
284
- expect(msg: string): never;
285
- map<U>(_fn: (arg: T) => U): Option<U>;
286
- map_or<U>(defaultVal: U, _fn: (arg: T) => U): U;
287
- and<U>(_opt: Option<U>): Option<U>;
288
- and_then<U>(_fn: (arg: T) => Option<U>): Option<U>;
289
- filter(_predicate: (arg: T) => boolean): Option<T>;
290
- or<U>(opt: Option<U>): Option<U>;
291
- or_else<U>(fn: () => Option<U>): Option<U>;
292
- xor(optb: Option<T>): Option<T>;
293
- unwrap(): never;
294
- unwrap_or(optb: T): T;
295
- unwrap_or_else(fn: () => T): T;
296
- unwrap_or_default(): T | null;
297
- take(): Option<T>;
298
- take_if(_predicate: (arg: T) => boolean): Option<T>;
299
- replace(value: T): Option<T>;
300
- zip<U>(other: Option<U>): Option<[T, U]>;
301
- zip_with<U, R>(_other: Option<U>, _f: (val: T, other: U) => R): Option<R>;
302
- flatten<T extends Option<T>>(): Option<T>;
303
- }
304
- export declare const Some: <T>(val: T) => Option<T>;
305
- export declare const None: <T>() => Option<T>;
306
- export declare const option_from_nullable: <T>(val: T | null | undefined) => Option<T>;
307
- export declare const option_from_promise: <T>(promise: Promise<T>) => Promise<Option<T>>;
package/dist/option.js DELETED
@@ -1,195 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.option_from_promise = exports.option_from_nullable = exports.None = exports.Some = exports.OptionNone = exports.OptionSome = void 0;
4
- class OptionSome {
5
- constructor(value) {
6
- this.value = value;
7
- this._tag = 'Some';
8
- }
9
- is_some() {
10
- return true;
11
- }
12
- is_some_and(f) {
13
- return f(this.value);
14
- }
15
- is_none() {
16
- return false;
17
- }
18
- expect(_msg) {
19
- return this.value;
20
- }
21
- map(fn) {
22
- return new OptionSome(fn(this.value));
23
- }
24
- map_or(_defaultVal, fn) {
25
- return fn(this.value);
26
- }
27
- and(opt) {
28
- return opt;
29
- }
30
- and_then(fn) {
31
- return fn(this.value);
32
- }
33
- filter(predicate) {
34
- if (predicate(this.value)) {
35
- return this;
36
- }
37
- return (0, exports.None)();
38
- }
39
- or(_opt) {
40
- return this;
41
- }
42
- or_else(_fn) {
43
- return this;
44
- }
45
- xor(optb) {
46
- if (optb.is_some()) {
47
- return (0, exports.None)();
48
- }
49
- return this;
50
- }
51
- unwrap() {
52
- return this.value;
53
- }
54
- unwrap_or(optb) {
55
- return this.value;
56
- }
57
- unwrap_or_else(_fn) {
58
- return this.value;
59
- }
60
- unwrap_or_default() {
61
- return this.value;
62
- }
63
- take() {
64
- const value = this.value;
65
- // @ts-ignore "administrative override" :-)
66
- this.value = undefined;
67
- return new OptionSome(value);
68
- }
69
- take_if(predicate) {
70
- if (predicate(this.value)) {
71
- return this.take();
72
- }
73
- return (0, exports.None)();
74
- }
75
- replace(value) {
76
- const oldValue = this.value;
77
- // @ts-ignore "administrative override" :-)
78
- this.value = value;
79
- return new OptionSome(oldValue);
80
- }
81
- zip(other) {
82
- if (other.is_some()) {
83
- return new OptionSome([this.value, other.unwrap()]);
84
- }
85
- return new OptionNone();
86
- }
87
- zip_with(other, f) {
88
- if (other.is_some()) {
89
- return new OptionSome(f(this.value, other.unwrap()));
90
- }
91
- return new OptionNone();
92
- }
93
- flatten() {
94
- if (this.value instanceof OptionSome) {
95
- // If the value is an OptionSome, we return it directly.
96
- return this.value;
97
- }
98
- else {
99
- // If the value is not an OptionSome (meaning it's an OptionNone or another type),
100
- // we return None<T>(). This assumes that None<T>() creates an OptionNone<T> instance.
101
- return (0, exports.None)();
102
- }
103
- }
104
- }
105
- exports.OptionSome = OptionSome;
106
- class OptionNone {
107
- constructor() {
108
- this._tag = 'None';
109
- }
110
- is_some() {
111
- return false;
112
- }
113
- is_some_and(_f) {
114
- return false;
115
- }
116
- is_none() {
117
- return true;
118
- }
119
- expect(msg) {
120
- throw new Error(msg);
121
- }
122
- map(_fn) {
123
- return this;
124
- }
125
- map_or(defaultVal, _fn) {
126
- return defaultVal;
127
- }
128
- and(_opt) {
129
- return this;
130
- }
131
- and_then(_fn) {
132
- return this;
133
- }
134
- filter(_predicate) {
135
- return this;
136
- }
137
- or(opt) {
138
- return opt;
139
- }
140
- or_else(fn) {
141
- return fn();
142
- }
143
- xor(optb) {
144
- return optb;
145
- }
146
- unwrap() {
147
- throw new Error('Called Option.unwrap() on a None value');
148
- }
149
- unwrap_or(optb) {
150
- return optb;
151
- }
152
- unwrap_or_else(fn) {
153
- return fn();
154
- }
155
- unwrap_or_default() {
156
- return null;
157
- }
158
- take() {
159
- return this;
160
- }
161
- take_if(_predicate) {
162
- return this;
163
- }
164
- replace(value) {
165
- return new OptionSome(value);
166
- }
167
- zip(other) {
168
- return (0, exports.None)();
169
- }
170
- zip_with(_other, _f) {
171
- return (0, exports.None)();
172
- }
173
- flatten() {
174
- return this;
175
- }
176
- }
177
- exports.OptionNone = OptionNone;
178
- const Some = (val) => {
179
- return new OptionSome(val);
180
- };
181
- exports.Some = Some;
182
- const None = () => {
183
- return new OptionNone();
184
- };
185
- exports.None = None;
186
- const option_from_nullable = (val) => {
187
- if (val === null || val === undefined) {
188
- return (0, exports.None)();
189
- }
190
- return (0, exports.Some)(val);
191
- };
192
- exports.option_from_nullable = option_from_nullable;
193
- const option_from_promise = (promise) => promise.then(exports.Some).catch(() => (0, exports.None)());
194
- exports.option_from_promise = option_from_promise;
195
- //# sourceMappingURL=option.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"option.js","sourceRoot":"","sources":["../src/option.ts"],"names":[],"mappings":";;;AAyRA,MAAa,UAAU;IAKnB,YAAqB,KAAQ;QAAR,UAAK,GAAL,KAAK,CAAG;QAJpB,SAAI,GAAG,MAAe,CAAC;IAIC,CAAC;IAElC,OAAO;QACH,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,WAAW,CAAC,CAAsB;QAC9B,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAED,OAAO;QACH,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,IAAY;QACf,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,GAAG,CAAI,EAAiB;QACpB,OAAO,IAAI,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