@thisisagile/easy-test 15.26.2 → 15.27.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.
Files changed (121) hide show
  1. package/dist/chunk-6EKWTLNQ.mjs +12 -0
  2. package/dist/chunk-6EKWTLNQ.mjs.map +1 -0
  3. package/dist/chunk-KAVJOG5T.mjs +39 -0
  4. package/dist/chunk-KAVJOG5T.mjs.map +1 -0
  5. package/dist/chunk-LN24S2PC.mjs +41 -0
  6. package/dist/chunk-LN24S2PC.mjs.map +1 -0
  7. package/dist/chunk-O475TEG2.mjs +30 -0
  8. package/dist/chunk-O475TEG2.mjs.map +1 -0
  9. package/dist/chunk-QE3TR4BY.mjs +16 -0
  10. package/dist/chunk-QE3TR4BY.mjs.map +1 -0
  11. package/dist/chunk-Z4XAP66Q.mjs +44 -0
  12. package/dist/chunk-Z4XAP66Q.mjs.map +1 -0
  13. package/dist/index.js +590 -5
  14. package/dist/index.js.map +1 -1
  15. package/dist/matchers/Check.mjs +5 -34
  16. package/dist/matchers/Check.mjs.map +1 -1
  17. package/dist/matchers/HttpMatchers.mjs +19 -13
  18. package/dist/matchers/HttpMatchers.mjs.map +1 -1
  19. package/dist/matchers/Match.mjs +6 -29
  20. package/dist/matchers/Match.mjs.map +1 -1
  21. package/dist/matchers/ResultMatchers.mjs +14 -8
  22. package/dist/matchers/ResultMatchers.mjs.map +1 -1
  23. package/dist/matchers/toBeArrayOf.mjs +8 -2
  24. package/dist/matchers/toBeArrayOf.mjs.map +1 -1
  25. package/dist/matchers/toBeArrayOfWithLength.mjs +8 -2
  26. package/dist/matchers/toBeArrayOfWithLength.mjs.map +1 -1
  27. package/dist/matchers/toBeAt.mjs +8 -2
  28. package/dist/matchers/toBeAt.mjs.map +1 -1
  29. package/dist/matchers/toBeExactlyAt.mjs +11 -4
  30. package/dist/matchers/toBeExactlyAt.mjs.map +1 -1
  31. package/dist/matchers/toBeQueriedWith.mjs +8 -2
  32. package/dist/matchers/toBeQueriedWith.mjs.map +1 -1
  33. package/dist/matchers/toBeRoutedTo.mjs +14 -5
  34. package/dist/matchers/toBeRoutedTo.mjs.map +1 -1
  35. package/dist/matchers/toBeValid.mjs +10 -3
  36. package/dist/matchers/toBeValid.mjs.map +1 -1
  37. package/dist/matchers/toFailMatcher.mjs +13 -6
  38. package/dist/matchers/toFailMatcher.mjs.map +1 -1
  39. package/dist/matchers/toMatchArray.mjs +6 -1
  40. package/dist/matchers/toMatchArray.mjs.map +1 -1
  41. package/dist/matchers/toMatchExactJson.mjs +12 -4
  42. package/dist/matchers/toMatchExactJson.mjs.map +1 -1
  43. package/dist/matchers/toMatchException.mjs +10 -3
  44. package/dist/matchers/toMatchException.mjs.map +1 -1
  45. package/dist/matchers/toMatchJson.mjs +14 -5
  46. package/dist/matchers/toMatchJson.mjs.map +1 -1
  47. package/dist/matchers/toMatchRoute.mjs +10 -3
  48. package/dist/matchers/toMatchRoute.mjs.map +1 -1
  49. package/dist/matchers/toMatchText.mjs +10 -3
  50. package/dist/matchers/toMatchText.mjs.map +1 -1
  51. package/dist/matchers/toPassMatcher.mjs +13 -6
  52. package/dist/matchers/toPassMatcher.mjs.map +1 -1
  53. package/dist/mock/Fits.mjs +17 -9
  54. package/dist/mock/Fits.mjs.map +1 -1
  55. package/dist/mock/Mocks.mjs +9 -4
  56. package/dist/mock/Mocks.mjs.map +1 -1
  57. package/dist/utils/Eq.mjs +4 -7
  58. package/dist/utils/Eq.mjs.map +1 -1
  59. package/dist/utils/Req.mjs +4 -29
  60. package/dist/utils/Req.mjs.map +1 -1
  61. package/dist/utils/Types.mjs +4 -2
  62. package/dist/utils/Types.mjs.map +1 -1
  63. package/dist/utils/Utils.mjs +13 -14
  64. package/dist/utils/Utils.mjs.map +1 -1
  65. package/package.json +3 -2
  66. package/dist/matchers/Check.js +0 -64
  67. package/dist/matchers/Check.js.map +0 -1
  68. package/dist/matchers/HttpMatchers.js +0 -89
  69. package/dist/matchers/HttpMatchers.js.map +0 -1
  70. package/dist/matchers/Match.js +0 -59
  71. package/dist/matchers/Match.js.map +0 -1
  72. package/dist/matchers/ResultMatchers.js +0 -51
  73. package/dist/matchers/ResultMatchers.js.map +0 -1
  74. package/dist/matchers/index.js +0 -59
  75. package/dist/matchers/index.js.map +0 -1
  76. package/dist/matchers/toBeArrayOf.js +0 -33
  77. package/dist/matchers/toBeArrayOf.js.map +0 -1
  78. package/dist/matchers/toBeArrayOfWithLength.js +0 -36
  79. package/dist/matchers/toBeArrayOfWithLength.js.map +0 -1
  80. package/dist/matchers/toBeAt.js +0 -44
  81. package/dist/matchers/toBeAt.js.map +0 -1
  82. package/dist/matchers/toBeExactlyAt.js +0 -43
  83. package/dist/matchers/toBeExactlyAt.js.map +0 -1
  84. package/dist/matchers/toBeQueriedWith.js +0 -36
  85. package/dist/matchers/toBeQueriedWith.js.map +0 -1
  86. package/dist/matchers/toBeRoutedTo.js +0 -49
  87. package/dist/matchers/toBeRoutedTo.js.map +0 -1
  88. package/dist/matchers/toBeValid.js +0 -34
  89. package/dist/matchers/toBeValid.js.map +0 -1
  90. package/dist/matchers/toFailMatcher.js +0 -59
  91. package/dist/matchers/toFailMatcher.js.map +0 -1
  92. package/dist/matchers/toMatchArray.js +0 -38
  93. package/dist/matchers/toMatchArray.js.map +0 -1
  94. package/dist/matchers/toMatchExactJson.js +0 -42
  95. package/dist/matchers/toMatchExactJson.js.map +0 -1
  96. package/dist/matchers/toMatchException.js +0 -43
  97. package/dist/matchers/toMatchException.js.map +0 -1
  98. package/dist/matchers/toMatchJson.js +0 -43
  99. package/dist/matchers/toMatchJson.js.map +0 -1
  100. package/dist/matchers/toMatchRoute.js +0 -37
  101. package/dist/matchers/toMatchRoute.js.map +0 -1
  102. package/dist/matchers/toMatchText.js +0 -37
  103. package/dist/matchers/toMatchText.js.map +0 -1
  104. package/dist/matchers/toPassMatcher.js +0 -59
  105. package/dist/matchers/toPassMatcher.js.map +0 -1
  106. package/dist/mock/Fits.js +0 -71
  107. package/dist/mock/Fits.js.map +0 -1
  108. package/dist/mock/Mocks.js +0 -98
  109. package/dist/mock/Mocks.js.map +0 -1
  110. package/dist/mock/index.js +0 -25
  111. package/dist/mock/index.js.map +0 -1
  112. package/dist/utils/Eq.js +0 -35
  113. package/dist/utils/Eq.js.map +0 -1
  114. package/dist/utils/Req.js +0 -57
  115. package/dist/utils/Req.js.map +0 -1
  116. package/dist/utils/Response.js +0 -17
  117. package/dist/utils/Response.js.map +0 -1
  118. package/dist/utils/Types.js +0 -30
  119. package/dist/utils/Types.js.map +0 -1
  120. package/dist/utils/Utils.js +0 -62
  121. package/dist/utils/Utils.js.map +0 -1
