@nunofyobiz/effect-extras 2.1.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/ArrayX.d.ts +0 -34
- package/dist/ArrayX.d.ts.map +1 -1
- package/dist/ArrayX.js +4 -58
- package/dist/ArrayX.js.map +1 -1
- package/dist/InclusiveOr.d.ts +1123 -0
- package/dist/InclusiveOr.d.ts.map +1 -0
- package/dist/InclusiveOr.js +1074 -0
- package/dist/InclusiveOr.js.map +1 -0
- package/dist/NonNullableX.d.ts.map +1 -1
- package/dist/NonNullableX.js +5 -0
- package/dist/NonNullableX.js.map +1 -1
- package/dist/OptionX.d.ts +8 -2
- package/dist/OptionX.d.ts.map +1 -1
- package/dist/OptionX.js +7 -1
- package/dist/OptionX.js.map +1 -1
- package/dist/PredicateX.d.ts +32 -0
- package/dist/PredicateX.d.ts.map +1 -1
- package/dist/PredicateX.js +38 -0
- package/dist/PredicateX.js.map +1 -1
- package/dist/RecordX.d.ts +128 -1
- package/dist/RecordX.d.ts.map +1 -1
- package/dist/RecordX.js +162 -1
- package/dist/RecordX.js.map +1 -1
- package/dist/StringX.d.ts +61 -0
- package/dist/StringX.d.ts.map +1 -1
- package/dist/StringX.js +68 -0
- package/dist/StringX.js.map +1 -1
- package/dist/WarnResult.d.ts +115 -70
- package/dist/WarnResult.d.ts.map +1 -1
- package/dist/WarnResult.js +141 -210
- package/dist/WarnResult.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/ArrayX.ts +4 -86
- package/src/InclusiveOr.ts +1255 -0
- package/src/NonNullableX.ts +5 -0
- package/src/OptionX.ts +8 -2
- package/src/PredicateX.ts +41 -0
- package/src/RecordX.ts +183 -1
- package/src/StringX.ts +113 -0
- package/src/WarnResult.ts +297 -227
- package/src/index.ts +1 -0
package/dist/WarnResult.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarnResult.d.ts","sourceRoot":"","sources":["../src/WarnResult.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WarnResult.d.ts","sourceRoot":"","sources":["../src/WarnResult.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAQ,MAAM,QAAQ,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC;IAC7C,YAAY,EAAE;QACZ,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;KACtB,CAAC;IAEF,WAAW,EAAE;QACX,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;KACrB,CAAC;IAEF,mBAAmB,EAAE;QACnB,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrB,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;KACrB,CAAC;CACH,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG;IACnD,IAAI,EAAE,cAAc,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG;IAClD,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IACzD,I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,GACrC,CAAC,EAAE,CAAC;CAQR,CAAC"}
|
package/dist/WarnResult.js
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @since 0.0.0
|
|
6
6
|
*/
|
|
7
|
-
import { Data, Effect, Option,
|
|
8
|
-
import {
|
|
7
|
+
import { Data, Effect, Option, pipe } from "effect";
|
|
8
|
+
import { dual } from "effect/Function";
|
|
9
|
+
import * as InclusiveOr from "./InclusiveOr.js";
|
|
9
10
|
const taggedEnum = /*#__PURE__*/Data.taggedEnum();
|
|
10
11
|
/**
|
|
11
12
|
* Constructs a `WarningsOnly` — a `WarnResult` that carries only `warnings`.
|
|
@@ -111,6 +112,56 @@ export const is = taggedEnum.$is;
|
|
|
111
112
|
* @since 0.0.0
|
|
112
113
|
*/
|
|
113
114
|
export const match = taggedEnum.$match;
|
|
115
|
+
/**
|
|
116
|
+
* Relabels a `WarnResult` as the equivalent terminology-free `InclusiveOr`,
|
|
117
|
+
* mapping `warnings` to `left` and `success` to `right`. The inverse of
|
|
118
|
+
* `fromInclusiveOr`.
|
|
119
|
+
*
|
|
120
|
+
* `WarnResult` is the use-case-driven (`warnings`/`success`) face of the generic
|
|
121
|
+
* `InclusiveOr` (`left`/`right`); every derived `WarnResult` operation is just this
|
|
122
|
+
* relabeling around the corresponding `InclusiveOr` operation, so all the logic
|
|
123
|
+
* lives in `InclusiveOr` and is never duplicated here.
|
|
124
|
+
*/
|
|
125
|
+
const toInclusiveOr = warnResult => match(warnResult, {
|
|
126
|
+
WarningsOnly: ({
|
|
127
|
+
warnings
|
|
128
|
+
}) => InclusiveOr.LeftOnly({
|
|
129
|
+
left: warnings
|
|
130
|
+
}),
|
|
131
|
+
SuccessOnly: ({
|
|
132
|
+
success
|
|
133
|
+
}) => InclusiveOr.RightOnly({
|
|
134
|
+
right: success
|
|
135
|
+
}),
|
|
136
|
+
SuccessWithWarnings: ({
|
|
137
|
+
warnings,
|
|
138
|
+
success
|
|
139
|
+
}) => InclusiveOr.LeftAndRight({
|
|
140
|
+
left: warnings,
|
|
141
|
+
right: success
|
|
142
|
+
})
|
|
143
|
+
});
|
|
144
|
+
function fromInclusiveOr(io) {
|
|
145
|
+
return InclusiveOr.match(io, {
|
|
146
|
+
LeftOnly: ({
|
|
147
|
+
left
|
|
148
|
+
}) => WarningsOnly({
|
|
149
|
+
warnings: left
|
|
150
|
+
}),
|
|
151
|
+
RightOnly: ({
|
|
152
|
+
right
|
|
153
|
+
}) => SuccessOnly({
|
|
154
|
+
success: right
|
|
155
|
+
}),
|
|
156
|
+
LeftAndRight: ({
|
|
157
|
+
left,
|
|
158
|
+
right
|
|
159
|
+
}) => SuccessWithWarnings({
|
|
160
|
+
warnings: left,
|
|
161
|
+
success: right
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
}
|
|
114
165
|
/**
|
|
115
166
|
* Builds a `WarnResult` known to carry `warnings`, choosing `SuccessWithWarnings`
|
|
116
167
|
* when a `success` value is present and `WarningsOnly` otherwise.
|
|
@@ -118,7 +169,7 @@ export const match = taggedEnum.$match;
|
|
|
118
169
|
* Use it when the `warnings` are mandatory and the `success` value is an optional
|
|
119
170
|
* companion: pass an absent (`null`/`undefined`) `success` to get a
|
|
120
171
|
* `WarningsOnly`, or a present one to get a `SuccessWithWarnings`. The return type
|
|
121
|
-
* `WithWarnings<
|
|
172
|
+
* `WithWarnings<A, W>` reflects that `warnings` are always present.
|
|
122
173
|
*
|
|
123
174
|
* @example
|
|
124
175
|
* ```ts
|
|
@@ -141,12 +192,10 @@ export const match = taggedEnum.$match;
|
|
|
141
192
|
export const WithWarnings = ({
|
|
142
193
|
warnings,
|
|
143
194
|
success
|
|
144
|
-
}) =>
|
|
145
|
-
warnings,
|
|
146
|
-
success
|
|
147
|
-
})
|
|
148
|
-
warnings
|
|
149
|
-
});
|
|
195
|
+
}) => fromInclusiveOr(InclusiveOr.WithLeft({
|
|
196
|
+
left: warnings,
|
|
197
|
+
right: success
|
|
198
|
+
}));
|
|
150
199
|
/**
|
|
151
200
|
* Builds a `WarnResult` known to carry a `success` value, choosing
|
|
152
201
|
* `SuccessWithWarnings` when `warnings` are present and `SuccessOnly` otherwise.
|
|
@@ -154,7 +203,7 @@ export const WithWarnings = ({
|
|
|
154
203
|
* The mirror of `WithWarnings`: the `success` value is mandatory and the
|
|
155
204
|
* `warnings` are an optional companion. Pass absent (`null`/`undefined`)
|
|
156
205
|
* `warnings` to get a `SuccessOnly`, or present ones to get a
|
|
157
|
-
* `SuccessWithWarnings`. The return type `WithSuccess<
|
|
206
|
+
* `SuccessWithWarnings`. The return type `WithSuccess<A, W>` reflects that a
|
|
158
207
|
* `success` value is always present.
|
|
159
208
|
*
|
|
160
209
|
* @example
|
|
@@ -178,12 +227,10 @@ export const WithWarnings = ({
|
|
|
178
227
|
export const WithSuccess = ({
|
|
179
228
|
warnings,
|
|
180
229
|
success
|
|
181
|
-
}) =>
|
|
182
|
-
warnings,
|
|
183
|
-
success
|
|
184
|
-
})
|
|
185
|
-
success
|
|
186
|
-
});
|
|
230
|
+
}) => fromInclusiveOr(InclusiveOr.WithRight({
|
|
231
|
+
left: warnings,
|
|
232
|
+
right: success
|
|
233
|
+
}));
|
|
187
234
|
/**
|
|
188
235
|
* Builds a `WarnResult` from a pair of possibly-nullish inputs, wrapping the
|
|
189
236
|
* result in an `Option` so the all-absent case is expressible.
|
|
@@ -221,25 +268,10 @@ export const WithSuccess = ({
|
|
|
221
268
|
export const optionFromNullables = ({
|
|
222
269
|
warnings,
|
|
223
270
|
success
|
|
224
|
-
}) => {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
success
|
|
229
|
-
}));
|
|
230
|
-
}
|
|
231
|
-
if (Predicate.isNotNullish(warnings)) {
|
|
232
|
-
return Option.some(WarningsOnly({
|
|
233
|
-
warnings
|
|
234
|
-
}));
|
|
235
|
-
}
|
|
236
|
-
if (Predicate.isNotNullish(success)) {
|
|
237
|
-
return Option.some(SuccessOnly({
|
|
238
|
-
success
|
|
239
|
-
}));
|
|
240
|
-
}
|
|
241
|
-
return Option.none();
|
|
242
|
-
};
|
|
271
|
+
}) => Option.map(InclusiveOr.optionFromNullables({
|
|
272
|
+
left: warnings,
|
|
273
|
+
right: success
|
|
274
|
+
}), io => fromInclusiveOr(io));
|
|
243
275
|
/**
|
|
244
276
|
* Builds a `WarnResult` from a pair of possibly-nullish inputs, falling back to
|
|
245
277
|
* the `orElse` thunk when both are absent.
|
|
@@ -320,19 +352,10 @@ export const fromNullables = ({
|
|
|
320
352
|
export const matchWarnings = ({
|
|
321
353
|
Warnings,
|
|
322
354
|
SuccessOnly
|
|
323
|
-
}) => warnResult =>
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
SuccessOnly: ({
|
|
328
|
-
success
|
|
329
|
-
}) => SuccessOnly(success),
|
|
330
|
-
SuccessWithWarnings: ({
|
|
331
|
-
warnings
|
|
332
|
-
}) => Warnings(warnings)
|
|
333
|
-
}),
|
|
334
|
-
// Make Typescript happy
|
|
335
|
-
a => a);
|
|
355
|
+
}) => warnResult => InclusiveOr.matchLeft({
|
|
356
|
+
Left: Warnings,
|
|
357
|
+
RightOnly: SuccessOnly
|
|
358
|
+
})(toInclusiveOr(warnResult));
|
|
336
359
|
/**
|
|
337
360
|
* Folds a `WarnResult` from the success value's perspective, collapsing the three
|
|
338
361
|
* tags into two handlers.
|
|
@@ -372,19 +395,10 @@ a => a);
|
|
|
372
395
|
export const matchSuccess = ({
|
|
373
396
|
WarningsOnly,
|
|
374
397
|
Success
|
|
375
|
-
}) => warnResult =>
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
SuccessOnly: ({
|
|
380
|
-
success
|
|
381
|
-
}) => Success(success),
|
|
382
|
-
SuccessWithWarnings: ({
|
|
383
|
-
success
|
|
384
|
-
}) => Success(success)
|
|
385
|
-
}),
|
|
386
|
-
// Make Typescript happy
|
|
387
|
-
a => a);
|
|
398
|
+
}) => warnResult => InclusiveOr.matchRight({
|
|
399
|
+
LeftOnly: WarningsOnly,
|
|
400
|
+
Right: Success
|
|
401
|
+
})(toInclusiveOr(warnResult));
|
|
388
402
|
/**
|
|
389
403
|
* Completes a `WarnResult` into a guaranteed `SuccessWithWarnings` by filling
|
|
390
404
|
* whichever side is missing from the matching `orElse` thunk.
|
|
@@ -419,27 +433,10 @@ a => a);
|
|
|
419
433
|
export const orElse = ({
|
|
420
434
|
orElseWarnings,
|
|
421
435
|
orElseSuccess
|
|
422
|
-
}) =>
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
warnings,
|
|
427
|
-
success: orElseSuccess()
|
|
428
|
-
}),
|
|
429
|
-
SuccessOnly: ({
|
|
430
|
-
success
|
|
431
|
-
}) => SuccessWithWarnings({
|
|
432
|
-
warnings: orElseWarnings(),
|
|
433
|
-
success
|
|
434
|
-
}),
|
|
435
|
-
SuccessWithWarnings: ({
|
|
436
|
-
warnings,
|
|
437
|
-
success
|
|
438
|
-
}) => SuccessWithWarnings({
|
|
439
|
-
warnings,
|
|
440
|
-
success
|
|
441
|
-
})
|
|
442
|
-
});
|
|
436
|
+
}) => warnResult => fromInclusiveOr(InclusiveOr.orElse({
|
|
437
|
+
orElseLeft: orElseWarnings,
|
|
438
|
+
orElseRight: orElseSuccess
|
|
439
|
+
})(toInclusiveOr(warnResult)));
|
|
443
440
|
/**
|
|
444
441
|
* Completes a `WarnResult` into a `SuccessWithWarnings` whose missing side is
|
|
445
442
|
* filled with `undefined`.
|
|
@@ -501,10 +498,7 @@ export const orUndefined = /*#__PURE__*/orElse({
|
|
|
501
498
|
* @category getters
|
|
502
499
|
* @since 0.0.0
|
|
503
500
|
*/
|
|
504
|
-
export const warningsOrElse = orElseReturn => warnResult =>
|
|
505
|
-
orElseWarnings: orElseReturn,
|
|
506
|
-
orElseSuccess: constUndefined
|
|
507
|
-
}), Struct.get("warnings"));
|
|
501
|
+
export const warningsOrElse = orElseReturn => warnResult => InclusiveOr.leftOrElse(orElseReturn)(toInclusiveOr(warnResult));
|
|
508
502
|
/**
|
|
509
503
|
* Extracts the `warnings` of a `WarnResult`, returning `undefined` when no
|
|
510
504
|
* `warnings` are present.
|
|
@@ -557,10 +551,7 @@ export const warningsOrUndefined = /*#__PURE__*/warningsOrElse(() => undefined);
|
|
|
557
551
|
* @category getters
|
|
558
552
|
* @since 0.0.0
|
|
559
553
|
*/
|
|
560
|
-
export const successOrElse = orElseReturn => warnResult =>
|
|
561
|
-
orElseWarnings: constUndefined,
|
|
562
|
-
orElseSuccess: orElseReturn
|
|
563
|
-
}), Struct.get("success"));
|
|
554
|
+
export const successOrElse = orElseReturn => warnResult => InclusiveOr.rightOrElse(orElseReturn)(toInclusiveOr(warnResult));
|
|
564
555
|
/**
|
|
565
556
|
* Extracts the `success` value of a `WarnResult`, returning `undefined` when no
|
|
566
557
|
* `success` value is present.
|
|
@@ -612,10 +603,7 @@ export const successOrUndefined = /*#__PURE__*/successOrElse(() => undefined);
|
|
|
612
603
|
* @category getters
|
|
613
604
|
* @since 0.0.0
|
|
614
605
|
*/
|
|
615
|
-
export const successOption = warnResult =>
|
|
616
|
-
WarningsOnly: () => Option.none(),
|
|
617
|
-
Success: Option.some
|
|
618
|
-
}));
|
|
606
|
+
export const successOption = warnResult => InclusiveOr.rightOption(toInclusiveOr(warnResult));
|
|
619
607
|
/**
|
|
620
608
|
* Extracts the `warnings` of a `WarnResult` as an `Option`.
|
|
621
609
|
*
|
|
@@ -640,10 +628,7 @@ export const successOption = warnResult => pipe(warnResult, matchSuccess({
|
|
|
640
628
|
* @category getters
|
|
641
629
|
* @since 0.0.0
|
|
642
630
|
*/
|
|
643
|
-
export const warningsOption = warnResult =>
|
|
644
|
-
Warnings: Option.some,
|
|
645
|
-
SuccessOnly: () => Option.none()
|
|
646
|
-
}));
|
|
631
|
+
export const warningsOption = warnResult => InclusiveOr.leftOption(toInclusiveOr(warnResult));
|
|
647
632
|
/**
|
|
648
633
|
* Transforms both sides of a `WarnResult`, applying `mapWarnings` to any
|
|
649
634
|
* `warnings` and `mapSuccess` to any `success` value.
|
|
@@ -678,25 +663,10 @@ export const warningsOption = warnResult => pipe(warnResult, matchWarnings({
|
|
|
678
663
|
export const mapBoth = ({
|
|
679
664
|
mapWarnings,
|
|
680
665
|
mapSuccess
|
|
681
|
-
}) =>
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
warnings: mapWarnings(warnings)
|
|
686
|
-
}),
|
|
687
|
-
SuccessOnly: ({
|
|
688
|
-
success
|
|
689
|
-
}) => SuccessOnly({
|
|
690
|
-
success: mapSuccess(success)
|
|
691
|
-
}),
|
|
692
|
-
SuccessWithWarnings: ({
|
|
693
|
-
warnings,
|
|
694
|
-
success
|
|
695
|
-
}) => SuccessWithWarnings({
|
|
696
|
-
warnings: mapWarnings(warnings),
|
|
697
|
-
success: mapSuccess(success)
|
|
698
|
-
})
|
|
699
|
-
});
|
|
666
|
+
}) => warnResult => fromInclusiveOr(InclusiveOr.mapBoth({
|
|
667
|
+
mapLeft: mapWarnings,
|
|
668
|
+
mapRight: mapSuccess
|
|
669
|
+
})(toInclusiveOr(warnResult)));
|
|
700
670
|
/**
|
|
701
671
|
* Effectful `mapBoth`: transforms each present side through an `Effect`,
|
|
702
672
|
* reassembling the results into a `WarnResult` inside an `Effect`.
|
|
@@ -730,31 +700,10 @@ export const mapBoth = ({
|
|
|
730
700
|
export const mapBothEffect = ({
|
|
731
701
|
mapWarnings,
|
|
732
702
|
mapSuccess
|
|
733
|
-
}) =>
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
warnings: warnings2
|
|
738
|
-
}))),
|
|
739
|
-
SuccessOnly: ({
|
|
740
|
-
success
|
|
741
|
-
}) => pipe(mapSuccess(success), Effect.map(success2 => SuccessOnly({
|
|
742
|
-
success: success2
|
|
743
|
-
}))),
|
|
744
|
-
SuccessWithWarnings: ({
|
|
745
|
-
warnings,
|
|
746
|
-
success
|
|
747
|
-
}) => pipe(Effect.all({
|
|
748
|
-
warnings: mapWarnings(warnings),
|
|
749
|
-
success: mapSuccess(success)
|
|
750
|
-
}), Effect.map(({
|
|
751
|
-
warnings: warnings2,
|
|
752
|
-
success: success2
|
|
753
|
-
}) => SuccessWithWarnings({
|
|
754
|
-
warnings: warnings2,
|
|
755
|
-
success: success2
|
|
756
|
-
})))
|
|
757
|
-
});
|
|
703
|
+
}) => warnResult => pipe(toInclusiveOr(warnResult), InclusiveOr.mapBothEffect({
|
|
704
|
+
mapLeft: mapWarnings,
|
|
705
|
+
mapRight: mapSuccess
|
|
706
|
+
}), Effect.map(io => fromInclusiveOr(io)));
|
|
758
707
|
/**
|
|
759
708
|
* Transforms the `warnings` of a `WarnResult`, leaving any `success` value
|
|
760
709
|
* untouched.
|
|
@@ -784,10 +733,7 @@ export const mapBothEffect = ({
|
|
|
784
733
|
* @category mapping
|
|
785
734
|
* @since 0.0.0
|
|
786
735
|
*/
|
|
787
|
-
export const mapWarnings = mapWarnings =>
|
|
788
|
-
mapWarnings,
|
|
789
|
-
mapSuccess: identity
|
|
790
|
-
});
|
|
736
|
+
export const mapWarnings = mapWarnings => warnResult => fromInclusiveOr(InclusiveOr.mapLeft(mapWarnings)(toInclusiveOr(warnResult)));
|
|
791
737
|
/**
|
|
792
738
|
* Chains the `warnings` of a `WarnResult` into a new `WarnResult`, flattening the
|
|
793
739
|
* result.
|
|
@@ -820,19 +766,7 @@ export const mapWarnings = mapWarnings => mapBoth({
|
|
|
820
766
|
* @category sequencing
|
|
821
767
|
* @since 0.0.0
|
|
822
768
|
*/
|
|
823
|
-
export const flatMapWarnings = mapWarnings =>
|
|
824
|
-
WarningsOnly: ({
|
|
825
|
-
warnings
|
|
826
|
-
}) => mapWarnings(warnings),
|
|
827
|
-
SuccessOnly: ({
|
|
828
|
-
success
|
|
829
|
-
}) => SuccessOnly({
|
|
830
|
-
success
|
|
831
|
-
}),
|
|
832
|
-
SuccessWithWarnings: ({
|
|
833
|
-
warnings
|
|
834
|
-
}) => mapWarnings(warnings)
|
|
835
|
-
});
|
|
769
|
+
export const flatMapWarnings = mapWarnings => warnResult => fromInclusiveOr(InclusiveOr.flatMapLeft(warnings => toInclusiveOr(mapWarnings(warnings)))(toInclusiveOr(warnResult)));
|
|
836
770
|
/**
|
|
837
771
|
* Effectful `mapWarnings`: transforms the `warnings` of a `WarnResult` through an
|
|
838
772
|
* `Effect`, leaving any `success` value untouched.
|
|
@@ -861,10 +795,7 @@ export const flatMapWarnings = mapWarnings => match({
|
|
|
861
795
|
* @category sequencing
|
|
862
796
|
* @since 0.0.0
|
|
863
797
|
*/
|
|
864
|
-
export const mapWarningsEffect = mapWarnings =>
|
|
865
|
-
mapWarnings,
|
|
866
|
-
mapSuccess: Effect.succeed
|
|
867
|
-
});
|
|
798
|
+
export const mapWarningsEffect = mapWarnings => warnResult => pipe(toInclusiveOr(warnResult), InclusiveOr.mapLeftEffect(mapWarnings), Effect.map(io => fromInclusiveOr(io)));
|
|
868
799
|
/**
|
|
869
800
|
* Effectful `flatMapWarnings`: chains the `warnings` of a `WarnResult` into an
|
|
870
801
|
* `Effect` that yields a new `WarnResult`, flattening the result.
|
|
@@ -896,19 +827,7 @@ export const mapWarningsEffect = mapWarnings => mapBothEffect({
|
|
|
896
827
|
* @category sequencing
|
|
897
828
|
* @since 0.0.0
|
|
898
829
|
*/
|
|
899
|
-
export const flatMapWarningsEffect = mapWarnings =>
|
|
900
|
-
WarningsOnly: ({
|
|
901
|
-
warnings
|
|
902
|
-
}) => mapWarnings(warnings),
|
|
903
|
-
SuccessOnly: ({
|
|
904
|
-
success
|
|
905
|
-
}) => Effect.succeed(SuccessOnly({
|
|
906
|
-
success
|
|
907
|
-
})),
|
|
908
|
-
SuccessWithWarnings: ({
|
|
909
|
-
warnings
|
|
910
|
-
}) => mapWarnings(warnings)
|
|
911
|
-
});
|
|
830
|
+
export const flatMapWarningsEffect = mapWarnings => warnResult => pipe(toInclusiveOr(warnResult), InclusiveOr.flatMapLeftEffect(warnings => Effect.map(mapWarnings(warnings), toInclusiveOr)), Effect.map(io => fromInclusiveOr(io)));
|
|
912
831
|
/**
|
|
913
832
|
* Transforms the `success` value of a `WarnResult`, leaving any `warnings`
|
|
914
833
|
* untouched.
|
|
@@ -935,10 +854,7 @@ export const flatMapWarningsEffect = mapWarnings => match({
|
|
|
935
854
|
* @category mapping
|
|
936
855
|
* @since 0.0.0
|
|
937
856
|
*/
|
|
938
|
-
export const mapSuccess = mapSuccess =>
|
|
939
|
-
mapWarnings: identity,
|
|
940
|
-
mapSuccess
|
|
941
|
-
});
|
|
857
|
+
export const mapSuccess = mapSuccess => warnResult => fromInclusiveOr(InclusiveOr.mapRight(mapSuccess)(toInclusiveOr(warnResult)));
|
|
942
858
|
/**
|
|
943
859
|
* Chains the `success` value of a `WarnResult` into a new `WarnResult`, flattening
|
|
944
860
|
* the result.
|
|
@@ -969,19 +885,7 @@ export const mapSuccess = mapSuccess => mapBoth({
|
|
|
969
885
|
* @category sequencing
|
|
970
886
|
* @since 0.0.0
|
|
971
887
|
*/
|
|
972
|
-
export const flatMapSuccess = mapSuccess =>
|
|
973
|
-
WarningsOnly: ({
|
|
974
|
-
warnings
|
|
975
|
-
}) => WarningsOnly({
|
|
976
|
-
warnings
|
|
977
|
-
}),
|
|
978
|
-
SuccessOnly: ({
|
|
979
|
-
success
|
|
980
|
-
}) => mapSuccess(success),
|
|
981
|
-
SuccessWithWarnings: ({
|
|
982
|
-
success
|
|
983
|
-
}) => mapSuccess(success)
|
|
984
|
-
});
|
|
888
|
+
export const flatMapSuccess = mapSuccess => warnResult => fromInclusiveOr(InclusiveOr.flatMapRight(success => toInclusiveOr(mapSuccess(success)))(toInclusiveOr(warnResult)));
|
|
985
889
|
/**
|
|
986
890
|
* Effectful `mapSuccess`: transforms the `success` value of a `WarnResult` through
|
|
987
891
|
* an `Effect`, leaving any `warnings` untouched.
|
|
@@ -1010,10 +914,7 @@ export const flatMapSuccess = mapSuccess => match({
|
|
|
1010
914
|
* @category sequencing
|
|
1011
915
|
* @since 0.0.0
|
|
1012
916
|
*/
|
|
1013
|
-
export const mapSuccessEffect = mapSuccess =>
|
|
1014
|
-
mapWarnings: Effect.succeed,
|
|
1015
|
-
mapSuccess
|
|
1016
|
-
});
|
|
917
|
+
export const mapSuccessEffect = mapSuccess => warnResult => pipe(toInclusiveOr(warnResult), InclusiveOr.mapRightEffect(mapSuccess), Effect.map(io => fromInclusiveOr(io)));
|
|
1017
918
|
/**
|
|
1018
919
|
* Effectful `flatMapSuccess`: chains the `success` value of a `WarnResult` into an
|
|
1019
920
|
* `Effect` that yields a new `WarnResult`, flattening the result.
|
|
@@ -1044,17 +945,47 @@ export const mapSuccessEffect = mapSuccess => mapBothEffect({
|
|
|
1044
945
|
* @category sequencing
|
|
1045
946
|
* @since 0.0.0
|
|
1046
947
|
*/
|
|
1047
|
-
export const flatMapSuccessEffect = mapSuccess =>
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
948
|
+
export const flatMapSuccessEffect = mapSuccess => warnResult => pipe(toInclusiveOr(warnResult), InclusiveOr.flatMapRightEffect(success => Effect.map(mapSuccess(success), toInclusiveOr)), Effect.map(io => fromInclusiveOr(io)));
|
|
949
|
+
/**
|
|
950
|
+
* Zips two arrays into one, calling `f` with a `WarnResult` for each index so
|
|
951
|
+
* that length mismatches are handled explicitly rather than truncated.
|
|
952
|
+
*
|
|
953
|
+
* Unlike `Array.zipWith` (which stops at the shorter array), this walks to the
|
|
954
|
+
* length of the *longer* array. The first array's element fills the `warnings`
|
|
955
|
+
* side and the second array's element fills the `success` side, so at each index
|
|
956
|
+
* `f` receives a `WarnResult.WarnResult<B, A>`: `SuccessWithWarnings` when both
|
|
957
|
+
* arrays have an element, `WarningsOnly` when only the first does, and
|
|
958
|
+
* `SuccessOnly` when only the second does. Use it when the "extra" tail of either
|
|
959
|
+
* array still carries meaning.
|
|
960
|
+
*
|
|
961
|
+
* @example
|
|
962
|
+
* ```ts
|
|
963
|
+
* import { WarnResult } from "@nunofyobiz/effect-extras"
|
|
964
|
+
* import { pipe } from "effect"
|
|
965
|
+
*
|
|
966
|
+
* const describe = WarnResult.match({
|
|
967
|
+
* WarningsOnly: ({ warnings }) => `warnings ${warnings}`,
|
|
968
|
+
* SuccessOnly: ({ success }) => `success ${success}`,
|
|
969
|
+
* SuccessWithWarnings: ({ warnings, success }) => `both ${warnings}/${success}`
|
|
970
|
+
* })
|
|
971
|
+
*
|
|
972
|
+
* // data-first
|
|
973
|
+
* assert.deepStrictEqual(WarnResult.zip([1, 2, 3], [10, 20], describe), [
|
|
974
|
+
* "both 1/10",
|
|
975
|
+
* "both 2/20",
|
|
976
|
+
* "warnings 3"
|
|
977
|
+
* ])
|
|
978
|
+
*
|
|
979
|
+
* // data-last (pipeable)
|
|
980
|
+
* assert.deepStrictEqual(pipe([1, 2, 3], WarnResult.zip([10, 20], describe)), [
|
|
981
|
+
* "both 1/10",
|
|
982
|
+
* "both 2/20",
|
|
983
|
+
* "warnings 3"
|
|
984
|
+
* ])
|
|
985
|
+
* ```
|
|
986
|
+
*
|
|
987
|
+
* @category combinators
|
|
988
|
+
* @since 0.0.0
|
|
989
|
+
*/
|
|
990
|
+
export const zip = /*#__PURE__*/dual(3, (array1, array2, f) => InclusiveOr.zip(array1, array2, io => f(fromInclusiveOr(io))));
|
|
1060
991
|
//# sourceMappingURL=WarnResult.js.map
|
package/dist/WarnResult.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarnResult.js","names":["Data","Effect","Option","
|
|
1
|
+
{"version":3,"file":"WarnResult.js","names":["Data","Effect","Option","pipe","dual","InclusiveOr","taggedEnum","WarningsOnly","SuccessOnly","SuccessWithWarnings","is","$is","match","$match","toInclusiveOr","warnResult","warnings","LeftOnly","left","success","RightOnly","right","LeftAndRight","fromInclusiveOr","io","WithWarnings","WithLeft","WithSuccess","WithRight","optionFromNullables","map","fromNullables","orElse","Error","getOrElse","matchWarnings","Warnings","matchLeft","Left","matchSuccess","Success","matchRight","Right","orElseWarnings","orElseSuccess","orElseLeft","orElseRight","orUndefined","undefined","warningsOrElse","orElseReturn","leftOrElse","warningsOrUndefined","successOrElse","rightOrElse","successOrUndefined","successOption","rightOption","warningsOption","leftOption","mapBoth","mapWarnings","mapSuccess","mapLeft","mapRight","mapBothEffect","flatMapWarnings","flatMapLeft","mapWarningsEffect","mapLeftEffect","flatMapWarningsEffect","flatMapLeftEffect","flatMapSuccess","flatMapRight","mapSuccessEffect","mapRightEffect","flatMapSuccessEffect","flatMapRightEffect","zip","array1","array2","f"],"sources":["../src/WarnResult.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;AAMA,SAASA,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAEC,IAAI,QAAQ,QAAQ;AACnD,SAASC,IAAI,QAAQ,iBAAiB;AACtC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAiK/C,MAAMC,UAAU,gBAAGN,IAAI,CAACM,UAAU,EAAwB;AAE1D;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,YAAY,GAAGD,UAAU,CAACC,YAAY;AAEnD;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,WAAW,GAAGF,UAAU,CAACE,WAAW;AAEjD;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMC,mBAAmB,GAAGH,UAAU,CAACG,mBAAmB;AAEjE;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,MAAMC,EAAE,GAAGJ,UAAU,CAACK,GAAG;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,KAAK,GAAGN,UAAU,CAACO,MAAM;AAEtC;;;;;;;;;;AAUA,MAAMC,aAAa,GACjBC,UAA4B,IAE5BH,KAAK,CAACG,UAAU,EAAE;EAChBR,YAAY,EAAE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UAAU,CAAC,EACtC7D,MAAM,CAAC6B,GAAG,CAAEN,EAAE,IAAKD,eAAe,CAACC,EAAE,CAAC,CAAC,CACxC;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAMoD,oBAAoB,GAE7Bd,UAAsE,IAIvE/C,UAAU,IACTZ,IAAI,CACFW,aAAa,CAACC,UAAU,CAAC,EACzBV,WAAW,CAACwE,kBAAkB,CAAE1D,OAAW,IACzClB,MAAM,CAAC6B,GAAG,CAACgC,UAAU,CAAC3C,OAAO,CAAC,EAAEL,aAAa,CAAC,CAC/C,EACDb,MAAM,CAAC6B,GAAG,CAAEN,EAAE,IAAKD,eAAe,CAACC,EAAE,CAAC,CAAC,CACxC;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,OAAO,MAAMsD,GAAG,gBAUZ1E,IAAI,CACN,CAAC,EACD,CACE2E,MAAoB,EACpBC,MAAoB,EACpBC,CAAsC,KAC9B5E,WAAW,CAACyE,GAAG,CAACC,MAAM,EAAEC,MAAM,EAAGxD,EAAE,IAAKyD,CAAC,CAAC1D,eAAe,CAACC,EAAE,CAAC,CAAC,CAAC,CAC1E","ignoreList":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * as BooleanX from "./BooleanX.js";
|
|
|
4
4
|
export * as DurationX from "./DurationX.js";
|
|
5
5
|
export * as EffectX from "./EffectX.js";
|
|
6
6
|
export * as FormDataX from "./FormDataX.js";
|
|
7
|
+
export * as InclusiveOr from "./InclusiveOr.js";
|
|
7
8
|
export * as MapX from "./MapX.js";
|
|
8
9
|
export * as NonNullableX from "./NonNullableX.js";
|
|
9
10
|
export { fromNullableOrThrow as nn } from "./NonNullableX.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,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gBAAgB,CAAC;AAC5C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,mBAAmB,IAAI,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export * as BooleanX from "./BooleanX.js";
|
|
|
4
4
|
export * as DurationX from "./DurationX.js";
|
|
5
5
|
export * as EffectX from "./EffectX.js";
|
|
6
6
|
export * as FormDataX from "./FormDataX.js";
|
|
7
|
+
export * as InclusiveOr from "./InclusiveOr.js";
|
|
7
8
|
export * as MapX from "./MapX.js";
|
|
8
9
|
export * as NonNullableX from "./NonNullableX.js";
|
|
9
10
|
export { fromNullableOrThrow as nn } from "./NonNullableX.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ArrayX","BigIntX","BooleanX","DurationX","EffectX","FormDataX","MapX","NonNullableX","fromNullableOrThrow","nn","NumberX","OptionX","OrderX","PredicateX","PromiseX","RecordX","ResultX","SchemaX","SetX","StringX","StructX","WarnResult"],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,YAAY,MAAM,mBAAmB;AACjD,SAASC,mBAAmB,IAAIC,EAAE,QAAQ,mBAAmB;AAC7D,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAC7C,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,UAAU,MAAM,iBAAiB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ArrayX","BigIntX","BooleanX","DurationX","EffectX","FormDataX","InclusiveOr","MapX","NonNullableX","fromNullableOrThrow","nn","NumberX","OptionX","OrderX","PredicateX","PromiseX","RecordX","ResultX","SchemaX","SetX","StringX","StructX","WarnResult"],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,YAAY,MAAM,mBAAmB;AACjD,SAASC,mBAAmB,IAAIC,EAAE,QAAQ,mBAAmB;AAC7D,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAC7C,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,UAAU,MAAM,iBAAiB","ignoreList":[]}
|