@bedrockio/yada 1.4.0 → 1.4.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.4.2
2
+
3
+ - Improved enum type assertion errors.
4
+
5
+ ## 1.4.1
6
+
7
+ - Removed lodash-es in favor of lodash.
8
+
1
9
  ## 1.4.0
2
10
 
3
11
  - Added object schema "require".
@@ -5,10 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  exports.isSchema = isSchema;
8
- var _lodashEs = require("lodash-es");
8
+ var _lodash = require("lodash");
9
9
  var _errors = require("./errors");
10
10
  const INITIAL_TYPES = ['default', 'required', 'type', 'transform', 'empty'];
11
11
  const REQUIRED_TYPES = ['default', 'required', 'missing'];
12
+ function isSchema(arg) {
13
+ return arg instanceof Schema;
14
+ }
12
15
  class Schema {
13
16
  constructor(meta = {}) {
14
17
  this.assertions = [];
@@ -289,49 +292,42 @@ class Schema {
289
292
  if (set.length === 1 && Array.isArray(set[0])) {
290
293
  set = set[0];
291
294
  }
292
- const types = set.map(el => {
293
- if (!isSchema(el)) {
294
- el = JSON.stringify(el);
295
- }
296
- return el;
297
- });
298
- const message = `${allow ? 'Must' : 'Must not'} be one of [{types}].`;
299
295
  return this.clone({
300
296
  enum: set
301
297
  }).assert('enum', async (val, options) => {
302
298
  if (val !== undefined) {
303
- const captured = [];
299
+ let captured = [];
304
300
  for (let el of set) {
305
301
  if (isSchema(el)) {
306
302
  try {
307
303
  // Must not pass cast option down when allowing
308
304
  // other schema types as they may be allowed, for
309
305
  // example allowing a string or array of strings.
310
- options = (0, _lodashEs.omit)(options, 'cast');
306
+ options = (0, _lodash.omit)(options, 'cast');
311
307
  return await el.validate(val, options);
312
308
  } catch (err) {
313
- const [first] = err.details;
314
- if (first instanceof _errors.TypeError && first.isPrimitiveKind()) {
315
- // If the error is a simple primitive type error then
316
- // continue to show more meaningful messages for simple enums.
317
- continue;
318
- } else {
319
- // Otherwise capture the error to surface messages on
320
- // more complex schemas.
321
- captured.push(err);
322
- }
309
+ captured.push(err.details[0]);
323
310
  }
324
311
  } else if (el === val === allow) {
325
312
  return;
326
313
  }
327
314
  }
328
- if (captured.length) {
329
- throw new _errors.AllowedError(this.meta.message, captured);
330
- } else {
331
- throw new _errors.LocalizedError(message, {
332
- types: types.join(', ')
315
+ captured = (0, _lodash.uniqBy)(captured, 'message');
316
+ const isTypeErrors = captured.every(error => {
317
+ return error instanceof _errors.TypeError;
318
+ });
319
+ if (captured.length === 1) {
320
+ throw captured[0];
321
+ }
322
+ if (captured.length === 0 || isTypeErrors) {
323
+ assertTypes({
324
+ set,
325
+ allow
333
326
  });
334
327
  }
328
+ throw new _errors.AllowedError(this.meta.message, captured.filter(error => {
329
+ return error instanceof _errors.TypeError ? false : true;
330
+ }));
335
331
  }
336
332
  });
337
333
  }
@@ -440,6 +436,19 @@ class Schema {
440
436
  }
441
437
  }
442
438
  exports.default = Schema;
443
- function isSchema(arg) {
444
- return arg instanceof Schema;
439
+ function assertTypes(options) {
440
+ const {
441
+ set,
442
+ allow
443
+ } = options;
444
+ const types = set.map(el => {
445
+ if (!isSchema(el)) {
446
+ el = JSON.stringify(el);
447
+ }
448
+ return el;
449
+ });
450
+ const message = `${allow ? 'Must' : 'Must not'} be one of [{types}].`;
451
+ throw new _errors.LocalizedError(message, {
452
+ types: types.join(', ')
453
+ });
445
454
  }
package/dist/cjs/array.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = _default;
7
- var _lodashEs = require("lodash-es");
7
+ var _lodash = require("lodash");
8
8
  var _Schema = _interopRequireDefault(require("./Schema"));
9
9
  var _TypeSchema = _interopRequireDefault(require("./TypeSchema"));
10
10
  var _errors = require("./errors");
@@ -42,7 +42,7 @@ class ArraySchema extends _TypeSchema.default {
42
42
  try {
43
43
  // Allow enum message to take
44
44
  // precedence over generic array message.
45
- options = (0, _lodashEs.omit)(options, 'message');
45
+ options = (0, _lodash.omit)(options, 'message');
46
46
  result.push(await schema.validate(el, options));
47
47
  } catch (error) {
48
48
  errors.push(new _errors.ElementError(message, i, error.details));
@@ -105,6 +105,9 @@ class ArraySchema extends _TypeSchema.default {
105
105
  }
106
106
  });
107
107
  }
108
+
109
+ // Private
110
+
108
111
  toString() {
109
112
  return 'array';
110
113
  }
@@ -67,9 +67,6 @@ class TypeError extends ValidationError {
67
67
  this.type = 'type';
68
68
  this.kind = kind;
69
69
  }
70
- isPrimitiveKind() {
71
- return this.kind !== 'array' && this.kind !== 'object';
72
- }
73
70
  toJSON() {
74
71
  return {
75
72
  ...super.toJSON(),
@@ -76,6 +76,9 @@ class NumberSchema extends _TypeSchema.default {
76
76
  }
77
77
  });
78
78
  }
79
+
80
+ // Private
81
+
79
82
  toOpenApi(extra) {
80
83
  const {
81
84
  min,
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = _default;
7
- var _lodashEs = require("lodash-es");
7
+ var _lodash = require("lodash");
8
8
  var _TypeSchema = _interopRequireDefault(require("./TypeSchema"));
9
9
  var _errors = require("./errors");
10
10
  var _Schema = _interopRequireWildcard(require("./Schema"));
@@ -84,7 +84,7 @@ class ObjectSchema extends _TypeSchema.default {
84
84
  try {
85
85
  // Do not pass down message into validators
86
86
  // to allow custom messages to take precedence.
87
- options = (0, _lodashEs.omit)(options, 'message');
87
+ options = (0, _lodash.omit)(options, 'message');
88
88
  const result = await schema.validate(val, {
89
89
  ...options,
90
90
  // The root object may have been transformed here
@@ -170,7 +170,7 @@ class ObjectSchema extends _TypeSchema.default {
170
170
  names = names[0];
171
171
  }
172
172
  return new ObjectSchema({
173
- fields: (0, _lodashEs.pick)(this.meta.fields, names)
173
+ fields: (0, _lodash.pick)(this.meta.fields, names)
174
174
  });
175
175
  }
176
176
 
@@ -184,7 +184,7 @@ class ObjectSchema extends _TypeSchema.default {
184
184
  names = names[0];
185
185
  }
186
186
  return new ObjectSchema({
187
- fields: (0, _lodashEs.omit)(this.meta.fields, names)
187
+ fields: (0, _lodash.omit)(this.meta.fields, names)
188
188
  });
189
189
  }
190
190
 
@@ -205,7 +205,7 @@ class ObjectSchema extends _TypeSchema.default {
205
205
  }
206
206
  const update = {};
207
207
  for (let field of fields) {
208
- (0, _lodashEs.set)(update, field, this.get(field).required());
208
+ (0, _lodash.set)(update, field, this.get(field).required());
209
209
  }
210
210
  return this.append(update);
211
211
  }
@@ -258,6 +258,9 @@ class ObjectSchema extends _TypeSchema.default {
258
258
  }
259
259
  return schema;
260
260
  }
261
+
262
+ // Private
263
+
261
264
  toOpenApi(extra) {
262
265
  const properties = {};
263
266
  for (let [key, schema] of Object.entries(this.export())) {
@@ -399,6 +399,9 @@ class StringSchema extends _TypeSchema.default {
399
399
  fn(val, options);
400
400
  });
401
401
  }
402
+
403
+ // Private
404
+
402
405
  toOpenApi(extra) {
403
406
  const {
404
407
  min,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrockio/yada",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Validation library inspired by Joi.",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -17,7 +17,7 @@
17
17
  "author": "Andrew Plummer <plummer.andrew@gmail.com>",
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
- "lodash-es": "^4.17.21",
20
+ "lodash": "^4.17.21",
21
21
  "validator": "^13.9.0"
22
22
  },
23
23
  "devDependencies": {
package/src/Schema.js CHANGED
@@ -1,4 +1,4 @@
1
- import { omit } from 'lodash-es';
1
+ import { omit, uniqBy } from 'lodash';
2
2
 
3
3
  import {
4
4
  TypeError,
@@ -12,6 +12,10 @@ import {
12
12
  const INITIAL_TYPES = ['default', 'required', 'type', 'transform', 'empty'];
13
13
  const REQUIRED_TYPES = ['default', 'required', 'missing'];
14
14
 
15
+ export function isSchema(arg) {
16
+ return arg instanceof Schema;
17
+ }
18
+
15
19
  export default class Schema {
16
20
  constructor(meta = {}) {
17
21
  this.assertions = [];
@@ -271,16 +275,10 @@ export default class Schema {
271
275
  if (set.length === 1 && Array.isArray(set[0])) {
272
276
  set = set[0];
273
277
  }
274
- const types = set.map((el) => {
275
- if (!isSchema(el)) {
276
- el = JSON.stringify(el);
277
- }
278
- return el;
279
- });
280
- const message = `${allow ? 'Must' : 'Must not'} be one of [{types}].`;
281
278
  return this.clone({ enum: set }).assert('enum', async (val, options) => {
282
279
  if (val !== undefined) {
283
- const captured = [];
280
+ let captured = [];
281
+
284
282
  for (let el of set) {
285
283
  if (isSchema(el)) {
286
284
  try {
@@ -290,28 +288,36 @@ export default class Schema {
290
288
  options = omit(options, 'cast');
291
289
  return await el.validate(val, options);
292
290
  } catch (err) {
293
- const [first] = err.details;
294
- if (first instanceof TypeError && first.isPrimitiveKind()) {
295
- // If the error is a simple primitive type error then
296
- // continue to show more meaningful messages for simple enums.
297
- continue;
298
- } else {
299
- // Otherwise capture the error to surface messages on
300
- // more complex schemas.
301
- captured.push(err);
302
- }
291
+ captured.push(err.details[0]);
303
292
  }
304
293
  } else if ((el === val) === allow) {
305
294
  return;
306
295
  }
307
296
  }
308
- if (captured.length) {
309
- throw new AllowedError(this.meta.message, captured);
310
- } else {
311
- throw new LocalizedError(message, {
312
- types: types.join(', '),
297
+
298
+ captured = uniqBy(captured, 'message');
299
+
300
+ const isTypeErrors = captured.every((error) => {
301
+ return error instanceof TypeError;
302
+ });
303
+
304
+ if (captured.length === 1) {
305
+ throw captured[0];
306
+ }
307
+
308
+ if (captured.length === 0 || isTypeErrors) {
309
+ assertTypes({
310
+ set,
311
+ allow,
313
312
  });
314
313
  }
314
+
315
+ throw new AllowedError(
316
+ this.meta.message,
317
+ captured.filter((error) => {
318
+ return error instanceof TypeError ? false : true;
319
+ }),
320
+ );
315
321
  }
316
322
  });
317
323
  }
@@ -418,6 +424,16 @@ export default class Schema {
418
424
  }
419
425
  }
420
426
 
421
- export function isSchema(arg) {
422
- return arg instanceof Schema;
427
+ function assertTypes(options) {
428
+ const { set, allow } = options;
429
+ const types = set.map((el) => {
430
+ if (!isSchema(el)) {
431
+ el = JSON.stringify(el);
432
+ }
433
+ return el;
434
+ });
435
+ const message = `${allow ? 'Must' : 'Must not'} be one of [{types}].`;
436
+ throw new LocalizedError(message, {
437
+ types: types.join(', '),
438
+ });
423
439
  }
package/src/array.js CHANGED
@@ -1,4 +1,4 @@
1
- import { omit } from 'lodash-es';
1
+ import { omit } from 'lodash';
2
2
 
3
3
  import Schema from './Schema';
4
4
  import TypeSchema from './TypeSchema';
@@ -104,6 +104,8 @@ class ArraySchema extends TypeSchema {
104
104
  });
105
105
  }
106
106
 
107
+ // Private
108
+
107
109
  toString() {
108
110
  return 'array';
109
111
  }
package/src/errors.js CHANGED
@@ -60,10 +60,6 @@ export class TypeError extends ValidationError {
60
60
  this.kind = kind;
61
61
  }
62
62
 
63
- isPrimitiveKind() {
64
- return this.kind !== 'array' && this.kind !== 'object';
65
- }
66
-
67
63
  toJSON() {
68
64
  return {
69
65
  ...super.toJSON(),
package/src/number.js CHANGED
@@ -69,6 +69,8 @@ class NumberSchema extends TypeSchema {
69
69
  });
70
70
  }
71
71
 
72
+ // Private
73
+
72
74
  toOpenApi(extra) {
73
75
  const { min, max, multiple } = this.meta;
74
76
  return {
package/src/object.js CHANGED
@@ -1,4 +1,4 @@
1
- import { set, pick, omit } from 'lodash-es';
1
+ import { set, pick, omit } from 'lodash';
2
2
 
3
3
  import TypeSchema from './TypeSchema';
4
4
  import { FieldError, LocalizedError } from './errors';
@@ -249,6 +249,8 @@ class ObjectSchema extends TypeSchema {
249
249
  return schema;
250
250
  }
251
251
 
252
+ // Private
253
+
252
254
  toOpenApi(extra) {
253
255
  const properties = {};
254
256
  for (let [key, schema] of Object.entries(this.export())) {
package/src/string.js CHANGED
@@ -417,6 +417,8 @@ class StringSchema extends TypeSchema {
417
417
  );
418
418
  }
419
419
 
420
+ // Private
421
+
420
422
  toOpenApi(extra) {
421
423
  const { min, max } = this.meta;
422
424
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../src/Schema.js"],"names":[],"mappings":"AAoaA,kDAEC;AAxZD;IACE,uBAGC;IAFC,kBAAoB;IACpB,SAAgB;IAKlB;;OAEG;IACH,YAFa,IAAI,CAQhB;IAED;;;OAGG;IACH,mBAFa,IAAI,CAShB;IAED;;;;OAIG;IACH,sBAFa,IAAI,CAShB;IAED;;;;OAIG;IACH,uBAFa,IAAI,CAShB;IAED;;;;OAIG;IACH,mBAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,sBAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,uBAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,YAFa,IAAI,CAIhB;IAED;;OAEG;IACH,uBAFa,IAAI,CAIhB;IAED;;OAEG;IACH,gBAFa,IAAI,CAShB;IAED;;OAEG;IACH,+BAFa,IAAI,CAMhB;IAED;;OAEG;IACH,uBAFa,IAAI,CAIhB;IAED,iDAwCC;IAED;;OAEG;IACH,kBAFa,IAAI,CAOhB;IAED;;;OAGG;IACH,qBAFa,MAAM,CAMlB;IAED,2BAYC;IAED;;MAOC;IAED;;;;MASC;IAED;;MAOC;IAED,4BAMC;IAED,kBAEC;IAED,YAGC;IAID;;OAEG;IACH,kCAFa,IAAI,CAiDhB;IAED;;OAEG;IACH,4BAFa,IAAI,CAUhB;IAED,oCAKC;IAED,gEAQC;IAED;;OAEG;IACH,oBAFa,IAAI,CAShB;IAED,gCAGC;IAED,qEAYC;IAED,qBAsCC;CACF"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../src/Schema.js"],"names":[],"mappings":"AAcA,kDAEC;AAED;IACE,uBAGC;IAFC,kBAAoB;IACpB,SAAgB;IAKlB;;OAEG;IACH,YAFa,IAAI,CAQhB;IAED;;;OAGG;IACH,mBAFa,IAAI,CAShB;IAED;;;;OAIG;IACH,sBAFa,IAAI,CAShB;IAED;;;;OAIG;IACH,uBAFa,IAAI,CAShB;IAED;;;;OAIG;IACH,mBAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,sBAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,uBAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,YAFa,IAAI,CAIhB;IAED;;OAEG;IACH,uBAFa,IAAI,CAIhB;IAED;;OAEG;IACH,gBAFa,IAAI,CAShB;IAED;;OAEG;IACH,+BAFa,IAAI,CAMhB;IAED;;OAEG;IACH,uBAFa,IAAI,CAIhB;IAED,iDAwCC;IAED;;OAEG;IACH,kBAFa,IAAI,CAOhB;IAED;;;OAGG;IACH,qBAFa,MAAM,CAMlB;IAED,2BAYC;IAED;;MAOC;IAED;;;;MASC;IAED;;MAOC;IAED,4BAMC;IAED,kBAEC;IAED,YAGC;IAID;;OAEG;IACH,kCAFa,IAAI,CAmDhB;IAED;;OAEG;IACH,4BAFa,IAAI,CAUhB;IAED,oCAKC;IAED,gEAQC;IAED;;OAEG;IACH,oBAFa,IAAI,CAShB;IAED,gCAGC;IAED,qEAYC;IAED,qBAsCC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../src/array.js"],"names":[],"mappings":"AAqIA;;;;;;;GAOG;AACH,8CALc,MAAM,EAAA,eAUnB;mBAhJkB,UAAU;AAI7B;IACE,0BAGC;IAED,cAsCC;IAED,0BAUC;IAED,uBAUC;IAED,uBAaC;IAED,eAaC;IAED,mBAEC;CAuBF;uBAhIsB,cAAc"}
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../src/array.js"],"names":[],"mappings":"AAuIA;;;;;;;GAOG;AACH,8CALc,MAAM,EAAA,eAUnB;mBAlJkB,UAAU;AAI7B;IACE,0BAGC;IAED,cAsCC;IAED,0BAUC;IAED,uBAUC;IAED,uBAaC;IAED,eAaC;IAID,mBAEC;CAuBF;uBAlIsB,cAAc"}
package/types/errors.d.ts CHANGED
@@ -21,7 +21,6 @@ export class AssertionError extends ValidationError {
21
21
  export class TypeError extends ValidationError {
22
22
  constructor(message: any, kind: any);
23
23
  kind: any;
24
- isPrimitiveKind(): boolean;
25
24
  toJSON(): {
26
25
  kind: any;
27
26
  details: any[];
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.js"],"names":[],"mappings":"AAyIA,gEAEC;AAxID;IACE,uCAEC;CACF;AAED;IACE,+BAA8C;IAE9C,+CAIC;IAFC,aAAwB;IACxB,eAAsB;IAGxB;;;;MAWC;IAED,kBAOC;IAED,kCAKC;CACF;AAED;IACE,yCAGC;CACF;AAED;IACE,qCAIC;IADC,UAAgB;IAGlB,2BAEC;IAED;;;;;MAKC;CACF;AAED;IACE,uCAIC;IADC,YAAoB;IAGtB;;;;;MAKC;CACF;AAED;IAGE,uDAIC;IADC,WAAkB;IAGpB;;;;;MAKC;CACF;AAED;IAGE,uDAIC;IADC,WAAkB;IAGpB;;;;;MAKC;CACF;AAED;IACE,wCAGC;CACF;AAED;IACE,wCAGC;CACF"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.js"],"names":[],"mappings":"AAqIA,gEAEC;AApID;IACE,uCAEC;CACF;AAED;IACE,+BAA8C;IAE9C,+CAIC;IAFC,aAAwB;IACxB,eAAsB;IAGxB;;;;MAWC;IAED,kBAOC;IAED,kCAKC;CACF;AAED;IACE,yCAGC;CACF;AAED;IACE,qCAIC;IADC,UAAgB;IAGlB;;;;;MAKC;CACF;AAED;IACE,uCAIC;IADC,YAAoB;IAGtB;;;;;MAKC;CACF;AAED;IAGE,uDAIC;IADC,WAAkB;IAGpB;;;;;MAKC;CACF;AAED;IAGE,uDAIC;IADC,WAAkB;IAGpB;;;;;MAKC;CACF;AAED;IACE,wCAGC;CACF;AAED;IACE,wCAGC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../src/number.js"],"names":[],"mappings":"AAwFA;;GAEG;AACH,iDAEC;AA1FD;IACE,cAWC;IAED;;;OAGG;IACH,SAHW,MAAM,YACN,MAAM,QAUhB;IAED;;;OAGG;IACH,SAHW,MAAM,YACN,MAAM,QAUhB;IAED,iBAEC;IAED,iBAEC;IAED,gBAMC;IAED,8BAQC;CAiBF;uBAtFsB,cAAc"}
1
+ {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../src/number.js"],"names":[],"mappings":"AA0FA;;GAEG;AACH,iDAEC;AA5FD;IACE,cAWC;IAED;;;OAGG;IACH,SAHW,MAAM,YACN,MAAM,QAUhB;IAED;;;OAGG;IACH,SAHW,MAAM,YACN,MAAM,QAUhB;IAED,iBAEC;IAED,iBAEC;IAED,gBAMC;IAED,8BAQC;CAmBF;uBAxFsB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../src/object.js"],"names":[],"mappings":"AAiTA;;;;;;GAMG;AACH,uCAJW,SAAS,gBAQnB;wBAnTY;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,EAAE;AAD3C;;GAEG;AAEH;IACE,uBAGC;IAED,cA8EC;IAED;;;;;;OAMG;IACH,WAFW,MAAM,GAAC,KAAK,CAAC,MAAM,CAAC,OAsB9B;IAED;;;;;;OAMG;IACH,cAFW,MAAM,GAAC,KAAK,CAAC,MAAM,CAAC,OAY9B;IAED;;;;OAIG;IACH,gBAFc,MAAM,EAAA,gBASnB;IAED;;;;OAIG;IACH,gBAFc,MAAM,EAAA,gBASnB;IAED;;;;;;;OAOG;IACH,mBAHc,MAAM,EAAA,gBAkBnB;IAED;;;;;;OAMG;IACH,cAEC;IAED;;;;;;;;;OASG;IACH,YAFW,SAAS,GAAC,MAAM,gBA+B1B;CAcF;mBAnQgC,UAAU;uBAFpB,cAAc"}
1
+ {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../src/object.js"],"names":[],"mappings":"AAmTA;;;;;;GAMG;AACH,uCAJW,SAAS,gBAQnB;wBArTY;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,EAAE;AAD3C;;GAEG;AAEH;IACE,uBAGC;IAED,cA8EC;IAED;;;;;;OAMG;IACH,WAFW,MAAM,GAAC,KAAK,CAAC,MAAM,CAAC,OAsB9B;IAED;;;;;;OAMG;IACH,cAFW,MAAM,GAAC,KAAK,CAAC,MAAM,CAAC,OAY9B;IAED;;;;OAIG;IACH,gBAFc,MAAM,EAAA,gBASnB;IAED;;;;OAIG;IACH,gBAFc,MAAM,EAAA,gBASnB;IAED;;;;;;;OAOG;IACH,mBAHc,MAAM,EAAA,gBAkBnB;IAED;;;;;;OAMG;IACH,cAEC;IAED;;;;;;;;;OASG;IACH,YAFW,SAAS,GAAC,MAAM,gBA+B1B;CAgBF;mBArQgC,UAAU;uBAFpB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../src/string.js"],"names":[],"mappings":"AAibA;;GAEG;AACH,iDAEC;AA/ZD;IACE,cAoBC;IAED;;OAEG;IACH,YAFa,IAAI,CAQhB;IAED;;OAEG;IACH,eAFW,MAAM,QAUhB;IAED;;OAEG;IACH,YAFW,MAAM,QAUhB;IAED;;OAEG;IACH,YAFW,MAAM,QAUhB;IAED,aAIC;IAED;;OAEG;IACH,mBAFW,OAAO,QAYjB;IAED;;OAEG;IACH,mBAFW,OAAO,QAYjB;IAED;;OAEG;IACH,WAFW,MAAM,QAahB;IAED,cAMC;IAED,uBASC;IAED,YAMC;IAED,YAMC;IAED,aAMC;IAED,cAMC;IAED;;;OAGG;IACH,iBAFG;QAA0B,OAAO,GAAzB,OAAO;KAAmB,QAQpC;IAED,mBAMC;IAED,WAMC;IAED,gBAMC;IAED,eAMC;IAED,YAMC;IAED,aAOC;IAED,eAMC;IAED;;OAEG;IACH,oBAFW,MAAM,QAQhB;IAED,gBAMC;IAED;;;;;;;OAOG;IACH,mBANG;QAAyB,SAAS,GAA1B,MAAM;QACW,UAAU,GAA3B,MAAM;QACW,UAAU,GAA3B,MAAM;QACW,YAAY,GAA7B,MAAM;QACW,YAAY,GAA7B,MAAM;KAAwB,QA+BxC;IAED;;;;;;;;;;;OAWG;IACH,cAVG;QAA0B,gBAAgB,GAAlC,OAAO;QACW,sBAAsB,GAAxC,OAAO;QACW,YAAY,GAA9B,OAAO;QACW,YAAY,GAA9B,OAAO;QACW,4BAA4B,GAA9C,OAAO;QACW,eAAe,GAAjC,OAAO;QACW,sBAAsB,GAAxC,OAAO;QACW,eAAe,GAAjC,OAAO;QACY,SAAS,GAA5B,MAAM,EAAE;KAAqB,QAQvC;IAED;;;;;;;;OAQG;IACH,iBAPG;QAA0B,WAAW,GAA7B,OAAO;QACW,iBAAiB,GAAnC,OAAO;QACW,kBAAkB,GAApC,OAAO;QACW,iBAAiB,GAAnC,OAAO;QACW,cAAc,GAAhC,OAAO;QACW,iBAAiB,GAAnC,OAAO;KAAmC,QAQpD;IAED;;OAEG;IACH,eAFW,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,QAQ3B;IAED,YAMC;IAED,YAMC;IAED,cAMC;IAED,cAMC;IAED,iCAWC;CAcF;uBA7asB,cAAc"}
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../src/string.js"],"names":[],"mappings":"AAmbA;;GAEG;AACH,iDAEC;AAjaD;IACE,cAoBC;IAED;;OAEG;IACH,YAFa,IAAI,CAQhB;IAED;;OAEG;IACH,eAFW,MAAM,QAUhB;IAED;;OAEG;IACH,YAFW,MAAM,QAUhB;IAED;;OAEG;IACH,YAFW,MAAM,QAUhB;IAED,aAIC;IAED;;OAEG;IACH,mBAFW,OAAO,QAYjB;IAED;;OAEG;IACH,mBAFW,OAAO,QAYjB;IAED;;OAEG;IACH,WAFW,MAAM,QAahB;IAED,cAMC;IAED,uBASC;IAED,YAMC;IAED,YAMC;IAED,aAMC;IAED,cAMC;IAED;;;OAGG;IACH,iBAFG;QAA0B,OAAO,GAAzB,OAAO;KAAmB,QAQpC;IAED,mBAMC;IAED,WAMC;IAED,gBAMC;IAED,eAMC;IAED,YAMC;IAED,aAOC;IAED,eAMC;IAED;;OAEG;IACH,oBAFW,MAAM,QAQhB;IAED,gBAMC;IAED;;;;;;;OAOG;IACH,mBANG;QAAyB,SAAS,GAA1B,MAAM;QACW,UAAU,GAA3B,MAAM;QACW,UAAU,GAA3B,MAAM;QACW,YAAY,GAA7B,MAAM;QACW,YAAY,GAA7B,MAAM;KAAwB,QA+BxC;IAED;;;;;;;;;;;OAWG;IACH,cAVG;QAA0B,gBAAgB,GAAlC,OAAO;QACW,sBAAsB,GAAxC,OAAO;QACW,YAAY,GAA9B,OAAO;QACW,YAAY,GAA9B,OAAO;QACW,4BAA4B,GAA9C,OAAO;QACW,eAAe,GAAjC,OAAO;QACW,sBAAsB,GAAxC,OAAO;QACW,eAAe,GAAjC,OAAO;QACY,SAAS,GAA5B,MAAM,EAAE;KAAqB,QAQvC;IAED;;;;;;;;OAQG;IACH,iBAPG;QAA0B,WAAW,GAA7B,OAAO;QACW,iBAAiB,GAAnC,OAAO;QACW,kBAAkB,GAApC,OAAO;QACW,iBAAiB,GAAnC,OAAO;QACW,cAAc,GAAhC,OAAO;QACW,iBAAiB,GAAnC,OAAO;KAAmC,QAQpD;IAED;;OAEG;IACH,eAFW,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,QAQ3B;IAED,YAMC;IAED,YAMC;IAED,cAMC;IAED,cAMC;IAED,iCAWC;CAgBF;uBA/asB,cAAc"}