yummies 7.16.2 → 7.17.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/assert.cjs CHANGED
@@ -26,6 +26,7 @@ let yummies_common = require("yummies/common");
26
26
  */
27
27
  var _exports_exports = /* @__PURE__ */ require_chunk.__exportAll({
28
28
  AssertionError: () => AssertionError,
29
+ array: () => array,
29
30
  boolean: () => boolean,
30
31
  defined: () => defined,
31
32
  fail: () => fail,
@@ -35,6 +36,7 @@ var _exports_exports = /* @__PURE__ */ require_chunk.__exportAll({
35
36
  notNull: () => notNull,
36
37
  notUndefined: () => notUndefined,
37
38
  number: () => number,
39
+ object: () => object,
38
40
  ok: () => ok,
39
41
  string: () => string,
40
42
  symbol: () => symbol,
@@ -110,6 +112,24 @@ function string(value, message) {
110
112
  if (!yummies_type_guard.typeGuard.isString(value)) throw new AssertionError(resolveAssertMessage(message, "Expected a string"));
111
113
  }
112
114
  /**
115
+ * Throws when `value` is not a object (primitive or `AnyObject` object); uses `typeGuard.isObject`.
116
+ *
117
+ * @param value Value to narrow.
118
+ * @param message Optional message or lazy message factory.
119
+ */
120
+ function object(value, message) {
121
+ if (!yummies_type_guard.typeGuard.isObject(value)) throw new AssertionError(resolveAssertMessage(message, "Expected an object"));
122
+ }
123
+ /**
124
+ * Throws when `value` is not a object (primitive or `AnyObject` object); uses `typeGuard.isArray`.
125
+ *
126
+ * @param value Value to narrow.
127
+ * @param message Optional message or lazy message factory.
128
+ */
129
+ function array(value, message) {
130
+ if (!yummies_type_guard.typeGuard.isArray(value)) throw new AssertionError(resolveAssertMessage(message, "Expected an array"));
131
+ }
132
+ /**
113
133
  * Throws when `value` is not a finite non-NaN number; uses `typeGuard.isNumber`.
114
134
  *
115
135
  * @param value Value to narrow.
package/assert.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"assert.cjs","names":[],"sources":["../src/assert/_exports.ts"],"sourcesContent":["/**\n * ---header-docs-section---\n * # yummies/assert\n *\n * ## Description\n *\n * Runtime **assertions** for invariants, narrowing, and exhaustiveness. Helpers throw\n * {@link AssertionError} with an optional message (`string` or {@link MaybeFn}) so failing fast stays\n * explicit without a heavy assertion library. Use `assert.ok`, `assert.string`, `assert.defined`,\n * `assert.fail`, and the rest on the namespace export from the package entry.\n *\n * ## Usage\n *\n * ```ts\n * import { assert } from \"yummies/assert\";\n *\n * assert.ok(user.id, \"user id is required\");\n * assert.defined(maybeName);\n * assert.string(raw);\n * ```\n */\n\nimport { callFunction } from 'yummies/common';\nimport { typeGuard } from 'yummies/type-guard';\nimport type { Maybe, MaybeFn } from 'yummies/types';\n\n/**\n * Error thrown by assertion helpers in this module.\n */\nexport class AssertionError extends Error {\n override name = 'AssertionError';\n}\n\nfunction resolveAssertMessage(\n message: MaybeFn<string> | undefined,\n fallback: string,\n): string {\n if (message === undefined) {\n return fallback;\n }\n return callFunction(message);\n}\n\n/**\n * Throws when `condition` is falsy; narrows the type when it is truthy.\n *\n * @param condition Value treated as a boolean guard.\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * assert.ok(user.id, \"user id is required\");\n * ```\n */\nexport function ok(\n condition: unknown,\n message?: MaybeFn<string>,\n): asserts condition {\n if (typeGuard.isFalsy(condition)) {\n throw new AssertionError(resolveAssertMessage(message, 'Assertion failed'));\n }\n}\n\n/**\n * Same as {@link ok}; common alias for internal invariants (e.g. after optional checks).\n */\nexport const invariant: typeof ok = ok;\n\n/**\n * Throws when the value is `null` or `undefined`; otherwise narrows away nullish.\n *\n * @param value Possibly nullish value.\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * assert.defined(maybeName, \"name must be present\");\n * ```\n */\nexport function defined<T>(\n value: Maybe<T>,\n message?: MaybeFn<string>,\n): asserts value is NonNullable<T> {\n if (!typeGuard.isDefined(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a defined value'),\n );\n }\n}\n\n/**\n * Throws when the value is `null`; allows `undefined` unless combined with other checks.\n *\n * @param value Value that may be `null`.\n * @param message Optional message or lazy message factory.\n */\nexport function notNull<T>(\n value: T | null,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (typeGuard.isNull(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a non-null value'),\n );\n }\n}\n\n/**\n * Throws when the value is `undefined`.\n *\n * @param value Value that may be `undefined`.\n * @param message Optional message or lazy message factory.\n */\nexport function notUndefined<T>(\n value: T | undefined,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (typeGuard.isUndefined(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a defined value'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a string (primitive or `String` object); uses `typeGuard.isString`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function string(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is string {\n if (!typeGuard.isString(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a string'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a finite non-NaN number; uses `typeGuard.isNumber`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function number(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is number {\n if (!typeGuard.isNumber(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a finite number'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a boolean; uses `typeGuard.isBoolean`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function boolean(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is boolean {\n if (!typeGuard.isBoolean(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a boolean'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a symbol; uses `typeGuard.isSymbol`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function symbol(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is symbol {\n if (!typeGuard.isSymbol(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a symbol'),\n );\n }\n}\n\n/**\n * Always throws; use for branches that must be impossible or as a typed “abort”.\n *\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * function parse(kind: \"a\" | \"b\") {\n * if (kind === \"a\") return 1;\n * if (kind === \"b\") return 2;\n * assert.fail(\"unreachable\");\n * }\n * ```\n */\nexport function fail(message?: MaybeFn<string>): never {\n throw new AssertionError(resolveAssertMessage(message, 'Unreachable'));\n}\n\n/**\n * Exhaustiveness helper: call with a `never` value when all union cases are handled.\n *\n * @param value Should be `never` when the type checker is satisfied.\n * @param message Optional message (this path always throws, so a lazy factory is unnecessary).\n */\nexport function unreachable(value: never, message?: string): never {\n throw new AssertionError(\n resolveAssertMessage(message, `Unexpected value: ${String(value)}`),\n );\n}\n\n/**\n * Alias for {@link unreachable} (common name in switch exhaustiveness snippets).\n */\nexport { unreachable as never };\n\n/**\n * Throws when `value` is not an instance of `ctor`.\n *\n * @param value Value to check.\n * @param ctor Constructor used with `instanceof`.\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * assert.instanceOf(el, HTMLElement, \"expected a DOM element\");\n * ```\n */\nexport function instanceOf<T>(\n value: unknown,\n ctor: abstract new (...args: never[]) => T,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (!(value instanceof ctor)) {\n throw new AssertionError(\n resolveAssertMessage(message, `Expected instance of ${ctor.name}`),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,iBAAb,cAAoC,MAAM;CACxC,OAAgB;;AAGlB,SAAS,qBACP,SACA,UACQ;AACR,KAAI,YAAY,KAAA,EACd,QAAO;AAET,SAAA,GAAA,eAAA,cAAoB,QAAQ;;;;;;;;;;;;;AAc9B,SAAgB,GACd,WACA,SACmB;AACnB,KAAI,mBAAA,UAAU,QAAQ,UAAU,CAC9B,OAAM,IAAI,eAAe,qBAAqB,SAAS,mBAAmB,CAAC;;;;;AAO/E,IAAa,YAAuB;;;;;;;;;;;;AAapC,SAAgB,QACd,OACA,SACiC;AACjC,KAAI,CAAC,mBAAA,UAAU,UAAU,MAAM,CAC7B,OAAM,IAAI,eACR,qBAAqB,SAAS,2BAA2B,CAC1D;;;;;;;;AAUL,SAAgB,QACd,OACA,SACoB;AACpB,KAAI,mBAAA,UAAU,OAAO,MAAM,CACzB,OAAM,IAAI,eACR,qBAAqB,SAAS,4BAA4B,CAC3D;;;;;;;;AAUL,SAAgB,aACd,OACA,SACoB;AACpB,KAAI,mBAAA,UAAU,YAAY,MAAM,CAC9B,OAAM,IAAI,eACR,qBAAqB,SAAS,2BAA2B,CAC1D;;;;;;;;AAUL,SAAgB,OACd,OACA,SACyB;AACzB,KAAI,CAAC,mBAAA,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,oBAAoB,CACnD;;;;;;;;AAUL,SAAgB,OACd,OACA,SACyB;AACzB,KAAI,CAAC,mBAAA,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,2BAA2B,CAC1D;;;;;;;;AAUL,SAAgB,QACd,OACA,SAC0B;AAC1B,KAAI,CAAC,mBAAA,UAAU,UAAU,MAAM,CAC7B,OAAM,IAAI,eACR,qBAAqB,SAAS,qBAAqB,CACpD;;;;;;;;AAUL,SAAgB,OACd,OACA,SACyB;AACzB,KAAI,CAAC,mBAAA,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,oBAAoB,CACnD;;;;;;;;;;;;;;;;AAkBL,SAAgB,KAAK,SAAkC;AACrD,OAAM,IAAI,eAAe,qBAAqB,SAAS,cAAc,CAAC;;;;;;;;AASxE,SAAgB,YAAY,OAAc,SAAyB;AACjE,OAAM,IAAI,eACR,qBAAqB,SAAS,qBAAqB,OAAO,MAAM,GAAG,CACpE;;;;;;;;;;;;;;AAoBH,SAAgB,WACd,OACA,MACA,SACoB;AACpB,KAAI,EAAE,iBAAiB,MACrB,OAAM,IAAI,eACR,qBAAqB,SAAS,wBAAwB,KAAK,OAAO,CACnE"}
1
+ {"version":3,"file":"assert.cjs","names":[],"sources":["../src/assert/_exports.ts"],"sourcesContent":["/**\n * ---header-docs-section---\n * # yummies/assert\n *\n * ## Description\n *\n * Runtime **assertions** for invariants, narrowing, and exhaustiveness. Helpers throw\n * {@link AssertionError} with an optional message (`string` or {@link MaybeFn}) so failing fast stays\n * explicit without a heavy assertion library. Use `assert.ok`, `assert.string`, `assert.defined`,\n * `assert.fail`, and the rest on the namespace export from the package entry.\n *\n * ## Usage\n *\n * ```ts\n * import { assert } from \"yummies/assert\";\n *\n * assert.ok(user.id, \"user id is required\");\n * assert.defined(maybeName);\n * assert.string(raw);\n * ```\n */\n\nimport { callFunction } from 'yummies/common';\nimport { typeGuard } from 'yummies/type-guard';\nimport type { AnyObject, Maybe, MaybeFn } from 'yummies/types';\n\n/**\n * Error thrown by assertion helpers in this module.\n */\nexport class AssertionError extends Error {\n override name = 'AssertionError';\n}\n\nfunction resolveAssertMessage(\n message: MaybeFn<string> | undefined,\n fallback: string,\n): string {\n if (message === undefined) {\n return fallback;\n }\n return callFunction(message);\n}\n\n/**\n * Throws when `condition` is falsy; narrows the type when it is truthy.\n *\n * @param condition Value treated as a boolean guard.\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * assert.ok(user.id, \"user id is required\");\n * ```\n */\nexport function ok(\n condition: unknown,\n message?: MaybeFn<string>,\n): asserts condition {\n if (typeGuard.isFalsy(condition)) {\n throw new AssertionError(resolveAssertMessage(message, 'Assertion failed'));\n }\n}\n\n/**\n * Same as {@link ok}; common alias for internal invariants (e.g. after optional checks).\n */\nexport const invariant: typeof ok = ok;\n\n/**\n * Throws when the value is `null` or `undefined`; otherwise narrows away nullish.\n *\n * @param value Possibly nullish value.\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * assert.defined(maybeName, \"name must be present\");\n * ```\n */\nexport function defined<T>(\n value: Maybe<T>,\n message?: MaybeFn<string>,\n): asserts value is NonNullable<T> {\n if (!typeGuard.isDefined(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a defined value'),\n );\n }\n}\n\n/**\n * Throws when the value is `null`; allows `undefined` unless combined with other checks.\n *\n * @param value Value that may be `null`.\n * @param message Optional message or lazy message factory.\n */\nexport function notNull<T>(\n value: T | null,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (typeGuard.isNull(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a non-null value'),\n );\n }\n}\n\n/**\n * Throws when the value is `undefined`.\n *\n * @param value Value that may be `undefined`.\n * @param message Optional message or lazy message factory.\n */\nexport function notUndefined<T>(\n value: T | undefined,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (typeGuard.isUndefined(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a defined value'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a string (primitive or `String` object); uses `typeGuard.isString`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function string(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is string {\n if (!typeGuard.isString(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a string'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a object (primitive or `AnyObject` object); uses `typeGuard.isObject`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function object<T extends AnyObject = AnyObject>(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (!typeGuard.isObject(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected an object'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a object (primitive or `AnyObject` object); uses `typeGuard.isArray`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function array<T extends any[] = any[]>(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (!typeGuard.isArray(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected an array'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a finite non-NaN number; uses `typeGuard.isNumber`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function number(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is number {\n if (!typeGuard.isNumber(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a finite number'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a boolean; uses `typeGuard.isBoolean`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function boolean(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is boolean {\n if (!typeGuard.isBoolean(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a boolean'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a symbol; uses `typeGuard.isSymbol`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function symbol(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is symbol {\n if (!typeGuard.isSymbol(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a symbol'),\n );\n }\n}\n\n/**\n * Always throws; use for branches that must be impossible or as a typed “abort”.\n *\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * function parse(kind: \"a\" | \"b\") {\n * if (kind === \"a\") return 1;\n * if (kind === \"b\") return 2;\n * assert.fail(\"unreachable\");\n * }\n * ```\n */\nexport function fail(message?: MaybeFn<string>): never {\n throw new AssertionError(resolveAssertMessage(message, 'Unreachable'));\n}\n\n/**\n * Exhaustiveness helper: call with a `never` value when all union cases are handled.\n *\n * @param value Should be `never` when the type checker is satisfied.\n * @param message Optional message (this path always throws, so a lazy factory is unnecessary).\n */\nexport function unreachable(value: never, message?: string): never {\n throw new AssertionError(\n resolveAssertMessage(message, `Unexpected value: ${String(value)}`),\n );\n}\n\n/**\n * Alias for {@link unreachable} (common name in switch exhaustiveness snippets).\n */\nexport { unreachable as never };\n\n/**\n * Throws when `value` is not an instance of `ctor`.\n *\n * @param value Value to check.\n * @param ctor Constructor used with `instanceof`.\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * assert.instanceOf(el, HTMLElement, \"expected a DOM element\");\n * ```\n */\nexport function instanceOf<T>(\n value: unknown,\n ctor: abstract new (...args: never[]) => T,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (!(value instanceof ctor)) {\n throw new AssertionError(\n resolveAssertMessage(message, `Expected instance of ${ctor.name}`),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,iBAAb,cAAoC,MAAM;CACxC,OAAgB;;AAGlB,SAAS,qBACP,SACA,UACQ;AACR,KAAI,YAAY,KAAA,EACd,QAAO;AAET,SAAA,GAAA,eAAA,cAAoB,QAAQ;;;;;;;;;;;;;AAc9B,SAAgB,GACd,WACA,SACmB;AACnB,KAAI,mBAAA,UAAU,QAAQ,UAAU,CAC9B,OAAM,IAAI,eAAe,qBAAqB,SAAS,mBAAmB,CAAC;;;;;AAO/E,IAAa,YAAuB;;;;;;;;;;;;AAapC,SAAgB,QACd,OACA,SACiC;AACjC,KAAI,CAAC,mBAAA,UAAU,UAAU,MAAM,CAC7B,OAAM,IAAI,eACR,qBAAqB,SAAS,2BAA2B,CAC1D;;;;;;;;AAUL,SAAgB,QACd,OACA,SACoB;AACpB,KAAI,mBAAA,UAAU,OAAO,MAAM,CACzB,OAAM,IAAI,eACR,qBAAqB,SAAS,4BAA4B,CAC3D;;;;;;;;AAUL,SAAgB,aACd,OACA,SACoB;AACpB,KAAI,mBAAA,UAAU,YAAY,MAAM,CAC9B,OAAM,IAAI,eACR,qBAAqB,SAAS,2BAA2B,CAC1D;;;;;;;;AAUL,SAAgB,OACd,OACA,SACyB;AACzB,KAAI,CAAC,mBAAA,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,oBAAoB,CACnD;;;;;;;;AAUL,SAAgB,OACd,OACA,SACoB;AACpB,KAAI,CAAC,mBAAA,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,qBAAqB,CACpD;;;;;;;;AAUL,SAAgB,MACd,OACA,SACoB;AACpB,KAAI,CAAC,mBAAA,UAAU,QAAQ,MAAM,CAC3B,OAAM,IAAI,eACR,qBAAqB,SAAS,oBAAoB,CACnD;;;;;;;;AAUL,SAAgB,OACd,OACA,SACyB;AACzB,KAAI,CAAC,mBAAA,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,2BAA2B,CAC1D;;;;;;;;AAUL,SAAgB,QACd,OACA,SAC0B;AAC1B,KAAI,CAAC,mBAAA,UAAU,UAAU,MAAM,CAC7B,OAAM,IAAI,eACR,qBAAqB,SAAS,qBAAqB,CACpD;;;;;;;;AAUL,SAAgB,OACd,OACA,SACyB;AACzB,KAAI,CAAC,mBAAA,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,oBAAoB,CACnD;;;;;;;;;;;;;;;;AAkBL,SAAgB,KAAK,SAAkC;AACrD,OAAM,IAAI,eAAe,qBAAqB,SAAS,cAAc,CAAC;;;;;;;;AASxE,SAAgB,YAAY,OAAc,SAAyB;AACjE,OAAM,IAAI,eACR,qBAAqB,SAAS,qBAAqB,OAAO,MAAM,GAAG,CACpE;;;;;;;;;;;;;;AAoBH,SAAgB,WACd,OACA,MACA,SACoB;AACpB,KAAI,EAAE,iBAAiB,MACrB,OAAM,IAAI,eACR,qBAAqB,SAAS,wBAAwB,KAAK,OAAO,CACnE"}
package/assert.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { MaybeFn, Maybe } from 'yummies/types';
1
+ import { MaybeFn, Maybe, AnyObject } from 'yummies/types';
2
2
 
3
3
  /**
4
4
  * ---header-docs-section---
@@ -77,6 +77,20 @@ declare function notUndefined<T>(value: T | undefined, message?: MaybeFn<string>
77
77
  * @param message Optional message or lazy message factory.
78
78
  */
79
79
  declare function string(value: unknown, message?: MaybeFn<string>): asserts value is string;
80
+ /**
81
+ * Throws when `value` is not a object (primitive or `AnyObject` object); uses `typeGuard.isObject`.
82
+ *
83
+ * @param value Value to narrow.
84
+ * @param message Optional message or lazy message factory.
85
+ */
86
+ declare function object<T extends AnyObject = AnyObject>(value: unknown, message?: MaybeFn<string>): asserts value is T;
87
+ /**
88
+ * Throws when `value` is not a object (primitive or `AnyObject` object); uses `typeGuard.isArray`.
89
+ *
90
+ * @param value Value to narrow.
91
+ * @param message Optional message or lazy message factory.
92
+ */
93
+ declare function array<T extends any[] = any[]>(value: unknown, message?: MaybeFn<string>): asserts value is T;
80
94
  /**
81
95
  * Throws when `value` is not a finite non-NaN number; uses `typeGuard.isNumber`.
82
96
  *
@@ -137,6 +151,7 @@ declare function instanceOf<T>(value: unknown, ctor: abstract new (...args: neve
137
151
 
138
152
  type _exports_AssertionError = AssertionError;
139
153
  declare const _exports_AssertionError: typeof AssertionError;
154
+ declare const _exports_array: typeof array;
140
155
  declare const _exports_boolean: typeof boolean;
141
156
  declare const _exports_defined: typeof defined;
142
157
  declare const _exports_fail: typeof fail;
@@ -145,6 +160,7 @@ declare const _exports_invariant: typeof invariant;
145
160
  declare const _exports_notNull: typeof notNull;
146
161
  declare const _exports_notUndefined: typeof notUndefined;
147
162
  declare const _exports_number: typeof number;
163
+ declare const _exports_object: typeof object;
148
164
  declare const _exports_ok: typeof ok;
149
165
  declare const _exports_string: typeof string;
150
166
  declare const _exports_symbol: typeof symbol;
@@ -152,6 +168,7 @@ declare const _exports_unreachable: typeof unreachable;
152
168
  declare namespace _exports {
153
169
  export {
154
170
  _exports_AssertionError as AssertionError,
171
+ _exports_array as array,
155
172
  _exports_boolean as boolean,
156
173
  _exports_defined as defined,
157
174
  _exports_fail as fail,
@@ -161,6 +178,7 @@ declare namespace _exports {
161
178
  _exports_notNull as notNull,
162
179
  _exports_notUndefined as notUndefined,
163
180
  _exports_number as number,
181
+ _exports_object as object,
164
182
  _exports_ok as ok,
165
183
  _exports_string as string,
166
184
  _exports_symbol as symbol,
package/assert.js CHANGED
@@ -25,6 +25,7 @@ import { callFunction } from "yummies/common";
25
25
  */
26
26
  var _exports_exports = /* @__PURE__ */ __exportAll({
27
27
  AssertionError: () => AssertionError,
28
+ array: () => array,
28
29
  boolean: () => boolean,
29
30
  defined: () => defined,
30
31
  fail: () => fail,
@@ -34,6 +35,7 @@ var _exports_exports = /* @__PURE__ */ __exportAll({
34
35
  notNull: () => notNull,
35
36
  notUndefined: () => notUndefined,
36
37
  number: () => number,
38
+ object: () => object,
37
39
  ok: () => ok,
38
40
  string: () => string,
39
41
  symbol: () => symbol,
@@ -109,6 +111,24 @@ function string(value, message) {
109
111
  if (!typeGuard.isString(value)) throw new AssertionError(resolveAssertMessage(message, "Expected a string"));
110
112
  }
111
113
  /**
114
+ * Throws when `value` is not a object (primitive or `AnyObject` object); uses `typeGuard.isObject`.
115
+ *
116
+ * @param value Value to narrow.
117
+ * @param message Optional message or lazy message factory.
118
+ */
119
+ function object(value, message) {
120
+ if (!typeGuard.isObject(value)) throw new AssertionError(resolveAssertMessage(message, "Expected an object"));
121
+ }
122
+ /**
123
+ * Throws when `value` is not a object (primitive or `AnyObject` object); uses `typeGuard.isArray`.
124
+ *
125
+ * @param value Value to narrow.
126
+ * @param message Optional message or lazy message factory.
127
+ */
128
+ function array(value, message) {
129
+ if (!typeGuard.isArray(value)) throw new AssertionError(resolveAssertMessage(message, "Expected an array"));
130
+ }
131
+ /**
112
132
  * Throws when `value` is not a finite non-NaN number; uses `typeGuard.isNumber`.
113
133
  *
114
134
  * @param value Value to narrow.
package/assert.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"assert.js","names":[],"sources":["../src/assert/_exports.ts"],"sourcesContent":["/**\n * ---header-docs-section---\n * # yummies/assert\n *\n * ## Description\n *\n * Runtime **assertions** for invariants, narrowing, and exhaustiveness. Helpers throw\n * {@link AssertionError} with an optional message (`string` or {@link MaybeFn}) so failing fast stays\n * explicit without a heavy assertion library. Use `assert.ok`, `assert.string`, `assert.defined`,\n * `assert.fail`, and the rest on the namespace export from the package entry.\n *\n * ## Usage\n *\n * ```ts\n * import { assert } from \"yummies/assert\";\n *\n * assert.ok(user.id, \"user id is required\");\n * assert.defined(maybeName);\n * assert.string(raw);\n * ```\n */\n\nimport { callFunction } from 'yummies/common';\nimport { typeGuard } from 'yummies/type-guard';\nimport type { Maybe, MaybeFn } from 'yummies/types';\n\n/**\n * Error thrown by assertion helpers in this module.\n */\nexport class AssertionError extends Error {\n override name = 'AssertionError';\n}\n\nfunction resolveAssertMessage(\n message: MaybeFn<string> | undefined,\n fallback: string,\n): string {\n if (message === undefined) {\n return fallback;\n }\n return callFunction(message);\n}\n\n/**\n * Throws when `condition` is falsy; narrows the type when it is truthy.\n *\n * @param condition Value treated as a boolean guard.\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * assert.ok(user.id, \"user id is required\");\n * ```\n */\nexport function ok(\n condition: unknown,\n message?: MaybeFn<string>,\n): asserts condition {\n if (typeGuard.isFalsy(condition)) {\n throw new AssertionError(resolveAssertMessage(message, 'Assertion failed'));\n }\n}\n\n/**\n * Same as {@link ok}; common alias for internal invariants (e.g. after optional checks).\n */\nexport const invariant: typeof ok = ok;\n\n/**\n * Throws when the value is `null` or `undefined`; otherwise narrows away nullish.\n *\n * @param value Possibly nullish value.\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * assert.defined(maybeName, \"name must be present\");\n * ```\n */\nexport function defined<T>(\n value: Maybe<T>,\n message?: MaybeFn<string>,\n): asserts value is NonNullable<T> {\n if (!typeGuard.isDefined(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a defined value'),\n );\n }\n}\n\n/**\n * Throws when the value is `null`; allows `undefined` unless combined with other checks.\n *\n * @param value Value that may be `null`.\n * @param message Optional message or lazy message factory.\n */\nexport function notNull<T>(\n value: T | null,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (typeGuard.isNull(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a non-null value'),\n );\n }\n}\n\n/**\n * Throws when the value is `undefined`.\n *\n * @param value Value that may be `undefined`.\n * @param message Optional message or lazy message factory.\n */\nexport function notUndefined<T>(\n value: T | undefined,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (typeGuard.isUndefined(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a defined value'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a string (primitive or `String` object); uses `typeGuard.isString`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function string(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is string {\n if (!typeGuard.isString(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a string'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a finite non-NaN number; uses `typeGuard.isNumber`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function number(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is number {\n if (!typeGuard.isNumber(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a finite number'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a boolean; uses `typeGuard.isBoolean`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function boolean(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is boolean {\n if (!typeGuard.isBoolean(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a boolean'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a symbol; uses `typeGuard.isSymbol`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function symbol(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is symbol {\n if (!typeGuard.isSymbol(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a symbol'),\n );\n }\n}\n\n/**\n * Always throws; use for branches that must be impossible or as a typed “abort”.\n *\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * function parse(kind: \"a\" | \"b\") {\n * if (kind === \"a\") return 1;\n * if (kind === \"b\") return 2;\n * assert.fail(\"unreachable\");\n * }\n * ```\n */\nexport function fail(message?: MaybeFn<string>): never {\n throw new AssertionError(resolveAssertMessage(message, 'Unreachable'));\n}\n\n/**\n * Exhaustiveness helper: call with a `never` value when all union cases are handled.\n *\n * @param value Should be `never` when the type checker is satisfied.\n * @param message Optional message (this path always throws, so a lazy factory is unnecessary).\n */\nexport function unreachable(value: never, message?: string): never {\n throw new AssertionError(\n resolveAssertMessage(message, `Unexpected value: ${String(value)}`),\n );\n}\n\n/**\n * Alias for {@link unreachable} (common name in switch exhaustiveness snippets).\n */\nexport { unreachable as never };\n\n/**\n * Throws when `value` is not an instance of `ctor`.\n *\n * @param value Value to check.\n * @param ctor Constructor used with `instanceof`.\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * assert.instanceOf(el, HTMLElement, \"expected a DOM element\");\n * ```\n */\nexport function instanceOf<T>(\n value: unknown,\n ctor: abstract new (...args: never[]) => T,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (!(value instanceof ctor)) {\n throw new AssertionError(\n resolveAssertMessage(message, `Expected instance of ${ctor.name}`),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,iBAAb,cAAoC,MAAM;CACxC,OAAgB;;AAGlB,SAAS,qBACP,SACA,UACQ;AACR,KAAI,YAAY,KAAA,EACd,QAAO;AAET,QAAO,aAAa,QAAQ;;;;;;;;;;;;;AAc9B,SAAgB,GACd,WACA,SACmB;AACnB,KAAI,UAAU,QAAQ,UAAU,CAC9B,OAAM,IAAI,eAAe,qBAAqB,SAAS,mBAAmB,CAAC;;;;;AAO/E,IAAa,YAAuB;;;;;;;;;;;;AAapC,SAAgB,QACd,OACA,SACiC;AACjC,KAAI,CAAC,UAAU,UAAU,MAAM,CAC7B,OAAM,IAAI,eACR,qBAAqB,SAAS,2BAA2B,CAC1D;;;;;;;;AAUL,SAAgB,QACd,OACA,SACoB;AACpB,KAAI,UAAU,OAAO,MAAM,CACzB,OAAM,IAAI,eACR,qBAAqB,SAAS,4BAA4B,CAC3D;;;;;;;;AAUL,SAAgB,aACd,OACA,SACoB;AACpB,KAAI,UAAU,YAAY,MAAM,CAC9B,OAAM,IAAI,eACR,qBAAqB,SAAS,2BAA2B,CAC1D;;;;;;;;AAUL,SAAgB,OACd,OACA,SACyB;AACzB,KAAI,CAAC,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,oBAAoB,CACnD;;;;;;;;AAUL,SAAgB,OACd,OACA,SACyB;AACzB,KAAI,CAAC,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,2BAA2B,CAC1D;;;;;;;;AAUL,SAAgB,QACd,OACA,SAC0B;AAC1B,KAAI,CAAC,UAAU,UAAU,MAAM,CAC7B,OAAM,IAAI,eACR,qBAAqB,SAAS,qBAAqB,CACpD;;;;;;;;AAUL,SAAgB,OACd,OACA,SACyB;AACzB,KAAI,CAAC,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,oBAAoB,CACnD;;;;;;;;;;;;;;;;AAkBL,SAAgB,KAAK,SAAkC;AACrD,OAAM,IAAI,eAAe,qBAAqB,SAAS,cAAc,CAAC;;;;;;;;AASxE,SAAgB,YAAY,OAAc,SAAyB;AACjE,OAAM,IAAI,eACR,qBAAqB,SAAS,qBAAqB,OAAO,MAAM,GAAG,CACpE;;;;;;;;;;;;;;AAoBH,SAAgB,WACd,OACA,MACA,SACoB;AACpB,KAAI,EAAE,iBAAiB,MACrB,OAAM,IAAI,eACR,qBAAqB,SAAS,wBAAwB,KAAK,OAAO,CACnE"}
1
+ {"version":3,"file":"assert.js","names":[],"sources":["../src/assert/_exports.ts"],"sourcesContent":["/**\n * ---header-docs-section---\n * # yummies/assert\n *\n * ## Description\n *\n * Runtime **assertions** for invariants, narrowing, and exhaustiveness. Helpers throw\n * {@link AssertionError} with an optional message (`string` or {@link MaybeFn}) so failing fast stays\n * explicit without a heavy assertion library. Use `assert.ok`, `assert.string`, `assert.defined`,\n * `assert.fail`, and the rest on the namespace export from the package entry.\n *\n * ## Usage\n *\n * ```ts\n * import { assert } from \"yummies/assert\";\n *\n * assert.ok(user.id, \"user id is required\");\n * assert.defined(maybeName);\n * assert.string(raw);\n * ```\n */\n\nimport { callFunction } from 'yummies/common';\nimport { typeGuard } from 'yummies/type-guard';\nimport type { AnyObject, Maybe, MaybeFn } from 'yummies/types';\n\n/**\n * Error thrown by assertion helpers in this module.\n */\nexport class AssertionError extends Error {\n override name = 'AssertionError';\n}\n\nfunction resolveAssertMessage(\n message: MaybeFn<string> | undefined,\n fallback: string,\n): string {\n if (message === undefined) {\n return fallback;\n }\n return callFunction(message);\n}\n\n/**\n * Throws when `condition` is falsy; narrows the type when it is truthy.\n *\n * @param condition Value treated as a boolean guard.\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * assert.ok(user.id, \"user id is required\");\n * ```\n */\nexport function ok(\n condition: unknown,\n message?: MaybeFn<string>,\n): asserts condition {\n if (typeGuard.isFalsy(condition)) {\n throw new AssertionError(resolveAssertMessage(message, 'Assertion failed'));\n }\n}\n\n/**\n * Same as {@link ok}; common alias for internal invariants (e.g. after optional checks).\n */\nexport const invariant: typeof ok = ok;\n\n/**\n * Throws when the value is `null` or `undefined`; otherwise narrows away nullish.\n *\n * @param value Possibly nullish value.\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * assert.defined(maybeName, \"name must be present\");\n * ```\n */\nexport function defined<T>(\n value: Maybe<T>,\n message?: MaybeFn<string>,\n): asserts value is NonNullable<T> {\n if (!typeGuard.isDefined(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a defined value'),\n );\n }\n}\n\n/**\n * Throws when the value is `null`; allows `undefined` unless combined with other checks.\n *\n * @param value Value that may be `null`.\n * @param message Optional message or lazy message factory.\n */\nexport function notNull<T>(\n value: T | null,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (typeGuard.isNull(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a non-null value'),\n );\n }\n}\n\n/**\n * Throws when the value is `undefined`.\n *\n * @param value Value that may be `undefined`.\n * @param message Optional message or lazy message factory.\n */\nexport function notUndefined<T>(\n value: T | undefined,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (typeGuard.isUndefined(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a defined value'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a string (primitive or `String` object); uses `typeGuard.isString`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function string(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is string {\n if (!typeGuard.isString(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a string'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a object (primitive or `AnyObject` object); uses `typeGuard.isObject`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function object<T extends AnyObject = AnyObject>(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (!typeGuard.isObject(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected an object'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a object (primitive or `AnyObject` object); uses `typeGuard.isArray`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function array<T extends any[] = any[]>(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (!typeGuard.isArray(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected an array'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a finite non-NaN number; uses `typeGuard.isNumber`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function number(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is number {\n if (!typeGuard.isNumber(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a finite number'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a boolean; uses `typeGuard.isBoolean`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function boolean(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is boolean {\n if (!typeGuard.isBoolean(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a boolean'),\n );\n }\n}\n\n/**\n * Throws when `value` is not a symbol; uses `typeGuard.isSymbol`.\n *\n * @param value Value to narrow.\n * @param message Optional message or lazy message factory.\n */\nexport function symbol(\n value: unknown,\n message?: MaybeFn<string>,\n): asserts value is symbol {\n if (!typeGuard.isSymbol(value)) {\n throw new AssertionError(\n resolveAssertMessage(message, 'Expected a symbol'),\n );\n }\n}\n\n/**\n * Always throws; use for branches that must be impossible or as a typed “abort”.\n *\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * function parse(kind: \"a\" | \"b\") {\n * if (kind === \"a\") return 1;\n * if (kind === \"b\") return 2;\n * assert.fail(\"unreachable\");\n * }\n * ```\n */\nexport function fail(message?: MaybeFn<string>): never {\n throw new AssertionError(resolveAssertMessage(message, 'Unreachable'));\n}\n\n/**\n * Exhaustiveness helper: call with a `never` value when all union cases are handled.\n *\n * @param value Should be `never` when the type checker is satisfied.\n * @param message Optional message (this path always throws, so a lazy factory is unnecessary).\n */\nexport function unreachable(value: never, message?: string): never {\n throw new AssertionError(\n resolveAssertMessage(message, `Unexpected value: ${String(value)}`),\n );\n}\n\n/**\n * Alias for {@link unreachable} (common name in switch exhaustiveness snippets).\n */\nexport { unreachable as never };\n\n/**\n * Throws when `value` is not an instance of `ctor`.\n *\n * @param value Value to check.\n * @param ctor Constructor used with `instanceof`.\n * @param message Optional message or lazy message factory.\n *\n * @example\n * ```ts\n * assert.instanceOf(el, HTMLElement, \"expected a DOM element\");\n * ```\n */\nexport function instanceOf<T>(\n value: unknown,\n ctor: abstract new (...args: never[]) => T,\n message?: MaybeFn<string>,\n): asserts value is T {\n if (!(value instanceof ctor)) {\n throw new AssertionError(\n resolveAssertMessage(message, `Expected instance of ${ctor.name}`),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,iBAAb,cAAoC,MAAM;CACxC,OAAgB;;AAGlB,SAAS,qBACP,SACA,UACQ;AACR,KAAI,YAAY,KAAA,EACd,QAAO;AAET,QAAO,aAAa,QAAQ;;;;;;;;;;;;;AAc9B,SAAgB,GACd,WACA,SACmB;AACnB,KAAI,UAAU,QAAQ,UAAU,CAC9B,OAAM,IAAI,eAAe,qBAAqB,SAAS,mBAAmB,CAAC;;;;;AAO/E,IAAa,YAAuB;;;;;;;;;;;;AAapC,SAAgB,QACd,OACA,SACiC;AACjC,KAAI,CAAC,UAAU,UAAU,MAAM,CAC7B,OAAM,IAAI,eACR,qBAAqB,SAAS,2BAA2B,CAC1D;;;;;;;;AAUL,SAAgB,QACd,OACA,SACoB;AACpB,KAAI,UAAU,OAAO,MAAM,CACzB,OAAM,IAAI,eACR,qBAAqB,SAAS,4BAA4B,CAC3D;;;;;;;;AAUL,SAAgB,aACd,OACA,SACoB;AACpB,KAAI,UAAU,YAAY,MAAM,CAC9B,OAAM,IAAI,eACR,qBAAqB,SAAS,2BAA2B,CAC1D;;;;;;;;AAUL,SAAgB,OACd,OACA,SACyB;AACzB,KAAI,CAAC,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,oBAAoB,CACnD;;;;;;;;AAUL,SAAgB,OACd,OACA,SACoB;AACpB,KAAI,CAAC,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,qBAAqB,CACpD;;;;;;;;AAUL,SAAgB,MACd,OACA,SACoB;AACpB,KAAI,CAAC,UAAU,QAAQ,MAAM,CAC3B,OAAM,IAAI,eACR,qBAAqB,SAAS,oBAAoB,CACnD;;;;;;;;AAUL,SAAgB,OACd,OACA,SACyB;AACzB,KAAI,CAAC,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,2BAA2B,CAC1D;;;;;;;;AAUL,SAAgB,QACd,OACA,SAC0B;AAC1B,KAAI,CAAC,UAAU,UAAU,MAAM,CAC7B,OAAM,IAAI,eACR,qBAAqB,SAAS,qBAAqB,CACpD;;;;;;;;AAUL,SAAgB,OACd,OACA,SACyB;AACzB,KAAI,CAAC,UAAU,SAAS,MAAM,CAC5B,OAAM,IAAI,eACR,qBAAqB,SAAS,oBAAoB,CACnD;;;;;;;;;;;;;;;;AAkBL,SAAgB,KAAK,SAAkC;AACrD,OAAM,IAAI,eAAe,qBAAqB,SAAS,cAAc,CAAC;;;;;;;;AASxE,SAAgB,YAAY,OAAc,SAAyB;AACjE,OAAM,IAAI,eACR,qBAAqB,SAAS,qBAAqB,OAAO,MAAM,GAAG,CACpE;;;;;;;;;;;;;;AAoBH,SAAgB,WACd,OACA,MACA,SACoB;AACpB,KAAI,EAAE,iBAAiB,MACrB,OAAM,IAAI,eACR,qBAAqB,SAAS,wBAAwB,KAAK,OAAO,CACnE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yummies",
3
- "version": "7.16.2",
3
+ "version": "7.17.0",
4
4
  "keywords": [
5
5
  "javascript",
6
6
  "typescript",