@praha/byethrow 0.4.1 → 0.6.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/cjs/exports.cjs +78 -51
- package/dist/cjs/exports.d.ts +3 -0
- package/dist/cjs/functions/assert-failure.cjs +40 -0
- package/dist/cjs/functions/assert-failure.d.ts +46 -0
- package/dist/cjs/functions/assert-success.cjs +40 -0
- package/dist/cjs/functions/assert-success.d.ts +46 -0
- package/dist/cjs/functions/parse.cjs +46 -0
- package/dist/cjs/functions/parse.d.ts +37 -0
- package/dist/cjs/functions/unwrap-error.d.ts +2 -0
- package/dist/cjs/functions/unwrap.d.ts +2 -0
- package/dist/esm/exports.d.ts +3 -0
- package/dist/esm/exports.js +3 -0
- package/dist/esm/functions/assert-failure.d.ts +46 -0
- package/dist/esm/functions/assert-failure.js +6 -0
- package/dist/esm/functions/assert-success.d.ts +46 -0
- package/dist/esm/functions/assert-success.js +6 -0
- package/dist/esm/functions/parse.d.ts +37 -0
- package/dist/esm/functions/parse.js +12 -0
- package/dist/esm/functions/unwrap-error.d.ts +2 -0
- package/dist/esm/functions/unwrap.d.ts +2 -0
- package/package.json +4 -1
package/dist/cjs/exports.cjs
CHANGED
@@ -6,6 +6,12 @@ var __webpack_modules__ = {
|
|
6
6
|
"./functions/and-through": function(module) {
|
7
7
|
module.exports = require("./functions/and-through.cjs");
|
8
8
|
},
|
9
|
+
"./functions/assert-failure": function(module) {
|
10
|
+
module.exports = require("./functions/assert-failure.cjs");
|
11
|
+
},
|
12
|
+
"./functions/assert-success": function(module) {
|
13
|
+
module.exports = require("./functions/assert-success.cjs");
|
14
|
+
},
|
9
15
|
"./functions/bind": function(module) {
|
10
16
|
module.exports = require("./functions/bind.cjs");
|
11
17
|
},
|
@@ -42,6 +48,9 @@ var __webpack_modules__ = {
|
|
42
48
|
"./functions/or-else": function(module) {
|
43
49
|
module.exports = require("./functions/or-else.cjs");
|
44
50
|
},
|
51
|
+
"./functions/parse": function(module) {
|
52
|
+
module.exports = require("./functions/parse.cjs");
|
53
|
+
},
|
45
54
|
"./functions/pipe": function(module) {
|
46
55
|
module.exports = require("./functions/pipe.cjs");
|
47
56
|
},
|
@@ -122,106 +131,124 @@ var __webpack_exports__ = {};
|
|
122
131
|
return _functions_and_through__WEBPACK_IMPORTED_MODULE_2__[key];
|
123
132
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
124
133
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
125
|
-
var
|
134
|
+
var _functions_assert_failure__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./functions/assert-failure");
|
135
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
136
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_assert_failure__WEBPACK_IMPORTED_MODULE_3__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
137
|
+
return _functions_assert_failure__WEBPACK_IMPORTED_MODULE_3__[key];
|
138
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
139
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
140
|
+
var _functions_assert_success__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./functions/assert-success");
|
141
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
142
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_assert_success__WEBPACK_IMPORTED_MODULE_4__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
143
|
+
return _functions_assert_success__WEBPACK_IMPORTED_MODULE_4__[key];
|
144
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
145
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
146
|
+
var _functions_bind__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./functions/bind");
|
147
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
148
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_bind__WEBPACK_IMPORTED_MODULE_5__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
149
|
+
return _functions_bind__WEBPACK_IMPORTED_MODULE_5__[key];
|
150
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
151
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
152
|
+
var _functions_combine__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./functions/combine");
|
126
153
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
127
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
128
|
-
return
|
154
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_combine__WEBPACK_IMPORTED_MODULE_6__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
155
|
+
return _functions_combine__WEBPACK_IMPORTED_MODULE_6__[key];
|
129
156
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
130
157
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
131
|
-
var
|
158
|
+
var _functions_do__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("./functions/do");
|
132
159
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
133
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
134
|
-
return
|
160
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_do__WEBPACK_IMPORTED_MODULE_7__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
161
|
+
return _functions_do__WEBPACK_IMPORTED_MODULE_7__[key];
|
135
162
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
136
163
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
137
|
-
var
|
164
|
+
var _functions_fail__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("./functions/fail");
|
138
165
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
139
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
140
|
-
return
|
166
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_fail__WEBPACK_IMPORTED_MODULE_8__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
167
|
+
return _functions_fail__WEBPACK_IMPORTED_MODULE_8__[key];
|
141
168
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
142
169
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
143
|
-
var
|
170
|
+
var _functions_inspect__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("./functions/inspect");
|
144
171
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
145
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
146
|
-
return
|
172
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_inspect__WEBPACK_IMPORTED_MODULE_9__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
173
|
+
return _functions_inspect__WEBPACK_IMPORTED_MODULE_9__[key];
|
147
174
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
148
175
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
149
|
-
var
|
176
|
+
var _functions_inspect_error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("./functions/inspect-error");
|
150
177
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
151
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
152
|
-
return
|
178
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_inspect_error__WEBPACK_IMPORTED_MODULE_10__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
179
|
+
return _functions_inspect_error__WEBPACK_IMPORTED_MODULE_10__[key];
|
153
180
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
154
181
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
155
|
-
var
|
182
|
+
var _functions_is_failure__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("./functions/is-failure");
|
156
183
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
157
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
158
|
-
return
|
184
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_is_failure__WEBPACK_IMPORTED_MODULE_11__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
185
|
+
return _functions_is_failure__WEBPACK_IMPORTED_MODULE_11__[key];
|
159
186
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
160
187
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
161
|
-
var
|
188
|
+
var _functions_is_result__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("./functions/is-result");
|
162
189
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
163
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
164
|
-
return
|
190
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_is_result__WEBPACK_IMPORTED_MODULE_12__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
191
|
+
return _functions_is_result__WEBPACK_IMPORTED_MODULE_12__[key];
|
165
192
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
166
193
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
167
|
-
var
|
194
|
+
var _functions_is_success__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("./functions/is-success");
|
168
195
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
169
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
170
|
-
return
|
196
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_is_success__WEBPACK_IMPORTED_MODULE_13__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
197
|
+
return _functions_is_success__WEBPACK_IMPORTED_MODULE_13__[key];
|
171
198
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
172
199
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
173
|
-
var
|
200
|
+
var _functions_map__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("./functions/map");
|
174
201
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
175
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
176
|
-
return
|
202
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_map__WEBPACK_IMPORTED_MODULE_14__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
203
|
+
return _functions_map__WEBPACK_IMPORTED_MODULE_14__[key];
|
177
204
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
178
205
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
179
|
-
var
|
206
|
+
var _functions_map_error__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("./functions/map-error");
|
180
207
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
181
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
182
|
-
return
|
208
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_map_error__WEBPACK_IMPORTED_MODULE_15__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
209
|
+
return _functions_map_error__WEBPACK_IMPORTED_MODULE_15__[key];
|
183
210
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
184
211
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
185
|
-
var
|
212
|
+
var _functions_or_else__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("./functions/or-else");
|
186
213
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
187
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
188
|
-
return
|
214
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_or_else__WEBPACK_IMPORTED_MODULE_16__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
215
|
+
return _functions_or_else__WEBPACK_IMPORTED_MODULE_16__[key];
|
189
216
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
190
217
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
191
|
-
var
|
218
|
+
var _functions_parse__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("./functions/parse");
|
192
219
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
193
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
194
|
-
return
|
220
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_parse__WEBPACK_IMPORTED_MODULE_17__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
221
|
+
return _functions_parse__WEBPACK_IMPORTED_MODULE_17__[key];
|
195
222
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
196
223
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
197
|
-
var
|
224
|
+
var _functions_pipe__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("./functions/pipe");
|
198
225
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
199
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
200
|
-
return
|
226
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_pipe__WEBPACK_IMPORTED_MODULE_18__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
227
|
+
return _functions_pipe__WEBPACK_IMPORTED_MODULE_18__[key];
|
201
228
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
202
229
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
203
|
-
var
|
230
|
+
var _functions_succeed__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("./functions/succeed");
|
204
231
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
205
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
206
|
-
return
|
232
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_succeed__WEBPACK_IMPORTED_MODULE_19__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
233
|
+
return _functions_succeed__WEBPACK_IMPORTED_MODULE_19__[key];
|
207
234
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
208
235
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
209
|
-
var
|
236
|
+
var _functions_try__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("./functions/try");
|
210
237
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
211
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
212
|
-
return
|
238
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_try__WEBPACK_IMPORTED_MODULE_20__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
239
|
+
return _functions_try__WEBPACK_IMPORTED_MODULE_20__[key];
|
213
240
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
214
241
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
215
|
-
var
|
242
|
+
var _functions_unwrap__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("./functions/unwrap");
|
216
243
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
217
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
218
|
-
return
|
244
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_unwrap__WEBPACK_IMPORTED_MODULE_21__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
245
|
+
return _functions_unwrap__WEBPACK_IMPORTED_MODULE_21__[key];
|
219
246
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
220
247
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
221
|
-
var
|
248
|
+
var _functions_unwrap_error__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("./functions/unwrap-error");
|
222
249
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
223
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
224
|
-
return
|
250
|
+
for(var __WEBPACK_IMPORT_KEY__ in _functions_unwrap_error__WEBPACK_IMPORTED_MODULE_22__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
251
|
+
return _functions_unwrap_error__WEBPACK_IMPORTED_MODULE_22__[key];
|
225
252
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
226
253
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
227
254
|
})();
|
package/dist/cjs/exports.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
export * from './result';
|
2
2
|
export * from './functions/and-then';
|
3
3
|
export * from './functions/and-through';
|
4
|
+
export * from './functions/assert-failure';
|
5
|
+
export * from './functions/assert-success';
|
4
6
|
export * from './functions/bind';
|
5
7
|
export * from './functions/combine';
|
6
8
|
export * from './functions/do';
|
@@ -13,6 +15,7 @@ export * from './functions/is-success';
|
|
13
15
|
export * from './functions/map';
|
14
16
|
export * from './functions/map-error';
|
15
17
|
export * from './functions/or-else';
|
18
|
+
export * from './functions/parse';
|
16
19
|
export * from './functions/pipe';
|
17
20
|
export * from './functions/succeed';
|
18
21
|
export * from './functions/try';
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __webpack_require__ = {};
|
3
|
+
(()=>{
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
6
|
+
enumerable: true,
|
7
|
+
get: definition[key]
|
8
|
+
});
|
9
|
+
};
|
10
|
+
})();
|
11
|
+
(()=>{
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
13
|
+
})();
|
14
|
+
(()=>{
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
17
|
+
value: 'Module'
|
18
|
+
});
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
20
|
+
value: true
|
21
|
+
});
|
22
|
+
};
|
23
|
+
})();
|
24
|
+
var __webpack_exports__ = {};
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
27
|
+
assertFailure: ()=>assertFailure
|
28
|
+
});
|
29
|
+
const external_is_success_cjs_namespaceObject = require("./is-success.cjs");
|
30
|
+
const assertFailure = (result)=>{
|
31
|
+
if ((0, external_is_success_cjs_namespaceObject.isSuccess)(result)) throw new Error('Expected a Failure result, but received a Success');
|
32
|
+
return result;
|
33
|
+
};
|
34
|
+
exports.assertFailure = __webpack_exports__.assertFailure;
|
35
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
36
|
+
"assertFailure"
|
37
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
38
|
+
Object.defineProperty(exports, '__esModule', {
|
39
|
+
value: true
|
40
|
+
});
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import type { Failure, Result } from '../result';
|
2
|
+
/**
|
3
|
+
* Asserts that a {@link Result} is a {@link Failure} and returns it.
|
4
|
+
* If the result is a {@link Success}, throws an error.
|
5
|
+
*
|
6
|
+
* @function
|
7
|
+
* @typeParam E - The type of the error value.
|
8
|
+
* @param result - The {@link Result} to assert as a {@link Failure}.
|
9
|
+
* @returns The {@link Failure} result.
|
10
|
+
* @throws {Error} If the result is a {@link Success}.
|
11
|
+
*
|
12
|
+
* @example
|
13
|
+
* ```ts
|
14
|
+
* import { Result } from '@praha/byethrow';
|
15
|
+
*
|
16
|
+
* const result: Result.Result<number, string> = Result.fail('error');
|
17
|
+
* const failure = Result.assertFailure(result);
|
18
|
+
* // failure: { type: 'Failure', error: 'error' }
|
19
|
+
* ```
|
20
|
+
*
|
21
|
+
* @example Throws on Success
|
22
|
+
* ```ts
|
23
|
+
* import { Result } from '@praha/byethrow';
|
24
|
+
*
|
25
|
+
* const result: Result.Result<number, string> = Result.succeed(42);
|
26
|
+
* Result.assertFailure(result); // throws Error
|
27
|
+
* ```
|
28
|
+
*
|
29
|
+
* @example Safe unwrap with assertFailure
|
30
|
+
* ```ts
|
31
|
+
* import { Result } from '@praha/byethrow';
|
32
|
+
*
|
33
|
+
* const result: Result.Result<number, string> = getResult();
|
34
|
+
* const value = Result.pipe(
|
35
|
+
* result,
|
36
|
+
* Result.andThen(() => Result.fail('die')),
|
37
|
+
* Result.assertFailure,
|
38
|
+
* Result.unwrapError(), // Safe unwrap after assertion
|
39
|
+
* );
|
40
|
+
* ```
|
41
|
+
*
|
42
|
+
* @see {@link unwrapError} - Use with `assertFailure` to safely unwrap error values.
|
43
|
+
*
|
44
|
+
* @category Assertions
|
45
|
+
*/
|
46
|
+
export declare const assertFailure: <E>(result: Result<never, E>) => Failure<E>;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __webpack_require__ = {};
|
3
|
+
(()=>{
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
6
|
+
enumerable: true,
|
7
|
+
get: definition[key]
|
8
|
+
});
|
9
|
+
};
|
10
|
+
})();
|
11
|
+
(()=>{
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
13
|
+
})();
|
14
|
+
(()=>{
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
17
|
+
value: 'Module'
|
18
|
+
});
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
20
|
+
value: true
|
21
|
+
});
|
22
|
+
};
|
23
|
+
})();
|
24
|
+
var __webpack_exports__ = {};
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
27
|
+
assertSuccess: ()=>assertSuccess
|
28
|
+
});
|
29
|
+
const external_is_failure_cjs_namespaceObject = require("./is-failure.cjs");
|
30
|
+
const assertSuccess = (result)=>{
|
31
|
+
if ((0, external_is_failure_cjs_namespaceObject.isFailure)(result)) throw new Error('Expected a Success result, but received a Failure');
|
32
|
+
return result;
|
33
|
+
};
|
34
|
+
exports.assertSuccess = __webpack_exports__.assertSuccess;
|
35
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
36
|
+
"assertSuccess"
|
37
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
38
|
+
Object.defineProperty(exports, '__esModule', {
|
39
|
+
value: true
|
40
|
+
});
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import type { Result, Success } from '../result';
|
2
|
+
/**
|
3
|
+
* Asserts that a {@link Result} is a {@link Success} and returns it.
|
4
|
+
* If the result is a {@link Failure}, throws an error.
|
5
|
+
*
|
6
|
+
* @function
|
7
|
+
* @typeParam T - The type of the success value.
|
8
|
+
* @param result - The {@link Result} to assert as a {@link Success}.
|
9
|
+
* @returns The {@link Success} result.
|
10
|
+
* @throws {Error} If the result is a {@link Failure}.
|
11
|
+
*
|
12
|
+
* @example
|
13
|
+
* ```ts
|
14
|
+
* import { Result } from '@praha/byethrow';
|
15
|
+
*
|
16
|
+
* const result: Result.Result<number, string> = Result.succeed(42);
|
17
|
+
* const success = Result.assertSuccess(result);
|
18
|
+
* // success: { type: 'Success', value: 42 }
|
19
|
+
* ```
|
20
|
+
*
|
21
|
+
* @example Throws on Failure
|
22
|
+
* ```ts
|
23
|
+
* import { Result } from '@praha/byethrow';
|
24
|
+
*
|
25
|
+
* const result: Result.Result<number, string> = Result.fail('error');
|
26
|
+
* Result.assertSuccess(result); // throws Error
|
27
|
+
* ```
|
28
|
+
*
|
29
|
+
* @example Safe unwrap with assertSuccess
|
30
|
+
* ```ts
|
31
|
+
* import { Result } from '@praha/byethrow';
|
32
|
+
*
|
33
|
+
* const result: Result.Result<string, string> = getResult();
|
34
|
+
* const value = Result.pipe(
|
35
|
+
* result,
|
36
|
+
* Result.orElse(() => Result.succeed('fallback')),
|
37
|
+
* Result.assertSuccess,
|
38
|
+
* Result.unwrap(), // Safe unwrap after assertion
|
39
|
+
* );
|
40
|
+
* ```
|
41
|
+
*
|
42
|
+
* @see {@link unwrap} - Use with `assertSuccess` to safely unwrap success values.
|
43
|
+
*
|
44
|
+
* @category Assertions
|
45
|
+
*/
|
46
|
+
export declare const assertSuccess: <T>(result: Result<T, never>) => Success<T>;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __webpack_require__ = {};
|
3
|
+
(()=>{
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
6
|
+
enumerable: true,
|
7
|
+
get: definition[key]
|
8
|
+
});
|
9
|
+
};
|
10
|
+
})();
|
11
|
+
(()=>{
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
13
|
+
})();
|
14
|
+
(()=>{
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
17
|
+
value: 'Module'
|
18
|
+
});
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
20
|
+
value: true
|
21
|
+
});
|
22
|
+
};
|
23
|
+
})();
|
24
|
+
var __webpack_exports__ = {};
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
27
|
+
parse: ()=>parse
|
28
|
+
});
|
29
|
+
const external_fail_cjs_namespaceObject = require("./fail.cjs");
|
30
|
+
const external_succeed_cjs_namespaceObject = require("./succeed.cjs");
|
31
|
+
const is_promise_cjs_namespaceObject = require("../internals/helpers/is-promise.cjs");
|
32
|
+
const parse = (schema, ...args)=>{
|
33
|
+
const apply = (input)=>{
|
34
|
+
const result = schema['~standard']['validate'](input);
|
35
|
+
if ((0, is_promise_cjs_namespaceObject.isPromise)(result)) throw new TypeError('Schema validation must be synchronous');
|
36
|
+
return result.issues ? (0, external_fail_cjs_namespaceObject.fail)(result.issues) : (0, external_succeed_cjs_namespaceObject.succeed)(result.value);
|
37
|
+
};
|
38
|
+
return args.length <= 0 ? apply : apply(args[0]);
|
39
|
+
};
|
40
|
+
exports.parse = __webpack_exports__.parse;
|
41
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
42
|
+
"parse"
|
43
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
44
|
+
Object.defineProperty(exports, '__esModule', {
|
45
|
+
value: true
|
46
|
+
});
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import type { Result } from '../result';
|
2
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
3
|
+
/**
|
4
|
+
* Parses a value using a {@link https://github.com/standard-schema/standard-schema Standard Schema} compatible schema.
|
5
|
+
* Returns a {@link Result} with the parsed value on success or validation errors on failure.
|
6
|
+
*
|
7
|
+
* @function
|
8
|
+
* @typeParam S - The Standard Schema V1 compatible schema type.
|
9
|
+
* @returns A {@link Result} with the parsed value or validation errors.
|
10
|
+
*
|
11
|
+
* @example Basic Usage
|
12
|
+
* ```ts
|
13
|
+
* import { Result } from '@praha/byethrow';
|
14
|
+
* import { z } from 'zod';
|
15
|
+
*
|
16
|
+
* const schema = z.object({ name: z.string() });
|
17
|
+
* const result = Result.parse(schema, { name: 'John' });
|
18
|
+
* // Result.Result<{ name: string }, ReadonlyArray<StandardSchemaV1.Issue>>
|
19
|
+
* ```
|
20
|
+
*
|
21
|
+
* @example Curried Usage
|
22
|
+
* ```ts
|
23
|
+
* import { Result } from '@praha/byethrow';
|
24
|
+
* import { z } from 'zod';
|
25
|
+
*
|
26
|
+
* const schema = z.object({ name: z.string() });
|
27
|
+
* const parser = Result.parse(schema);
|
28
|
+
* const result = parser({ name: 'John' });
|
29
|
+
* // Result.Result<{ name: string }, ReadonlyArray<StandardSchemaV1.Issue>>
|
30
|
+
* ```
|
31
|
+
*
|
32
|
+
* @category Utilities
|
33
|
+
*/
|
34
|
+
export declare const parse: {
|
35
|
+
<S extends StandardSchemaV1>(schema: S): (value: unknown) => Result<StandardSchemaV1.InferOutput<S>, ReadonlyArray<StandardSchemaV1.Issue>>;
|
36
|
+
<S extends StandardSchemaV1>(schema: S, value: unknown): Result<StandardSchemaV1.InferOutput<S>, ReadonlyArray<StandardSchemaV1.Issue>>;
|
37
|
+
};
|
@@ -41,6 +41,8 @@ import type { InferFailure, ResultMaybeAsync } from '../result';
|
|
41
41
|
* const error = Result.unwrapError(result, 0); // 0
|
42
42
|
* ```
|
43
43
|
*
|
44
|
+
* @see {@link assertFailure} - When used with {@link assertFailure}, you can safely unwrap the {@link Result}.
|
45
|
+
*
|
44
46
|
* @category Unwraps
|
45
47
|
*/
|
46
48
|
export declare const unwrapError: {
|
@@ -41,6 +41,8 @@ import type { InferSuccess, ResultMaybeAsync } from '../result';
|
|
41
41
|
* const value = Result.unwrap(result, 0); // 0
|
42
42
|
* ```
|
43
43
|
*
|
44
|
+
* @see {@link assertSuccess} - When used with {@link assertSuccess}, you can safely unwrap the {@link Result}.
|
45
|
+
*
|
44
46
|
* @category Unwraps
|
45
47
|
*/
|
46
48
|
export declare const unwrap: {
|
package/dist/esm/exports.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
export * from './result';
|
2
2
|
export * from './functions/and-then';
|
3
3
|
export * from './functions/and-through';
|
4
|
+
export * from './functions/assert-failure';
|
5
|
+
export * from './functions/assert-success';
|
4
6
|
export * from './functions/bind';
|
5
7
|
export * from './functions/combine';
|
6
8
|
export * from './functions/do';
|
@@ -13,6 +15,7 @@ export * from './functions/is-success';
|
|
13
15
|
export * from './functions/map';
|
14
16
|
export * from './functions/map-error';
|
15
17
|
export * from './functions/or-else';
|
18
|
+
export * from './functions/parse';
|
16
19
|
export * from './functions/pipe';
|
17
20
|
export * from './functions/succeed';
|
18
21
|
export * from './functions/try';
|
package/dist/esm/exports.js
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
export * from "./result.js";
|
2
2
|
export * from "./functions/and-then.js";
|
3
3
|
export * from "./functions/and-through.js";
|
4
|
+
export * from "./functions/assert-failure.js";
|
5
|
+
export * from "./functions/assert-success.js";
|
4
6
|
export * from "./functions/bind.js";
|
5
7
|
export * from "./functions/combine.js";
|
6
8
|
export * from "./functions/do.js";
|
@@ -13,6 +15,7 @@ export * from "./functions/is-success.js";
|
|
13
15
|
export * from "./functions/map.js";
|
14
16
|
export * from "./functions/map-error.js";
|
15
17
|
export * from "./functions/or-else.js";
|
18
|
+
export * from "./functions/parse.js";
|
16
19
|
export * from "./functions/pipe.js";
|
17
20
|
export * from "./functions/succeed.js";
|
18
21
|
export * from "./functions/try.js";
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import type { Failure, Result } from '../result';
|
2
|
+
/**
|
3
|
+
* Asserts that a {@link Result} is a {@link Failure} and returns it.
|
4
|
+
* If the result is a {@link Success}, throws an error.
|
5
|
+
*
|
6
|
+
* @function
|
7
|
+
* @typeParam E - The type of the error value.
|
8
|
+
* @param result - The {@link Result} to assert as a {@link Failure}.
|
9
|
+
* @returns The {@link Failure} result.
|
10
|
+
* @throws {Error} If the result is a {@link Success}.
|
11
|
+
*
|
12
|
+
* @example
|
13
|
+
* ```ts
|
14
|
+
* import { Result } from '@praha/byethrow';
|
15
|
+
*
|
16
|
+
* const result: Result.Result<number, string> = Result.fail('error');
|
17
|
+
* const failure = Result.assertFailure(result);
|
18
|
+
* // failure: { type: 'Failure', error: 'error' }
|
19
|
+
* ```
|
20
|
+
*
|
21
|
+
* @example Throws on Success
|
22
|
+
* ```ts
|
23
|
+
* import { Result } from '@praha/byethrow';
|
24
|
+
*
|
25
|
+
* const result: Result.Result<number, string> = Result.succeed(42);
|
26
|
+
* Result.assertFailure(result); // throws Error
|
27
|
+
* ```
|
28
|
+
*
|
29
|
+
* @example Safe unwrap with assertFailure
|
30
|
+
* ```ts
|
31
|
+
* import { Result } from '@praha/byethrow';
|
32
|
+
*
|
33
|
+
* const result: Result.Result<number, string> = getResult();
|
34
|
+
* const value = Result.pipe(
|
35
|
+
* result,
|
36
|
+
* Result.andThen(() => Result.fail('die')),
|
37
|
+
* Result.assertFailure,
|
38
|
+
* Result.unwrapError(), // Safe unwrap after assertion
|
39
|
+
* );
|
40
|
+
* ```
|
41
|
+
*
|
42
|
+
* @see {@link unwrapError} - Use with `assertFailure` to safely unwrap error values.
|
43
|
+
*
|
44
|
+
* @category Assertions
|
45
|
+
*/
|
46
|
+
export declare const assertFailure: <E>(result: Result<never, E>) => Failure<E>;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import type { Result, Success } from '../result';
|
2
|
+
/**
|
3
|
+
* Asserts that a {@link Result} is a {@link Success} and returns it.
|
4
|
+
* If the result is a {@link Failure}, throws an error.
|
5
|
+
*
|
6
|
+
* @function
|
7
|
+
* @typeParam T - The type of the success value.
|
8
|
+
* @param result - The {@link Result} to assert as a {@link Success}.
|
9
|
+
* @returns The {@link Success} result.
|
10
|
+
* @throws {Error} If the result is a {@link Failure}.
|
11
|
+
*
|
12
|
+
* @example
|
13
|
+
* ```ts
|
14
|
+
* import { Result } from '@praha/byethrow';
|
15
|
+
*
|
16
|
+
* const result: Result.Result<number, string> = Result.succeed(42);
|
17
|
+
* const success = Result.assertSuccess(result);
|
18
|
+
* // success: { type: 'Success', value: 42 }
|
19
|
+
* ```
|
20
|
+
*
|
21
|
+
* @example Throws on Failure
|
22
|
+
* ```ts
|
23
|
+
* import { Result } from '@praha/byethrow';
|
24
|
+
*
|
25
|
+
* const result: Result.Result<number, string> = Result.fail('error');
|
26
|
+
* Result.assertSuccess(result); // throws Error
|
27
|
+
* ```
|
28
|
+
*
|
29
|
+
* @example Safe unwrap with assertSuccess
|
30
|
+
* ```ts
|
31
|
+
* import { Result } from '@praha/byethrow';
|
32
|
+
*
|
33
|
+
* const result: Result.Result<string, string> = getResult();
|
34
|
+
* const value = Result.pipe(
|
35
|
+
* result,
|
36
|
+
* Result.orElse(() => Result.succeed('fallback')),
|
37
|
+
* Result.assertSuccess,
|
38
|
+
* Result.unwrap(), // Safe unwrap after assertion
|
39
|
+
* );
|
40
|
+
* ```
|
41
|
+
*
|
42
|
+
* @see {@link unwrap} - Use with `assertSuccess` to safely unwrap success values.
|
43
|
+
*
|
44
|
+
* @category Assertions
|
45
|
+
*/
|
46
|
+
export declare const assertSuccess: <T>(result: Result<T, never>) => Success<T>;
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import type { Result } from '../result';
|
2
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
3
|
+
/**
|
4
|
+
* Parses a value using a {@link https://github.com/standard-schema/standard-schema Standard Schema} compatible schema.
|
5
|
+
* Returns a {@link Result} with the parsed value on success or validation errors on failure.
|
6
|
+
*
|
7
|
+
* @function
|
8
|
+
* @typeParam S - The Standard Schema V1 compatible schema type.
|
9
|
+
* @returns A {@link Result} with the parsed value or validation errors.
|
10
|
+
*
|
11
|
+
* @example Basic Usage
|
12
|
+
* ```ts
|
13
|
+
* import { Result } from '@praha/byethrow';
|
14
|
+
* import { z } from 'zod';
|
15
|
+
*
|
16
|
+
* const schema = z.object({ name: z.string() });
|
17
|
+
* const result = Result.parse(schema, { name: 'John' });
|
18
|
+
* // Result.Result<{ name: string }, ReadonlyArray<StandardSchemaV1.Issue>>
|
19
|
+
* ```
|
20
|
+
*
|
21
|
+
* @example Curried Usage
|
22
|
+
* ```ts
|
23
|
+
* import { Result } from '@praha/byethrow';
|
24
|
+
* import { z } from 'zod';
|
25
|
+
*
|
26
|
+
* const schema = z.object({ name: z.string() });
|
27
|
+
* const parser = Result.parse(schema);
|
28
|
+
* const result = parser({ name: 'John' });
|
29
|
+
* // Result.Result<{ name: string }, ReadonlyArray<StandardSchemaV1.Issue>>
|
30
|
+
* ```
|
31
|
+
*
|
32
|
+
* @category Utilities
|
33
|
+
*/
|
34
|
+
export declare const parse: {
|
35
|
+
<S extends StandardSchemaV1>(schema: S): (value: unknown) => Result<StandardSchemaV1.InferOutput<S>, ReadonlyArray<StandardSchemaV1.Issue>>;
|
36
|
+
<S extends StandardSchemaV1>(schema: S, value: unknown): Result<StandardSchemaV1.InferOutput<S>, ReadonlyArray<StandardSchemaV1.Issue>>;
|
37
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { fail } from "./fail.js";
|
2
|
+
import { succeed } from "./succeed.js";
|
3
|
+
import { isPromise } from "../internals/helpers/is-promise.js";
|
4
|
+
const parse = (schema, ...args)=>{
|
5
|
+
const apply = (input)=>{
|
6
|
+
const result = schema['~standard']['validate'](input);
|
7
|
+
if (isPromise(result)) throw new TypeError('Schema validation must be synchronous');
|
8
|
+
return result.issues ? fail(result.issues) : succeed(result.value);
|
9
|
+
};
|
10
|
+
return args.length <= 0 ? apply : apply(args[0]);
|
11
|
+
};
|
12
|
+
export { parse };
|
@@ -41,6 +41,8 @@ import type { InferFailure, ResultMaybeAsync } from '../result';
|
|
41
41
|
* const error = Result.unwrapError(result, 0); // 0
|
42
42
|
* ```
|
43
43
|
*
|
44
|
+
* @see {@link assertFailure} - When used with {@link assertFailure}, you can safely unwrap the {@link Result}.
|
45
|
+
*
|
44
46
|
* @category Unwraps
|
45
47
|
*/
|
46
48
|
export declare const unwrapError: {
|
@@ -41,6 +41,8 @@ import type { InferSuccess, ResultMaybeAsync } from '../result';
|
|
41
41
|
* const value = Result.unwrap(result, 0); // 0
|
42
42
|
* ```
|
43
43
|
*
|
44
|
+
* @see {@link assertSuccess} - When used with {@link assertSuccess}, you can safely unwrap the {@link Result}.
|
45
|
+
*
|
44
46
|
* @category Unwraps
|
45
47
|
*/
|
46
48
|
export declare const unwrap: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@praha/byethrow",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.6.0",
|
4
4
|
"description": "A lightweight, tree-shakable Result type package with a simple, consistent API designed",
|
5
5
|
"keywords": [
|
6
6
|
"javascript",
|
@@ -40,6 +40,9 @@
|
|
40
40
|
"LICENSE",
|
41
41
|
"README.md"
|
42
42
|
],
|
43
|
+
"dependencies": {
|
44
|
+
"@standard-schema/spec": "^1.0.0"
|
45
|
+
},
|
43
46
|
"devDependencies": {
|
44
47
|
"@rslib/core": "0.10.4",
|
45
48
|
"eslint": "9.30.1",
|