@smbcheeky/error-object-from-payload 1.1.5

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/index.mjs ADDED
@@ -0,0 +1,573 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+
21
+ // src/index.ts
22
+ import { ErrorObject as ErrorObject2 } from "@smbcheeky/error-object";
23
+
24
+ // src/builder/index.ts
25
+ import { ErrorObject } from "@smbcheeky/error-object";
26
+
27
+ // src/utils.ts
28
+ var addPrefixPathVariants = (prefix, array) => {
29
+ if (typeof prefix === "string") {
30
+ return array.concat(
31
+ array.map((s) => typeof s === "string" ? `${prefix}.${s}` : s)
32
+ );
33
+ }
34
+ if (Array.isArray(prefix) && prefix.length > 0 && typeof (prefix == null ? void 0 : prefix[0]) === "string") {
35
+ const result = [...array];
36
+ for (const p of prefix) {
37
+ const temp = array.map((s) => typeof s === "string" ? `${p}.${s}` : s);
38
+ result.push(...temp);
39
+ }
40
+ return result;
41
+ }
42
+ return array;
43
+ };
44
+ var DEFAULT_BUILD_OPTIONS = {
45
+ pathToErrors: ["errors", "errs"],
46
+ pathToCode: addPrefixPathVariants("error", [
47
+ "code",
48
+ "err_code",
49
+ "errorCode",
50
+ "error_code"
51
+ ]),
52
+ pathToNumberCode: addPrefixPathVariants("error", [
53
+ "numberCode",
54
+ "err_number_code",
55
+ "errorNumberCode",
56
+ "error_number_code"
57
+ ]),
58
+ pathToMessage: addPrefixPathVariants("error", [
59
+ "message",
60
+ "err_message",
61
+ "errorMessage",
62
+ "error_message"
63
+ ]),
64
+ pathToDetails: addPrefixPathVariants("error", [
65
+ "details",
66
+ "err_details",
67
+ "errorDetails",
68
+ "error_details"
69
+ ]),
70
+ pathToDomain: addPrefixPathVariants("error", [
71
+ "domain",
72
+ "errorDomain",
73
+ "error_domain",
74
+ "err_domain",
75
+ "type"
76
+ ]),
77
+ transform: (beforeTransform) => {
78
+ let newCode = beforeTransform.code;
79
+ if (beforeTransform.code === void 0 || beforeTransform.code === null) {
80
+ const value = beforeTransform.numberCode;
81
+ if (value !== void 0 && value !== null) {
82
+ newCode = value.toString();
83
+ }
84
+ }
85
+ return __spreadProps(__spreadValues({}, beforeTransform), {
86
+ code: newCode
87
+ });
88
+ }
89
+ };
90
+
91
+ // src/builder/valuesFromPaths.ts
92
+ var __processAllValuesFromPaths = (objectToParse, options) => {
93
+ let codeBeforeTransform;
94
+ let codePath;
95
+ if (!("pathToCode" in options)) {
96
+ return "pathToCodeIsInvalid";
97
+ }
98
+ if (!Array.isArray(options.pathToCode)) {
99
+ return "pathToCodeIsNotAnArray";
100
+ }
101
+ for (const path of options.pathToCode) {
102
+ if (typeof path !== "string") {
103
+ return "pathToCodeValuesAreNotStrings";
104
+ }
105
+ const found = findNestedValueForPath(objectToParse, path);
106
+ if (found !== void 0 && found !== null) {
107
+ if (typeof found === "string") {
108
+ codePath = path;
109
+ codeBeforeTransform = found;
110
+ break;
111
+ }
112
+ if (Array.isArray(found) || typeof found === "object") {
113
+ codePath = path;
114
+ codeBeforeTransform = JSON.stringify(found);
115
+ break;
116
+ }
117
+ }
118
+ }
119
+ let numberCodeBeforeTransform;
120
+ let numberCodePath;
121
+ if (!("pathToNumberCode" in options)) {
122
+ return "pathToNumberCodeIsInvalid";
123
+ }
124
+ if (!Array.isArray(options.pathToNumberCode)) {
125
+ return "pathToNumberCodeIsNotAnArray";
126
+ }
127
+ for (const path of options.pathToNumberCode) {
128
+ if (typeof path !== "string") {
129
+ return "pathToNumberCodeValuesAreNotStrings";
130
+ }
131
+ const found = findNestedValueForPath(objectToParse, path);
132
+ if (found !== void 0 && found !== null && typeof found === "number" && !isNaN(found)) {
133
+ numberCodePath = path;
134
+ numberCodeBeforeTransform = found;
135
+ break;
136
+ }
137
+ }
138
+ let messageBeforeTransform;
139
+ let messagePath;
140
+ if (!("pathToMessage" in options)) {
141
+ return "pathToMessageIsInvalid";
142
+ }
143
+ if (!Array.isArray(options.pathToMessage)) {
144
+ return "pathToMessageIsNotAnArray";
145
+ }
146
+ for (const path of options.pathToMessage) {
147
+ if (typeof path !== "string") {
148
+ return "pathToMessageValuesAreNotStrings";
149
+ }
150
+ const found = findNestedValueForPath(objectToParse, path);
151
+ if (found !== void 0 && found !== null) {
152
+ if (typeof found === "string") {
153
+ messagePath = path;
154
+ messageBeforeTransform = found;
155
+ break;
156
+ }
157
+ if (Array.isArray(found) || typeof found === "object") {
158
+ messagePath = path;
159
+ messageBeforeTransform = JSON.stringify(found);
160
+ break;
161
+ }
162
+ }
163
+ }
164
+ let detailsBeforeTransform;
165
+ let detailsPath;
166
+ if (!("pathToDetails" in options)) {
167
+ return "pathToDetailsIsInvalid";
168
+ }
169
+ if (!Array.isArray(options.pathToDetails)) {
170
+ return "pathToDetailsIsNotAnArray";
171
+ }
172
+ for (const path of options.pathToDetails) {
173
+ if (typeof path !== "string") {
174
+ return "pathToDetailsValuesAreNotStrings";
175
+ }
176
+ const found = findNestedValueForPath(objectToParse, path);
177
+ if (found !== void 0 && found !== null) {
178
+ if (typeof found === "string") {
179
+ detailsPath = path;
180
+ detailsBeforeTransform = found;
181
+ break;
182
+ }
183
+ if (Array.isArray(found) || typeof found === "object") {
184
+ detailsPath = path;
185
+ detailsBeforeTransform = JSON.stringify(found);
186
+ break;
187
+ }
188
+ }
189
+ }
190
+ let domainBeforeTransform;
191
+ let domainPath;
192
+ if (!("pathToDomain" in options)) {
193
+ return "pathToDomainIsInvalid";
194
+ }
195
+ if (!Array.isArray(options.pathToDomain)) {
196
+ return "pathToDomainIsNotAnArray";
197
+ }
198
+ for (const path of options.pathToDomain) {
199
+ if (typeof path !== "string") {
200
+ return "pathToDomainValuesAreNotStrings";
201
+ }
202
+ const found = findNestedValueForPath(objectToParse, path);
203
+ if (found !== void 0 && found !== null) {
204
+ if (typeof found === "string") {
205
+ domainPath = path;
206
+ domainBeforeTransform = found;
207
+ break;
208
+ }
209
+ if (Array.isArray(found) || typeof found === "object") {
210
+ domainPath = path;
211
+ domainBeforeTransform = JSON.stringify(found);
212
+ break;
213
+ }
214
+ }
215
+ }
216
+ return {
217
+ codeBeforeTransform,
218
+ codePath,
219
+ numberCodeBeforeTransform,
220
+ numberCodePath,
221
+ messageBeforeTransform,
222
+ messagePath,
223
+ detailsBeforeTransform,
224
+ detailsPath,
225
+ domainBeforeTransform,
226
+ domainPath
227
+ };
228
+ };
229
+
230
+ // src/builder/index.ts
231
+ var buildSummariesFromObject = (input, withOptions) => {
232
+ try {
233
+ const options = withOptions != null ? withOptions : __spreadValues({}, DEFAULT_BUILD_OPTIONS);
234
+ if (input === void 0 || input === null) {
235
+ return ["isNullish"];
236
+ }
237
+ if (typeof input !== "object") {
238
+ return ["isNotAnObject"];
239
+ }
240
+ let errors = [];
241
+ let errorsPath;
242
+ let didDetectErrorsArray = false;
243
+ if ("pathToErrors" in options) {
244
+ if (!Array.isArray(options.pathToErrors)) {
245
+ return ["pathToErrorsIsNotAnArray"];
246
+ }
247
+ for (const path of options.pathToErrors) {
248
+ if (typeof path !== "string") {
249
+ return ["pathToErrorsValuesAreNotStrings"];
250
+ }
251
+ const found = findNestedValueForPath(input, path);
252
+ if (found && Array.isArray(found)) {
253
+ errors = found;
254
+ errorsPath = path;
255
+ didDetectErrorsArray = true;
256
+ break;
257
+ }
258
+ }
259
+ }
260
+ if (errors.length === 0) {
261
+ errors = [input];
262
+ }
263
+ let summaries = [];
264
+ for (const errorMaybeObject of errors) {
265
+ const summary = buildSummaryFromObject(
266
+ errorMaybeObject,
267
+ errorsPath,
268
+ didDetectErrorsArray,
269
+ options
270
+ );
271
+ summaries.push(summary);
272
+ }
273
+ return summaries;
274
+ } catch (generalError) {
275
+ ErrorObject.SHOW_ERROR_LOGS && console.log(
276
+ "[ErrorObject]",
277
+ "Error during buildSummariesFromObject():",
278
+ generalError
279
+ );
280
+ return ["generalBuildSummariesFromObjectError"];
281
+ }
282
+ };
283
+ var buildSummaryFromObject = (maybeObject, errorsPath, didDetectErrorsArray, withOptions) => {
284
+ try {
285
+ const options = withOptions != null ? withOptions : __spreadValues({}, DEFAULT_BUILD_OPTIONS);
286
+ if (maybeObject === void 0 || maybeObject === null) {
287
+ return "buildSummaryIsNullish";
288
+ }
289
+ let objectToParse;
290
+ if (typeof maybeObject === "string") {
291
+ try {
292
+ const json = JSON.parse(maybeObject);
293
+ if (json !== void 0 && json !== null && typeof json === "object") {
294
+ objectToParse = json;
295
+ }
296
+ } catch (e) {
297
+ }
298
+ if (objectToParse === maybeObject) {
299
+ objectToParse = { code: "unknown", message: maybeObject };
300
+ }
301
+ }
302
+ if (objectToParse === void 0 || objectToParse === null) {
303
+ objectToParse = maybeObject;
304
+ }
305
+ if (typeof objectToParse !== "object") {
306
+ return "buildSummaryIsNotAnObject";
307
+ }
308
+ const valuesResult = __processAllValuesFromPaths(objectToParse, options);
309
+ if (typeof valuesResult === "string") {
310
+ return valuesResult;
311
+ }
312
+ const {
313
+ codeBeforeTransform,
314
+ codePath,
315
+ numberCodeBeforeTransform,
316
+ numberCodePath,
317
+ messageBeforeTransform,
318
+ messagePath,
319
+ detailsBeforeTransform,
320
+ detailsPath,
321
+ domainBeforeTransform,
322
+ domainPath
323
+ } = valuesResult;
324
+ if ("transform" in options && typeof options.transform !== "function") {
325
+ return "transformIsNotAFunction";
326
+ }
327
+ const beforeTransform = {
328
+ code: codeBeforeTransform,
329
+ numberCode: numberCodeBeforeTransform,
330
+ message: messageBeforeTransform,
331
+ details: detailsBeforeTransform,
332
+ domain: domainBeforeTransform
333
+ };
334
+ const values = options.transform ? options.transform(beforeTransform, objectToParse) : beforeTransform;
335
+ if (values === void 0 || values === null || typeof values !== "object") {
336
+ return "transformResultIsNotAValidObject";
337
+ }
338
+ if (values.code && typeof values.code !== "string") {
339
+ return "transformCodeResultIsNotString";
340
+ }
341
+ if (values.numberCode !== void 0 && values.numberCode !== null && typeof values.numberCode !== "number") {
342
+ return "transformNumberCodeResultIsNotNumber";
343
+ }
344
+ if (values.numberCode !== void 0 && values.numberCode !== null && isNaN(values.numberCode)) {
345
+ return "transformNumberCodeResultIsNaN";
346
+ }
347
+ if (values.message && typeof values.message !== "string") {
348
+ return "transformMessageResultIsNotString";
349
+ }
350
+ if (values.details && typeof values.details !== "string") {
351
+ return "transformDetailsResultIsNotString";
352
+ }
353
+ if (values.domain && typeof values.domain !== "string") {
354
+ return "transformDomainResultIsNotString";
355
+ }
356
+ return {
357
+ didDetectErrorsArray: didDetectErrorsArray ? true : void 0,
358
+ input: objectToParse,
359
+ path: errorsPath,
360
+ value: {
361
+ code: codePath || codeBeforeTransform || values.code ? {
362
+ path: codePath,
363
+ beforeTransform: codeBeforeTransform,
364
+ value: values.code
365
+ } : void 0,
366
+ numberCode: numberCodePath || numberCodeBeforeTransform !== void 0 && numberCodeBeforeTransform !== null || values.numberCode !== void 0 && values.numberCode !== null ? {
367
+ path: numberCodePath,
368
+ beforeTransform: numberCodeBeforeTransform,
369
+ value: values.numberCode
370
+ } : void 0,
371
+ message: messagePath || messageBeforeTransform || values.message ? {
372
+ path: messagePath,
373
+ beforeTransform: messageBeforeTransform,
374
+ value: values.message
375
+ } : void 0,
376
+ details: detailsPath || detailsBeforeTransform || values.details ? {
377
+ path: detailsPath,
378
+ beforeTransform: detailsBeforeTransform,
379
+ value: values.details
380
+ } : void 0,
381
+ domain: domainPath || domainBeforeTransform || values.domain ? {
382
+ path: domainPath,
383
+ beforeTransform: domainBeforeTransform,
384
+ value: values.domain
385
+ } : void 0
386
+ }
387
+ };
388
+ } catch (generalError) {
389
+ ErrorObject.SHOW_ERROR_LOGS && console.log(
390
+ "[ErrorObject]",
391
+ "Error during buildSummaryFromObject():",
392
+ generalError
393
+ );
394
+ return "generalBuildSummaryFromObjectError";
395
+ }
396
+ };
397
+ var findNestedValueForPath = (value, path) => {
398
+ var _a;
399
+ if (!path || !value) {
400
+ return void 0;
401
+ }
402
+ const normalizedPath = (_a = path == null ? void 0 : path.replace("[", "")) == null ? void 0 : _a.replace("]", "");
403
+ return !normalizedPath ? void 0 : normalizedPath.split(".").reduce((acc, key) => {
404
+ if (key.length === 0) {
405
+ return acc;
406
+ }
407
+ const numericKey = Number(key);
408
+ const resolvedKey = isNaN(numericKey) ? key : numericKey;
409
+ return acc && typeof acc === "object" ? acc[resolvedKey] : void 0;
410
+ }, value);
411
+ };
412
+
413
+ // src/index.ts
414
+ var checkInputForInitialObject = (input, withOptions) => {
415
+ try {
416
+ const options = withOptions != null ? withOptions : __spreadValues({}, DEFAULT_BUILD_OPTIONS);
417
+ if (input === void 0 || input === null) {
418
+ return "checkIsNullish";
419
+ }
420
+ if (typeof input !== "object") {
421
+ return "checkIsNotAnObject";
422
+ }
423
+ if ("checkInputObjectForValues" in options) {
424
+ if (typeof options.checkInputObjectForValues !== "object") {
425
+ return "checkInputObjectForValuesIsNotAnObject";
426
+ }
427
+ const checkInputObjectForValues = Object.entries(
428
+ options.checkInputObjectForValues
429
+ );
430
+ for (const [key, rule] of checkInputObjectForValues) {
431
+ const foundValue = findNestedValueForPath(input, key);
432
+ if (rule.exists ? foundValue !== rule.value : foundValue === rule.value) {
433
+ return "checkInputObjectForValuesFailed";
434
+ }
435
+ }
436
+ }
437
+ if ("checkInputObjectForTypes" in options) {
438
+ if (typeof options.checkInputObjectForTypes !== "object") {
439
+ return "checkInputObjectForTypesIsNotAnObject";
440
+ }
441
+ const checkInputObjectForTypes = Object.entries(
442
+ options.checkInputObjectForTypes
443
+ );
444
+ for (const [key, rule] of checkInputObjectForTypes) {
445
+ const foundValue = findNestedValueForPath(input, key);
446
+ if (rule.valueIsArray) {
447
+ if (rule.exists ? !Array.isArray(foundValue) : Array.isArray(foundValue)) {
448
+ return "checkInputObjectForTypesValueIsArrayFailed";
449
+ }
450
+ }
451
+ if (rule.exists ? typeof foundValue !== rule.type : typeof foundValue === rule.type) {
452
+ return "checkInputObjectForTypesFailed";
453
+ }
454
+ }
455
+ }
456
+ if ("checkInputObjectForKeys" in options) {
457
+ if (typeof options.checkInputObjectForKeys !== "object") {
458
+ return "checkInputObjectForKeysIsNotAnObject";
459
+ }
460
+ const checkInputObjectForKeys = Object.entries(
461
+ options.checkInputObjectForKeys
462
+ );
463
+ for (const [key, rule] of checkInputObjectForKeys) {
464
+ const foundValue = findNestedValueForPath(input, key);
465
+ if (rule.exists ? !foundValue : foundValue) {
466
+ return "checkInputObjectForKeysFailed";
467
+ }
468
+ }
469
+ }
470
+ } catch (error) {
471
+ ErrorObject2.SHOW_ERROR_LOGS && console.log(
472
+ "[ErrorObject]",
473
+ "Error during checkInputForInitialObject():",
474
+ error
475
+ );
476
+ }
477
+ return void 0;
478
+ };
479
+ var processErrorObjectResult = (summaries, raw, fallbackError) => {
480
+ const processingErrors = [];
481
+ try {
482
+ const validErrors = summaries.filter((summary) => {
483
+ var _a, _b;
484
+ if (typeof summary === "string") {
485
+ processingErrors.push({ errorCode: summary, summary: void 0 });
486
+ return false;
487
+ }
488
+ if (typeof summary !== "object") {
489
+ processingErrors.push({
490
+ errorCode: "invalidSummary",
491
+ summary: void 0
492
+ });
493
+ return false;
494
+ }
495
+ const code = (_a = summary.value.code) == null ? void 0 : _a.value;
496
+ const message = (_b = summary.value.message) == null ? void 0 : _b.value;
497
+ if (code !== void 0 && code !== null && typeof code === "string") {
498
+ if (message !== void 0 && message !== null && typeof message === "string") {
499
+ return true;
500
+ }
501
+ }
502
+ processingErrors.push({ errorCode: "unknownCodeOrMessage", summary });
503
+ return false;
504
+ }).map((s) => {
505
+ var _a, _b, _c, _d, _e;
506
+ const summary = s;
507
+ const code = (_a = summary.value.code) == null ? void 0 : _a.value;
508
+ const numberCode = (_b = summary.value.numberCode) == null ? void 0 : _b.value;
509
+ const message = (_c = summary.value.message) == null ? void 0 : _c.value;
510
+ const details = (_d = summary.value.details) == null ? void 0 : _d.value;
511
+ const domain = (_e = summary.value.domain) == null ? void 0 : _e.value;
512
+ if (code !== void 0 && code !== null && typeof code === "string") {
513
+ if (message !== void 0 && message !== null && typeof message === "string") {
514
+ return new ErrorObject2({
515
+ code,
516
+ message,
517
+ numberCode,
518
+ details,
519
+ domain,
520
+ summary,
521
+ processingErrors
522
+ });
523
+ }
524
+ }
525
+ return null;
526
+ }).filter(
527
+ (s) => s !== null && s !== void 0 && s instanceof ErrorObject2
528
+ );
529
+ if (validErrors.length > 0) {
530
+ const [firstError, ...nextErrors] = validErrors;
531
+ const error = firstError.setNextErrors((nextErrors == null ? void 0 : nextErrors.length) > 0 ? nextErrors : void 0).setRaw(raw);
532
+ return {
533
+ error,
534
+ force: error != null ? error : fallbackError.setProcessingErrors(processingErrors)
535
+ };
536
+ }
537
+ } catch (error) {
538
+ ErrorObject2.SHOW_ERROR_LOGS && console.log(
539
+ "[ErrorObject]",
540
+ "Error during processErrorObjectResult():",
541
+ error
542
+ );
543
+ }
544
+ return {
545
+ error: void 0,
546
+ force: processingErrors.length > 0 ? fallbackError.setProcessingErrors(processingErrors) : fallbackError
547
+ };
548
+ };
549
+ var fromPayload = (value, withOptions) => {
550
+ const options = __spreadValues(__spreadValues({}, DEFAULT_BUILD_OPTIONS), withOptions != null ? withOptions : {});
551
+ const fallbackError = ErrorObject2.fallback().setRaw(value);
552
+ const checksFailed = checkInputForInitialObject(value, options);
553
+ if (checksFailed !== void 0) {
554
+ return {
555
+ error: void 0,
556
+ force: fallbackError.setProcessingErrors([
557
+ { errorCode: checksFailed, summary: void 0 }
558
+ ])
559
+ };
560
+ }
561
+ let summaries;
562
+ if ("pathToErrors" in options) {
563
+ summaries = buildSummariesFromObject(value, options);
564
+ } else {
565
+ summaries = [buildSummaryFromObject(value, void 0, false, options)];
566
+ }
567
+ return processErrorObjectResult(summaries, value, fallbackError);
568
+ };
569
+ export {
570
+ DEFAULT_BUILD_OPTIONS,
571
+ addPrefixPathVariants,
572
+ fromPayload
573
+ };
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@smbcheeky/error-object-from-payload",
3
+ "description": "Create ErrorObjects from any payload with simple rules and benefit from step-to-step debugging logs for the entire process.",
4
+ "version": "1.1.5",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "build": "tsup src/index.ts --format cjs,esm --dts",
10
+ "pack": "yarn build && npm pack",
11
+ "release": "yarn build && npm publish --access public",
12
+ "lint": "tsc --noEmit"
13
+ },
14
+ "dependencies": {
15
+ "@smbcheeky/error-object": "^1.1.4"
16
+ },
17
+ "devDependencies": {
18
+ "tsup": "^6.5.0",
19
+ "typescript": "^4.9.4"
20
+ },
21
+ "license": "MIT",
22
+ "private": false,
23
+ "homepage": "https://www.npmjs.com/~stefan-at-smb",
24
+ "author": {
25
+ "name": "Stefan B.",
26
+ "email": "stefan@smbcheeky.com",
27
+ "url": "https://www.npmjs.com/~stefan-at-smb"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/SMBCheeky/error-object-from-payload.git"
32
+ },
33
+ "bugs": {
34
+ "url": "https://github.com/SMBCheeky/error-object-from-payload/issues"
35
+ },
36
+ "keywords": [
37
+ "exceptions",
38
+ "errors",
39
+ "handling",
40
+ "try",
41
+ "throw",
42
+ "catch",
43
+ "caught",
44
+ "instanceof",
45
+ "debug",
46
+ "neverthrow",
47
+ "result",
48
+ "ok"
49
+ ],
50
+ "files": [
51
+ "dist/",
52
+ "README.md",
53
+ "LICENSE",
54
+ "package.json"
55
+ ]
56
+ }