@nunofyobiz/effect-extras 0.0.2 → 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/README.md +14 -4
- package/dist/index.d.ts +605 -536
- package/dist/index.js +148 -142
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/ArrayX/ArrayX.ts +27 -25
- package/src/WarnResult/WarnResult.ts +1265 -0
- package/src/WarnResult/index.ts +1 -0
- package/src/index.ts +1 -1
- package/src/These/These.ts +0 -1173
- package/src/These/index.ts +0 -1
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# @nunofyobiz/effect-extras
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@nunofyobiz/effect-extras)
|
|
4
|
+
[](https://github.com/nunofyobiz/effect-extras/actions/workflows/ci.yml)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
|
|
3
7
|
Generic, framework-agnostic extensions of the [Effect](https://effect.website)
|
|
4
8
|
standard library. These are the `*X` utility modules — `ArrayX`, `OptionX`,
|
|
5
9
|
`RecordX`, `StructX`, and friends — that extend Effect's own modules with small,
|
|
@@ -12,7 +16,13 @@ whole point, and the bar every addition has to clear (see
|
|
|
12
16
|
[What belongs here](#what-belongs-here)).
|
|
13
17
|
|
|
14
18
|
```ts
|
|
15
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
ArrayX,
|
|
21
|
+
OptionX,
|
|
22
|
+
RecordX,
|
|
23
|
+
StructX,
|
|
24
|
+
nn,
|
|
25
|
+
} from "@nunofyobiz/effect-extras";
|
|
16
26
|
```
|
|
17
27
|
|
|
18
28
|
## Install
|
|
@@ -87,7 +97,7 @@ Each module is exported as a namespace from the package root:
|
|
|
87
97
|
|
|
88
98
|
| Module | Extends / purpose |
|
|
89
99
|
| -------------- | -------------------------------------------------------------------------- |
|
|
90
|
-
| `ArrayX` | Array helpers (grouping, ordered insertion, `
|
|
100
|
+
| `ArrayX` | Array helpers (grouping, ordered insertion, `WarnResult`-zip) |
|
|
91
101
|
| `BigIntX` | BigInt helpers (`toNumberOrThrow`) |
|
|
92
102
|
| `BooleanX` | Boolean helpers |
|
|
93
103
|
| `DurationX` | Duration / DateTime diff helpers |
|
|
@@ -104,9 +114,9 @@ Each module is exported as a namespace from the package root:
|
|
|
104
114
|
| `ResultX` | `Result` bridges (`fromOption`) |
|
|
105
115
|
| `SchemaX` | Effect Schema extensions (`pick`/`omit`/`partial`, branded strings) |
|
|
106
116
|
| `SetX` | Native `Set` helpers |
|
|
107
|
-
| `StringX` | String helpers
|
|
117
|
+
| `StringX` | String helpers |
|
|
108
118
|
| `StructX` | Conditional object-field construction (`defined`, `filterDefined`, `some`) |
|
|
109
|
-
| `
|
|
119
|
+
| `WarnResult` | Inclusive-or result: a success value, warnings, or both |
|
|
110
120
|
|
|
111
121
|
## Development
|
|
112
122
|
|