package/dist/utils/Eq.js DELETED
@@ -1,35 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var Eq_exports = {};
20
- __export(Eq_exports, {
21
- eq: () => eq
22
- });
23
- module.exports = __toCommonJS(Eq_exports);
24
- var import_Utils = require("./Utils");
25
- var import_expect_utils = require("@jest/expect-utils");
26
- const eq = {
27
- exact: (a, b) => (0, import_expect_utils.equals)(a, b, []),
28
- subset: (a, b) => (0, import_expect_utils.equals)(a, b, [import_expect_utils.iterableEquality, import_expect_utils.subsetEquality]),
29
- string: (a, b) => (0, import_Utils.asString)(a) === (0, import_Utils.asString)(b)
30
- };
31
- // Annotate the CommonJS export names for ESM import in node:
32
- 0 && (module.exports = {
33
- eq
34
- });
35
- //# sourceMappingURL=Eq.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/Eq.ts"],"sourcesContent":["import { asString } from './Utils';\nimport { equals, iterableEquality, subsetEquality } from '@jest/expect-utils';\n\nexport const eq = {\n exact: (a?: unknown, b?: unknown): boolean => equals(a, b, []),\n subset: (a?: unknown, b?: unknown): boolean => equals(a, b, [iterableEquality, subsetEquality]),\n string: (a?: unknown, b?: unknown): boolean => asString(a) === asString(b),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAyB;AACzB,0BAAyD;AAElD,MAAM,KAAK;AAAA,EAChB,OAAO,CAAC,GAAa,UAAyB,4BAAO,GAAG,GAAG,CAAC,CAAC;AAAA,EAC7D,QAAQ,CAAC,GAAa,UAAyB,4BAAO,GAAG,GAAG,CAAC,sCAAkB,kCAAc,CAAC;AAAA,EAC9F,QAAQ,CAAC,GAAa,UAAyB,uBAAS,CAAC,UAAM,uBAAS,CAAC;AAC3E;","names":[]}
package/dist/utils/Req.js DELETED
@@ -1,57 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var Req_exports = {};
20
- __export(Req_exports, {
21
- Req: () => Req
22
- });
23
- module.exports = __toCommonJS(Req_exports);
24
- var import_Utils = require("./Utils");
25
- class Req {
26
- constructor(state = {}) {
27
- this.state = state;
28
- this.skip = (0, import_Utils.isDefined)(this.query?.skip) ? (0, import_Utils.asNumber)(this.query?.skip) : void 0;
29
- this.take = (0, import_Utils.isDefined)(this.query?.take) ? (0, import_Utils.asNumber)(this.query?.take) : void 0;
30
- }
31
- skip;
32
- take;
33
- get id() {
34
- return this.state.id ?? this.path.id;
35
- }
36
- get q() {
37
- return this.state.q ?? this.query.q;
38
- }
39
- get path() {
40
- return this.state?.path ?? {};
41
- }
42
- get query() {
43
- return this.state?.query ?? {};
44
- }
45
- get body() {
46
- return this.state.body;
47
- }
48
- get headers() {
49
- return this.state.headers;
50
- }
51
- get = (key) => this?.state[key.toString()] ?? this.path[key.toString()] ?? this.query[key.toString()];
52
- }
53
- // Annotate the CommonJS export names for ESM import in node:
54
- 0 && (module.exports = {
55
- Req
56
- });
57
- //# sourceMappingURL=Req.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/Req.ts"],"sourcesContent":["import { asNumber, isDefined } from './Utils';\nimport { Id, Json, JsonValue, OneOrMore, Text } from './Types';\n\nexport class Req {\n readonly skip: number | undefined;\n readonly take: number | undefined;\n constructor(readonly state: any = {}) {\n this.skip = isDefined(this.query?.skip) ? asNumber(this.query?.skip) : undefined;\n this.take = isDefined(this.query?.take) ? asNumber(this.query?.take) : undefined;\n }\n\n get id(): Id {\n return this.state.id ?? this.path.id;\n }\n\n get q(): JsonValue {\n return this.state.q ?? this.query.q;\n }\n\n get path(): Json {\n return this.state?.path ?? {};\n }\n\n get query(): Json {\n return this.state?.query ?? {};\n }\n\n get body(): unknown {\n return this.state.body;\n }\n\n get headers(): Record<string, OneOrMore<string>> {\n return this.state.headers;\n }\n\n get = (key: Text): any => this?.state[key.toString()] ?? this.path[key.toString()] ?? this.query[key.toString()];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAoC;AAG7B,MAAM,IAAI;AAAA,EAGf,YAAqB,QAAa,CAAC,GAAG;AAAjB;AACnB,SAAK,WAAO,wBAAU,KAAK,OAAO,IAAI,QAAI,uBAAS,KAAK,OAAO,IAAI,IAAI;AACvE,SAAK,WAAO,wBAAU,KAAK,OAAO,IAAI,QAAI,uBAAS,KAAK,OAAO,IAAI,IAAI;AAAA,EACzE;AAAA,EALS;AAAA,EACA;AAAA,EAMT,IAAI,KAAS;AACX,WAAO,KAAK,MAAM,MAAM,KAAK,KAAK;AAAA,EACpC;AAAA,EAEA,IAAI,IAAe;AACjB,WAAO,KAAK,MAAM,KAAK,KAAK,MAAM;AAAA,EACpC;AAAA,EAEA,IAAI,OAAa;AACf,WAAO,KAAK,OAAO,QAAQ,CAAC;AAAA,EAC9B;AAAA,EAEA,IAAI,QAAc;AAChB,WAAO,KAAK,OAAO,SAAS,CAAC;AAAA,EAC/B;AAAA,EAEA,IAAI,OAAgB;AAClB,WAAO,KAAK,MAAM;AAAA,EACpB;AAAA,EAEA,IAAI,UAA6C;AAC/C,WAAO,KAAK,MAAM;AAAA,EACpB;AAAA,EAEA,MAAM,CAAC,QAAmB,MAAM,MAAM,IAAI,SAAS,CAAC,KAAK,KAAK,KAAK,IAAI,SAAS,CAAC,KAAK,KAAK,MAAM,IAAI,SAAS,CAAC;AACjH;","names":[]}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var Response_exports = {};
16
- module.exports = __toCommonJS(Response_exports);
17
- //# sourceMappingURL=Response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/Response.ts"],"sourcesContent":["import { Id } from './Types';\n\nexport type HttpStatus = { name: string; id: Id };\n\nexport type RestResult = {\n data?: { code: number; items: unknown[]; itemCount: number };\n error?: { code: number; message: string; errorCount: number; errors: unknown[] };\n};\n\nexport type Response = { status: HttpStatus; headers?: { [key: string]: any }; body?: RestResult };\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var Types_exports = {};
20
- __export(Types_exports, {
21
- toMessage: () => toMessage
22
- });
23
- module.exports = __toCommonJS(Types_exports);
24
- var import_Utils = require("./Utils");
25
- const toMessage = (g, ...params) => (0, import_Utils.asString)((0, import_Utils.isFunction)(g) ? g(...params) : g);
26
- // Annotate the CommonJS export names for ESM import in node:
27
- 0 && (module.exports = {
28
- toMessage
29
- });
30
- //# sourceMappingURL=Types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/Types.ts"],"sourcesContent":["import { asString, isFunction } from './Utils';\n\nexport type OneOrMore<T> = T | Array<T>;\n\nexport type ArrayLike<T> = OneOrMore<T>[];\n\nexport type Constructor<T> = { new (...args: any[]): T };\n\nexport type Message<P> = Text | ((...params: P[]) => Text);\n\nexport const toMessage = <P>(g: Message<P>, ...params: P[]): string => asString(isFunction(g) ? g(...params) : g);\n\nexport type Validatable = { isValid: boolean };\n\nexport type Result = { domain?: string; location?: string; message: string };\n\nexport type Results = Validatable & { results: Result[] };\n\nexport type Uri = Text;\n\nexport type Id = string | number;\n\nexport type JsonValue = string | number | boolean | null | Json | JsonValue[];\n\nexport type Json = { [key: string]: JsonValue };\n\nexport type Exception = { id: Id; reason?: string };\n\nexport type Text = { toString: () => string };\n\nexport type Query = Text;\n\nexport type UseCase = { app: { id: Text }; id: Text };\n\nexport type Tester = { url: string };\n\nexport type CreateMutable<T> = { -readonly [P in keyof T]: T[P] };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAqC;AAU9B,MAAM,YAAY,CAAI,MAAkB,eAAwB,2BAAS,yBAAW,CAAC,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC;","names":[]}
@@ -1,62 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var Utils_exports = {};
20
- __export(Utils_exports, {
21
- asJson: () => asJson,
22
- asNumber: () => asNumber,
23
- asString: () => asString,
24
- isA: () => isA,
25
- isAn: () => isAn,
26
- isArray: () => isArray,
27
- isDefined: () => isDefined,
28
- isFunction: () => isFunction,
29
- isNumber: () => isNumber,
30
- isObject: () => isObject,
31
- toArray: () => toArray
32
- });
33
- module.exports = __toCommonJS(Utils_exports);
34
- const isDefined = (o) => o !== void 0 && o !== null;
35
- const isNumber = (o) => isDefined(o) && typeof o === "number" && !Number.isNaN(o);
36
- const isFunction = (o) => isDefined(o) && typeof o === "function";
37
- const isA = (t, ...properties) => isDefined(t) && properties.every((p) => isDefined(t[p]));
38
- const isAn = isA;
39
- const isArray = (o) => isDefined(o) && o instanceof Array;
40
- const isObject = (o) => o != null && (typeof o === "object" || typeof o === "function") && !isArray(o);
41
- const asJson = (a) => a?.toJSON ? a.toJSON() : isObject(a) ? a : void 0;
42
- const asString = (a) => a?.toString();
43
- const asNumber = (num, alt) => {
44
- const n = parseInt(asString(num));
45
- return isNumber(n) ? n : isFunction(alt) ? alt() : isNumber(alt) ? alt : NaN;
46
- };
47
- const toArray = (...items) => items.length > 1 ? items : isArray(items[0]) ? items[0] : isDefined(items[0]) ? [items[0]] : [];
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
50
- asJson,
51
- asNumber,
52
- asString,
53
- isA,
54
- isAn,
55
- isArray,
56
- isDefined,
57
- isFunction,
58
- isNumber,
59
- isObject,
60
- toArray
61
- });
62
- //# sourceMappingURL=Utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/Utils.ts"],"sourcesContent":["import { ArrayLike } from './Types';\n\nexport const isDefined = <T = unknown>(o?: T): boolean => o !== undefined && o !== null;\n\nexport const isNumber = (o?: unknown): o is number => isDefined(o) && typeof o === 'number' && !Number.isNaN(o);\nexport const isFunction = (o?: unknown): o is (...params: unknown[]) => unknown => isDefined(o) && typeof o === 'function';\n\nexport const isA = <T>(t?: unknown, ...properties: (keyof T)[]): t is T => isDefined(t) && properties.every(p => isDefined((t as T)[p]));\nexport const isAn = isA;\n\nexport const isArray = <T = any>(o?: unknown): o is Array<T> => isDefined(o) && o instanceof Array;\nexport const isObject = (o?: unknown): o is Record<string, unknown> => o != null && (typeof o === 'object' || typeof o === 'function') && !isArray(o);\n\nexport const asJson = (a?: unknown): any => ((a as any)?.toJSON ? (a as any).toJSON() : isObject(a) ? a : undefined);\nexport const asString = (a?: unknown): string => (a as any)?.toString();\n\nexport const asNumber = (num: unknown, alt?: number | (() => number)): number => {\n const n = parseInt(asString(num));\n return isNumber(n) ? n : isFunction(alt) ? alt() : isNumber(alt) ? alt : NaN;\n};\n\nexport const toArray = <T>(...items: ArrayLike<T>): T[] =>\n items.length > 1 ? (items as T[]) : isArray(items[0]) ? items[0] : isDefined(items[0]) ? [items[0]] : [];\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,YAAY,CAAc,MAAmB,MAAM,UAAa,MAAM;AAE5E,MAAM,WAAW,CAAC,MAA6B,UAAU,CAAC,KAAK,OAAO,MAAM,YAAY,CAAC,OAAO,MAAM,CAAC;AACvG,MAAM,aAAa,CAAC,MAAwD,UAAU,CAAC,KAAK,OAAO,MAAM;AAEzG,MAAM,MAAM,CAAI,MAAgB,eAAoC,UAAU,CAAC,KAAK,WAAW,MAAM,OAAK,UAAW,EAAQ,CAAC,CAAC,CAAC;AAChI,MAAM,OAAO;AAEb,MAAM,UAAU,CAAU,MAA+B,UAAU,CAAC,KAAK,aAAa;AACtF,MAAM,WAAW,CAAC,MAA8C,KAAK,SAAS,OAAO,MAAM,YAAY,OAAO,MAAM,eAAe,CAAC,QAAQ,CAAC;AAE7I,MAAM,SAAS,CAAC,MAAuB,GAAW,SAAU,EAAU,OAAO,IAAI,SAAS,CAAC,IAAI,IAAI;AACnG,MAAM,WAAW,CAAC,MAAyB,GAAW,SAAS;AAE/D,MAAM,WAAW,CAAC,KAAc,QAA0C;AAC/E,QAAM,IAAI,SAAS,SAAS,GAAG,CAAC;AAChC,SAAO,SAAS,CAAC,IAAI,IAAI,WAAW,GAAG,IAAI,IAAI,IAAI,SAAS,GAAG,IAAI,MAAM;AAC3E;AAEO,MAAM,UAAU,IAAO,UAC5B,MAAM,SAAS,IAAK,QAAgB,QAAQ,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,UAAU,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;","names":[]}