@clipboard-health/util-ts 2.12.1 → 2.13.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 +5 -13
- package/package.json +1 -4
package/README.md
CHANGED
|
@@ -28,8 +28,7 @@ See `./src/lib` for each utility.
|
|
|
28
28
|
|
|
29
29
|
<!-- prettier-ignore -->
|
|
30
30
|
```ts
|
|
31
|
-
//
|
|
32
|
-
|
|
31
|
+
// packages/util-ts/examples/serviceError.ts
|
|
33
32
|
import { deepEqual, equal } from "node:assert/strict";
|
|
34
33
|
|
|
35
34
|
import { ERROR_CODES, ServiceError } from "@clipboard-health/util-ts";
|
|
@@ -116,8 +115,7 @@ try {
|
|
|
116
115
|
|
|
117
116
|
<!-- prettier-ignore -->
|
|
118
117
|
```ts
|
|
119
|
-
//
|
|
120
|
-
|
|
118
|
+
// packages/util-ts/examples/serviceResult.ts
|
|
121
119
|
import { ok } from "node:assert/strict";
|
|
122
120
|
|
|
123
121
|
import {
|
|
@@ -154,9 +152,7 @@ ok(E.isRight(validateUser({ email: "user@example.com", phone: "555-555-5555" }))
|
|
|
154
152
|
|
|
155
153
|
<!-- prettier-ignore -->
|
|
156
154
|
```ts
|
|
157
|
-
//
|
|
158
|
-
|
|
159
|
-
// packages/util-ts/src/lib/functional/pipe.ts
|
|
155
|
+
// packages/util-ts/examples/pipe.ts
|
|
160
156
|
import { equal } from "node:assert/strict";
|
|
161
157
|
|
|
162
158
|
import { pipe } from "@clipboard-health/util-ts";
|
|
@@ -177,9 +173,7 @@ equal(result, "Hello World");
|
|
|
177
173
|
|
|
178
174
|
<!-- prettier-ignore -->
|
|
179
175
|
```ts
|
|
180
|
-
//
|
|
181
|
-
|
|
182
|
-
// packages/util-ts/src/lib/functional/option.ts
|
|
176
|
+
// packages/util-ts/examples/option.ts
|
|
183
177
|
import { equal } from "node:assert/strict";
|
|
184
178
|
|
|
185
179
|
import { option as O, pipe } from "@clipboard-health/util-ts";
|
|
@@ -210,9 +204,7 @@ equal(result, "Result is 0.1");
|
|
|
210
204
|
|
|
211
205
|
<!-- prettier-ignore -->
|
|
212
206
|
```ts
|
|
213
|
-
//
|
|
214
|
-
|
|
215
|
-
// packages/util-ts/src/lib/functional/either.ts
|
|
207
|
+
// packages/util-ts/examples/either.ts
|
|
216
208
|
import { equal } from "node:assert/strict";
|
|
217
209
|
|
|
218
210
|
import { either as E, pipe } from "@clipboard-health/util-ts";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/util-ts",
|
|
3
3
|
"description": "TypeScript utilities.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.13.0",
|
|
5
5
|
"bugs": "https://github.com/ClipboardHealth/core-utils/issues",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"tslib": "2.8.0"
|
|
@@ -24,9 +24,6 @@
|
|
|
24
24
|
"type": "git",
|
|
25
25
|
"url": "git+https://github.com/ClipboardHealth/core-utils.git"
|
|
26
26
|
},
|
|
27
|
-
"scripts": {
|
|
28
|
-
"embed": "embedme README.md"
|
|
29
|
-
},
|
|
30
27
|
"type": "commonjs",
|
|
31
28
|
"typings": "./src/index.d.ts",
|
|
32
29
|
"types": "./src/index.d.ts"
|