@orkestrel/contract 0.0.2 → 0.0.4

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.
@@ -62,7 +62,14 @@ function isUndefined(value) {
62
62
  function isDefined(value) {
63
63
  return value !== null && value !== void 0;
64
64
  }
65
- /** Determine whether a value is a string. */
65
+ /** Determine whether a value is a string.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * isString('hi') // true
70
+ * isString(42) // false
71
+ * ```
72
+ */
66
73
  function isString(value) {
67
74
  return typeof value === "string";
68
75
  }
@@ -71,11 +78,26 @@ function isString(value) {
71
78
  *
72
79
  * @remarks
73
80
  * Includes `NaN` and `±Infinity` — use {@link isFiniteNumber} to exclude them.
81
+ *
82
+ * @example
83
+ * ```ts
84
+ * isNumber(42) // true
85
+ * isNumber(Number.NaN) // true — NaN is still a number
86
+ * isNumber('42') // false
87
+ * ```
74
88
  */
75
89
  function isNumber(value) {
76
90
  return typeof value === "number";
77
91
  }
78
- /** Determine whether a value is a finite number (excludes `NaN` and `±Infinity`). */
92
+ /** Determine whether a value is a finite number (excludes `NaN` and `±Infinity`).
93
+ *
94
+ * @example
95
+ * ```ts
96
+ * isFiniteNumber(42) // true
97
+ * isFiniteNumber(Number.NaN) // false
98
+ * isFiniteNumber(Infinity) // false
99
+ * ```
100
+ */
79
101
  function isFiniteNumber(value) {
80
102
  return typeof value === "number" && Number.isFinite(value);
81
103
  }
@@ -192,6 +214,35 @@ function isNullableNumber(value) {
192
214
  function isNullableBoolean(value) {
193
215
  return value === null || isBoolean(value);
194
216
  }
217
+ /**
218
+ * Determine whether a value is an instance of a constructor, contained against
219
+ * a throwing `instanceof` check.
220
+ *
221
+ * @remarks
222
+ * The low-level total helper every `instanceof`-based guard in this file (and
223
+ * the `instanceOf` combinator) routes through. A bare `value instanceof X` is
224
+ * NOT total (AGENTS §14): it invokes `getPrototypeOf` on `value` — which a
225
+ * revoked `Proxy` or a `getPrototypeOf`-trap `Proxy` throws from — and, when
226
+ * `X[Symbol.hasInstance]` is user-defined, can throw from arbitrary code. This
227
+ * wraps the check in {@link attempt} (see ./helpers.js) so any such throw
228
+ * yields `false` instead of escaping.
229
+ *
230
+ * @param value - The value to test
231
+ * @param ctor - The constructor to test against
232
+ * @returns `true` when `value instanceof ctor`, `false` on a non-match or a
233
+ * contained throw
234
+ *
235
+ * @example
236
+ * ```ts
237
+ * isInstance(new Date(), Date) // true
238
+ * isInstance({}, Date) // false
239
+ * ```
240
+ */
241
+ function isInstance(value, ctor) {
242
+ const target = ctor;
243
+ const outcome = attempt(() => isFunction(target) && value instanceof target);
244
+ return outcome.success && outcome.value;
245
+ }
195
246
  /** Determine whether a value is a `Date`.
196
247
  *
197
248
  * @example
@@ -201,7 +252,7 @@ function isNullableBoolean(value) {
201
252
  * ```
202
253
  */
203
254
  function isDate(value) {
204
- return value instanceof Date;
255
+ return isInstance(value, Date);
205
256
  }
206
257
  /** Determine whether a value is a `RegExp`.
207
258
  *
@@ -212,7 +263,7 @@ function isDate(value) {
212
263
  * ```
213
264
  */
214
265
  function isRegExp(value) {
215
- return value instanceof RegExp;
266
+ return isInstance(value, RegExp);
216
267
  }
217
268
  /** Determine whether a value is an `Error`.
218
269
  *
@@ -223,7 +274,7 @@ function isRegExp(value) {
223
274
  * ```
224
275
  */
225
276
  function isError(value) {
226
- return value instanceof Error;
277
+ return isInstance(value, Error);
227
278
  }
228
279
  /** Determine whether a value is a native `Promise` (use {@link isPromiseLike} for any thenable).
229
280
  *
@@ -234,7 +285,7 @@ function isError(value) {
234
285
  * ```
235
286
  */
236
287
  function isPromise(value) {
237
- return value instanceof Promise;
288
+ return isInstance(value, Promise);
238
289
  }
239
290
  /**
240
291
  * Determine whether a value is promise-like — an object exposing callable
@@ -270,7 +321,7 @@ function isPromiseLike(value) {
270
321
  * ```
271
322
  */
272
323
  function isArrayBuffer(value) {
273
- return value instanceof ArrayBuffer;
324
+ return isInstance(value, ArrayBuffer);
274
325
  }
275
326
  /**
276
327
  * Determine whether a value is a `SharedArrayBuffer`.
@@ -286,7 +337,7 @@ function isArrayBuffer(value) {
286
337
  * ```
287
338
  */
288
339
  function isSharedArrayBuffer(value) {
289
- return typeof SharedArrayBuffer !== "undefined" && value instanceof SharedArrayBuffer;
340
+ return typeof SharedArrayBuffer !== "undefined" && isInstance(value, SharedArrayBuffer);
290
341
  }
291
342
  /**
292
343
  * Determine whether a value implements the iterable protocol (`Symbol.iterator`).
@@ -355,6 +406,14 @@ function isObject(value) {
355
406
  * instance's runs through the class's own prototype. The whole body runs
356
407
  * inside `attempt` (AGENTS §14) so a revoked `Proxy` or a hostile
357
408
  * `getPrototypeOf` trap cannot escape as a thrown error.
409
+ *
410
+ * @example
411
+ * ```ts
412
+ * isRecord({ a: 1 }) // true
413
+ * isRecord(Object.create(null)) // true
414
+ * isRecord([]) // false
415
+ * isRecord(new Date()) // false
416
+ * ```
358
417
  */
359
418
  function isRecord(value) {
360
419
  const outcome = attempt(() => {
@@ -373,7 +432,7 @@ function isRecord(value) {
373
432
  * ```
374
433
  */
375
434
  function isMap(value) {
376
- return value instanceof Map;
435
+ return isInstance(value, Map);
377
436
  }
378
437
  /** Determine whether a value is a `Set`.
379
438
  *
@@ -384,7 +443,7 @@ function isMap(value) {
384
443
  * ```
385
444
  */
386
445
  function isSet(value) {
387
- return value instanceof Set;
446
+ return isInstance(value, Set);
388
447
  }
389
448
  /** Determine whether a value is a `WeakMap`.
390
449
  *
@@ -395,7 +454,7 @@ function isSet(value) {
395
454
  * ```
396
455
  */
397
456
  function isWeakMap(value) {
398
- return value instanceof WeakMap;
457
+ return isInstance(value, WeakMap);
399
458
  }
400
459
  /** Determine whether a value is a `WeakSet`.
401
460
  *
@@ -406,7 +465,7 @@ function isWeakMap(value) {
406
465
  * ```
407
466
  */
408
467
  function isWeakSet(value) {
409
- return value instanceof WeakSet;
468
+ return isInstance(value, WeakSet);
410
469
  }
411
470
  /** Determine whether a value is an array.
412
471
  *
@@ -428,7 +487,7 @@ function isArray(value) {
428
487
  * ```
429
488
  */
430
489
  function isDataView(value) {
431
- return value instanceof DataView;
490
+ return isInstance(value, DataView);
432
491
  }
433
492
  /** Determine whether a value is an `ArrayBufferView` (any typed array or `DataView`).
434
493
  *
@@ -450,7 +509,7 @@ function isArrayBufferView(value) {
450
509
  * ```
451
510
  */
452
511
  function isInt8Array(value) {
453
- return value instanceof Int8Array;
512
+ return isInstance(value, Int8Array);
454
513
  }
455
514
  /** Determine whether a value is a `Uint8Array`.
456
515
  *
@@ -461,7 +520,7 @@ function isInt8Array(value) {
461
520
  * ```
462
521
  */
463
522
  function isUint8Array(value) {
464
- return value instanceof Uint8Array;
523
+ return isInstance(value, Uint8Array);
465
524
  }
466
525
  /** Determine whether a value is a `Uint8ClampedArray`.
467
526
  *
@@ -472,7 +531,7 @@ function isUint8Array(value) {
472
531
  * ```
473
532
  */
474
533
  function isUint8ClampedArray(value) {
475
- return value instanceof Uint8ClampedArray;
534
+ return isInstance(value, Uint8ClampedArray);
476
535
  }
477
536
  /** Determine whether a value is an `Int16Array`.
478
537
  *
@@ -483,7 +542,7 @@ function isUint8ClampedArray(value) {
483
542
  * ```
484
543
  */
485
544
  function isInt16Array(value) {
486
- return value instanceof Int16Array;
545
+ return isInstance(value, Int16Array);
487
546
  }
488
547
  /** Determine whether a value is a `Uint16Array`.
489
548
  *
@@ -494,7 +553,7 @@ function isInt16Array(value) {
494
553
  * ```
495
554
  */
496
555
  function isUint16Array(value) {
497
- return value instanceof Uint16Array;
556
+ return isInstance(value, Uint16Array);
498
557
  }
499
558
  /** Determine whether a value is an `Int32Array`.
500
559
  *
@@ -505,7 +564,7 @@ function isUint16Array(value) {
505
564
  * ```
506
565
  */
507
566
  function isInt32Array(value) {
508
- return value instanceof Int32Array;
567
+ return isInstance(value, Int32Array);
509
568
  }
510
569
  /** Determine whether a value is a `Uint32Array`.
511
570
  *
@@ -516,7 +575,7 @@ function isInt32Array(value) {
516
575
  * ```
517
576
  */
518
577
  function isUint32Array(value) {
519
- return value instanceof Uint32Array;
578
+ return isInstance(value, Uint32Array);
520
579
  }
521
580
  /** Determine whether a value is a `Float32Array`.
522
581
  *
@@ -527,7 +586,7 @@ function isUint32Array(value) {
527
586
  * ```
528
587
  */
529
588
  function isFloat32Array(value) {
530
- return value instanceof Float32Array;
589
+ return isInstance(value, Float32Array);
531
590
  }
532
591
  /** Determine whether a value is a `Float64Array`.
533
592
  *
@@ -538,7 +597,7 @@ function isFloat32Array(value) {
538
597
  * ```
539
598
  */
540
599
  function isFloat64Array(value) {
541
- return value instanceof Float64Array;
600
+ return isInstance(value, Float64Array);
542
601
  }
543
602
  /**
544
603
  * Determine whether a value is a `BigInt64Array`.
@@ -554,7 +613,7 @@ function isFloat64Array(value) {
554
613
  * ```
555
614
  */
556
615
  function isBigInt64Array(value) {
557
- return typeof BigInt64Array !== "undefined" && value instanceof BigInt64Array;
616
+ return typeof BigInt64Array !== "undefined" && isInstance(value, BigInt64Array);
558
617
  }
559
618
  /**
560
619
  * Determine whether a value is a `BigUint64Array`.
@@ -570,7 +629,7 @@ function isBigInt64Array(value) {
570
629
  * ```
571
630
  */
572
631
  function isBigUint64Array(value) {
573
- return typeof BigUint64Array !== "undefined" && value instanceof BigUint64Array;
632
+ return typeof BigUint64Array !== "undefined" && isInstance(value, BigUint64Array);
574
633
  }
575
634
  /** Determine whether a value is the empty string `''`.
576
635
  *
@@ -604,7 +663,8 @@ function isEmptyArray(value) {
604
663
  */
605
664
  function isEmptyObject(value) {
606
665
  if (!isRecord(value)) return false;
607
- return Object.keys(value).length === 0 && enumerableSymbolCount(value) === 0;
666
+ const outcome = attempt(() => Object.keys(value).length === 0 && enumerableSymbolCount(value) === 0);
667
+ return outcome.success && outcome.value;
608
668
  }
609
669
  /** Determine whether a value is an empty `Map`.
610
670
  *
@@ -615,7 +675,7 @@ function isEmptyObject(value) {
615
675
  * ```
616
676
  */
617
677
  function isEmptyMap(value) {
618
- return value instanceof Map && value.size === 0;
678
+ return isMap(value) && value.size === 0;
619
679
  }
620
680
  /** Determine whether a value is an empty `Set`.
621
681
  *
@@ -626,7 +686,7 @@ function isEmptyMap(value) {
626
686
  * ```
627
687
  */
628
688
  function isEmptySet(value) {
629
- return value instanceof Set && value.size === 0;
689
+ return isSet(value) && value.size === 0;
630
690
  }
631
691
  /** Determine whether a value is a non-empty string (at least one character).
632
692
  *
@@ -660,7 +720,8 @@ function isNonEmptyArray(value) {
660
720
  */
661
721
  function isNonEmptyObject(value) {
662
722
  if (!isRecord(value)) return false;
663
- return Object.keys(value).length > 0 || enumerableSymbolCount(value) > 0;
723
+ const outcome = attempt(() => Object.keys(value).length > 0 || enumerableSymbolCount(value) > 0);
724
+ return outcome.success && outcome.value;
664
725
  }
665
726
  /** Determine whether a value is a non-empty `Map` (at least one entry).
666
727
  *
@@ -671,7 +732,7 @@ function isNonEmptyObject(value) {
671
732
  * ```
672
733
  */
673
734
  function isNonEmptyMap(value) {
674
- return value instanceof Map && value.size > 0;
735
+ return isMap(value) && value.size > 0;
675
736
  }
676
737
  /** Determine whether a value is a non-empty `Set` (at least one element).
677
738
  *
@@ -682,7 +743,7 @@ function isNonEmptyMap(value) {
682
743
  * ```
683
744
  */
684
745
  function isNonEmptySet(value) {
685
- return value instanceof Set && value.size > 0;
746
+ return isSet(value) && value.size > 0;
686
747
  }
687
748
  /** Determine whether a value is a function that declares zero parameters (`Function.length === 0`).
688
749
  *
@@ -1070,7 +1131,7 @@ function literalOf(...literals) {
1070
1131
  * ```
1071
1132
  */
1072
1133
  function instanceOf(ctor) {
1073
- return (value) => isConstructor(ctor) && isObject(value) && value instanceof ctor;
1134
+ return (value) => isConstructor(ctor) && isObject(value) && isInstance(value, ctor);
1074
1135
  }
1075
1136
  /**
1076
1137
  * Build a guard from a native `enum` or any object whose values are strings or
@@ -1933,24 +1994,6 @@ function compileSchema(shape) {
1933
1994
  case "raw": return shape.schema;
1934
1995
  }
1935
1996
  }
1936
- /**
1937
- * Compile a {@link ContractShape} into a runtime type guard.
1938
- *
1939
- * @remarks
1940
- * Reuses the combinators: `literalOf` for literals, `arrayOf` for arrays,
1941
- * `recordOf` for closed objects, `unionOf` for unions, `nullableOf` for nullable,
1942
- * and `whereOf` for constraint refinement. Like every guard it is total — it
1943
- * never throws (AGENTS §14).
1944
- *
1945
- * @param shape - The shape to compile
1946
- * @returns A guard narrowing to the shape's inferred type
1947
- *
1948
- * @example
1949
- * ```ts
1950
- * const isUser = compileGuard(objectShape({ name: stringShape() }))
1951
- * isUser({ name: 'Ada' }) // true
1952
- * ```
1953
- */
1954
1997
  function compileGuard(shape) {
1955
1998
  switch (shape.type) {
1956
1999
  case "string": return stringOf({
@@ -2003,37 +2046,16 @@ function compileGuard(shape) {
2003
2046
  return outcome.success && outcome.value;
2004
2047
  };
2005
2048
  }
2006
- case "union": return unionOf(...shape.variants.map((variant) => compileGuard(variant)));
2049
+ case "union": {
2050
+ const guards = shape.variants.map((variant) => compileGuard(variant));
2051
+ if (shape.mode === "oneOf") return (value) => guards.filter((guard) => guard(value)).length === 1;
2052
+ return unionOf(...guards);
2053
+ }
2007
2054
  case "optional": return orOf(isUndefined, compileGuard(shape.inner));
2008
2055
  case "nullable": return nullableOf(compileGuard(shape.inner));
2009
2056
  case "raw": return (_value) => true;
2010
2057
  }
2011
2058
  }
2012
- /**
2013
- * Compile a {@link ContractShape} into an input parser.
2014
- *
2015
- * @remarks
2016
- * Reuses the leaf parsers (`parseString` / `parseInteger` / `parseNumber` /
2017
- * `parseBoolean` / `parseRecord`) and coerces structurally. An object fails as a
2018
- * whole on any required-field failure; a union returns a guard-valid value
2019
- * unchanged, otherwise the first variant that both parses and guards wins.
2020
- *
2021
- * After coercing a leaf, it re-applies that leaf's REFINEMENTS through the same
2022
- * combinators `compileGuard` uses — `stringOf` for a string's length/pattern and
2023
- * `boundsOf` for a number's value and an array's length — so a value that coerces
2024
- * but violates a bound parses to `undefined`. The result is full parse↔guard
2025
- * soundness (AGENTS §14): a non-`undefined` parse always satisfies the contract's
2026
- * `is`, refinements included.
2027
- *
2028
- * @param shape - The shape to compile
2029
- * @returns A parser yielding the shape's inferred type or `undefined`
2030
- *
2031
- * @example
2032
- * ```ts
2033
- * const parseUser = compileParser(objectShape({ name: stringShape() }))
2034
- * parseUser({ name: 'Ada' }) // { name: 'Ada' }
2035
- * ```
2036
- */
2037
2059
  function compileParser(shape) {
2038
2060
  switch (shape.type) {
2039
2061
  case "string": {
@@ -2135,6 +2157,11 @@ function compileParser(shape) {
2135
2157
  parse: compileParser(variant),
2136
2158
  guard: compileGuard(variant)
2137
2159
  }));
2160
+ if (shape.mode === "oneOf") return (value) => {
2161
+ const matches = variants.filter((variant) => variant.guard(value));
2162
+ const [only] = matches;
2163
+ return matches.length === 1 && only !== void 0 ? only.parse(value) : void 0;
2164
+ };
2138
2165
  return (value) => {
2139
2166
  for (const variant of variants) if (variant.guard(value)) return value;
2140
2167
  for (const variant of variants) {
@@ -2154,30 +2181,6 @@ function compileParser(shape) {
2154
2181
  case "raw": return (value) => value;
2155
2182
  }
2156
2183
  }
2157
- /**
2158
- * Compile a {@link ContractShape} into a deterministic seed value.
2159
- *
2160
- * @remarks
2161
- * The same shape and the same `random` source always produce the same value, so
2162
- * seed data is reproducible. Defaults to a {@link seededRandom} source seeded
2163
- * from the wall clock when none is supplied. Throws on a degenerate empty
2164
- * `literalShape` / `unionShape`, on a pattern-constrained `stringShape` whose
2165
- * generated sample cannot satisfy the pattern, or on a `rawShape` (its embedded
2166
- * schema is arbitrary and cannot be auto-generated) — a programmer error that
2167
- * cannot generate a value (AGENTS §12). `createContract` runs
2168
- * {@link validateShape} first, so a degenerate `literalShape` / `unionShape` /
2169
- * bounded shape is normally caught there; these throws remain here as defense
2170
- * for standalone `compileGenerator` use.
2171
- *
2172
- * @param shape - The shape to generate from
2173
- * @param random - A seeded random source (defaults to `seededRandom(Date.now())`)
2174
- * @returns A value matching the shape
2175
- *
2176
- * @example
2177
- * ```ts
2178
- * compileGenerator(stringShape({ min: 1, max: 4 })) // a random string of 1-4 characters (seed a RandomFunction for determinism)
2179
- * ```
2180
- */
2181
2184
  function compileGenerator(shape, random = seededRandom(Date.now())) {
2182
2185
  switch (shape.type) {
2183
2186
  case "string": {
@@ -2482,16 +2485,32 @@ function unionShape(...variants) {
2482
2485
  * Build a {@link UnionShape} that emits `oneOf` (exactly one match) in JSON Schema.
2483
2486
  *
2484
2487
  * @remarks
2485
- * Runtime behavior is identical to {@link unionShape} — only the emitted schema
2486
- * keyword differs (`oneOf` vs `anyOf`).
2488
+ * Unlike {@link unionShape} (`anyOf` — at least one variant matches),
2489
+ * `oneOfShape`'s compiled guard and parser enforce EXACTLY one match:
2490
+ *
2491
+ * - **Guard**: accepts the value only when exactly one variant's guard
2492
+ * accepts it. A value matching two-or-more variants — which would violate
2493
+ * the emitted `oneOf` schema — is rejected, even though it would pass
2494
+ * {@link unionShape}'s guard.
2495
+ * - **Parser**: judged on the RAW input's guard matches only, with NO
2496
+ * coercion fallback for an ambiguous input. When exactly one variant's
2497
+ * guard accepts the raw value, that variant's parser runs. Zero matches or
2498
+ * two-or-more matches both parse to `undefined` — a value ambiguous
2499
+ * between variants has no well-defined coercion target.
2500
+ *
2501
+ * Prefer {@link unionShape} when a value may legitimately satisfy more than
2502
+ * one variant (e.g. overlapping shapes) and any match is acceptable. Prefer
2503
+ * `oneOfShape` when overlap between variants indicates malformed input that
2504
+ * must be rejected.
2487
2505
  *
2488
2506
  * @param variants - The candidate shapes
2489
2507
  * @returns A union shape with `mode: 'oneOf'`
2490
2508
  *
2491
2509
  * @example
2492
2510
  * ```ts
2493
- * const id = oneOfShape(stringShape(), integerShape())
2494
- * // Infer<typeof id> = string | number
2511
+ * const id = oneOfShape(numberShape(), integerShape())
2512
+ * // 3 fails — matches both numberShape and integerShape
2513
+ * // 3.5 passes — matches numberShape only
2495
2514
  * ```
2496
2515
  */
2497
2516
  function oneOfShape(...variants) {
@@ -2579,6 +2598,6 @@ function rawShape(schema) {
2579
2598
  };
2580
2599
  }
2581
2600
  //#endregion
2582
- export { JSON_SCHEMA_TYPES, andOf, arrayOf, arrayShape, attempt, booleanShape, boundsOf, compileGenerator, compileGuard, compileParser, compileSchema, complementOf, createContract, enumOf, enumerableSymbolCount, instanceOf, integerShape, intersectionOf, isArray, isArrayBuffer, isArrayBufferView, isAsyncFunction, isAsyncGeneratorFunction, isAsyncIterable, isBigInt, isBigInt64Array, isBigUint64Array, isBoolean, isConstructor, isDataView, isDate, isDefined, isEmptyArray, isEmptyMap, isEmptyObject, isEmptySet, isEmptyString, isError, isFalse, isFiniteNumber, isFloat32Array, isFloat64Array, isFunction, isGeneratorFunction, isInt16Array, isInt32Array, isInt8Array, isInteger, isIterable, isJSONPrimitive, isJSONValue, isMap, isNonEmptyArray, isNonEmptyMap, isNonEmptyObject, isNonEmptySet, isNonEmptyString, isNull, isNullableBoolean, isNullableNumber, isNullableString, isNumber, isObject, isPromise, isPromiseLike, isRecord, isRegExp, isSet, isSharedArrayBuffer, isString, isSymbol, isTrue, isUint16Array, isUint32Array, isUint8Array, isUint8ClampedArray, isUndefined, isWeakMap, isWeakSet, isZeroArg, isZeroArgAsync, isZeroArgAsyncGenerator, isZeroArgGenerator, iterableOf, jsonShape, keyOf, lazyOf, literalOf, literalShape, mapOf, matchOf, notOf, nullShape, nullableOf, nullableShape, numberShape, objectShape, omitOf, oneOfShape, optionalOf, optionalShape, orOf, parseArray, parseArrayField, parseBoolean, parseBooleanField, parseEnum, parseEnumField, parseInteger, parseIntegerField, parseJSON, parseJSONAs, parseJSONValue, parseJSONValueField, parseNull, parseNullField, parseNumber, parseNumberField, parseRecord, parseRecordField, parseString, parseStringField, pickOf, rawShape, recordOf, recordShape, resolveField, schemaToParameters, seededRandom, setOf, stringOf, stringShape, transformOf, tupleOf, unionOf, unionShape, validateShape, whereOf };
2601
+ export { JSON_SCHEMA_TYPES, andOf, arrayOf, arrayShape, attempt, booleanShape, boundsOf, compileGenerator, compileGuard, compileParser, compileSchema, complementOf, createContract, enumOf, enumerableSymbolCount, instanceOf, integerShape, intersectionOf, isArray, isArrayBuffer, isArrayBufferView, isAsyncFunction, isAsyncGeneratorFunction, isAsyncIterable, isBigInt, isBigInt64Array, isBigUint64Array, isBoolean, isConstructor, isDataView, isDate, isDefined, isEmptyArray, isEmptyMap, isEmptyObject, isEmptySet, isEmptyString, isError, isFalse, isFiniteNumber, isFloat32Array, isFloat64Array, isFunction, isGeneratorFunction, isInstance, isInt16Array, isInt32Array, isInt8Array, isInteger, isIterable, isJSONPrimitive, isJSONValue, isMap, isNonEmptyArray, isNonEmptyMap, isNonEmptyObject, isNonEmptySet, isNonEmptyString, isNull, isNullableBoolean, isNullableNumber, isNullableString, isNumber, isObject, isPromise, isPromiseLike, isRecord, isRegExp, isSet, isSharedArrayBuffer, isString, isSymbol, isTrue, isUint16Array, isUint32Array, isUint8Array, isUint8ClampedArray, isUndefined, isWeakMap, isWeakSet, isZeroArg, isZeroArgAsync, isZeroArgAsyncGenerator, isZeroArgGenerator, iterableOf, jsonShape, keyOf, lazyOf, literalOf, literalShape, mapOf, matchOf, notOf, nullShape, nullableOf, nullableShape, numberShape, objectShape, omitOf, oneOfShape, optionalOf, optionalShape, orOf, parseArray, parseArrayField, parseBoolean, parseBooleanField, parseEnum, parseEnumField, parseInteger, parseIntegerField, parseJSON, parseJSONAs, parseJSONValue, parseJSONValueField, parseNull, parseNullField, parseNumber, parseNumberField, parseRecord, parseRecordField, parseString, parseStringField, pickOf, rawShape, recordOf, recordShape, resolveField, schemaToParameters, seededRandom, setOf, stringOf, stringShape, transformOf, tupleOf, unionOf, unionShape, validateShape, whereOf };
2583
2602
 
2584
2603
  //# sourceMappingURL=index.js.map