@temboplus/afloat 0.1.60 → 0.1.61

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 (157) hide show
  1. package/package.json +2 -3
  2. package/esm/_dnt.test_shims.d.ts.map +0 -1
  3. package/esm/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
  4. package/esm/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
  5. package/esm/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
  6. package/esm/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
  7. package/esm/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
  8. package/esm/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
  9. package/esm/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
  10. package/esm/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
  11. package/esm/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
  12. package/esm/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
  13. package/esm/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
  14. package/esm/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
  15. package/esm/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
  16. package/esm/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
  17. package/esm/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
  18. package/esm/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
  19. package/esm/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
  20. package/esm/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
  21. package/esm/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
  22. package/esm/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
  23. package/esm/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
  24. package/esm/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
  25. package/esm/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
  26. package/esm/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
  27. package/esm/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
  28. package/esm/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
  29. package/esm/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
  30. package/esm/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
  31. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  32. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  33. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  34. package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  35. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  36. package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  37. package/esm/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
  38. package/esm/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
  39. package/esm/src/models/contact/validation.test.d.ts.map +0 -1
  40. package/esm/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
  41. package/script/npm/src/_dnt.test_shims.d.ts +0 -6
  42. package/script/npm/src/_dnt.test_shims.d.ts.map +0 -1
  43. package/script/npm/src/_dnt.test_shims.js +0 -65
  44. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts +0 -29
  45. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
  46. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.js +0 -49
  47. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts +0 -24
  48. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
  49. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.js +0 -49
  50. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.d.ts +0 -16
  51. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
  52. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.js +0 -25
  53. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts +0 -26
  54. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
  55. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.js +0 -34
  56. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.d.ts +0 -17
  57. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
  58. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.js +0 -209
  59. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.d.ts +0 -35
  60. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
  61. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.js +0 -61
  62. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.d.ts +0 -18
  63. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
  64. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.js +0 -30
  65. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.d.ts +0 -15
  66. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
  67. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.js +0 -23
  68. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.d.ts +0 -18
  69. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
  70. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.js +0 -25
  71. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.d.ts +0 -20
  72. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
  73. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.js +0 -32
  74. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts +0 -20
  75. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
  76. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.js +0 -32
  77. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts +0 -23
  78. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
  79. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.js +0 -55
  80. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts +0 -25
  81. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
  82. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.js +0 -56
  83. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.d.ts +0 -19
  84. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
  85. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.js +0 -31
  86. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts +0 -20
  87. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
  88. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.js +0 -32
  89. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.d.ts +0 -18
  90. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
  91. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.js +0 -29
  92. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.d.ts +0 -44
  93. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
  94. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.js +0 -61
  95. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts +0 -21
  96. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
  97. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.js +0 -36
  98. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts +0 -20
  99. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
  100. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.js +0 -32
  101. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts +0 -18
  102. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
  103. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.js +0 -29
  104. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts +0 -23
  105. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
  106. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.js +0 -35
  107. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts +0 -29
  108. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
  109. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.js +0 -163
  110. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts +0 -42
  111. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
  112. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.js +0 -56
  113. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts +0 -24
  114. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
  115. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.js +0 -60
  116. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts +0 -18
  117. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
  118. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.js +0 -29
  119. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.d.ts +0 -45
  120. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
  121. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.js +0 -47
  122. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts +0 -15
  123. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
  124. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.js +0 -23
  125. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts +0 -15
  126. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
  127. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.js +0 -23
  128. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
  129. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  130. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -115
  131. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +0 -140
  132. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  133. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -283
  134. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +0 -99
  135. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  136. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -185
  137. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
  138. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  139. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.js +0 -63
  140. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +0 -159
  141. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  142. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -242
  143. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
  144. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  145. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
  146. package/script/npm/src/src/models/contact/derivatives/contact.test.d.ts +0 -1
  147. package/script/npm/src/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
  148. package/script/npm/src/src/models/contact/derivatives/contact.test.js +0 -64
  149. package/script/npm/src/src/models/contact/derivatives/contact_info.test.d.ts +0 -1
  150. package/script/npm/src/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
  151. package/script/npm/src/src/models/contact/derivatives/contact_info.test.js +0 -331
  152. package/script/npm/src/src/models/contact/validation.test.d.ts +0 -2
  153. package/script/npm/src/src/models/contact/validation.test.d.ts.map +0 -1
  154. package/script/npm/src/src/models/contact/validation.test.js +0 -186
  155. package/script/npm/src/src/models/payout/derivatives/payout.test.d.ts +0 -1
  156. package/script/npm/src/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
  157. package/script/npm/src/src/models/payout/derivatives/payout.test.js +0 -76
@@ -1,209 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.equal = equal;
27
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
28
- // This module is browser compatible.
29
- const dntShim = __importStar(require("../../../../../_dnt.test_shims.js"));
30
- function isKeyedCollection(x) {
31
- return x instanceof Set || x instanceof Map;
32
- }
33
- function prototypesEqual(a, b) {
34
- const pa = Object.getPrototypeOf(a);
35
- const pb = Object.getPrototypeOf(b);
36
- return pa === pb ||
37
- pa === Object.prototype && pb === null ||
38
- pa === null && pb === Object.prototype;
39
- }
40
- function isBasicObjectOrArray(obj) {
41
- const proto = Object.getPrototypeOf(obj);
42
- return proto === null || proto === Object.prototype ||
43
- proto === Array.prototype;
44
- }
45
- // Slightly faster than Reflect.ownKeys in V8 as of 12.9.202.13-rusty (2024-10-28)
46
- function ownKeys(obj) {
47
- return [
48
- ...Object.getOwnPropertyNames(obj),
49
- ...Object.getOwnPropertySymbols(obj),
50
- ];
51
- }
52
- function getKeysDeep(obj) {
53
- const keys = new Set();
54
- while (obj !== Object.prototype && obj !== Array.prototype && obj != null) {
55
- for (const key of ownKeys(obj)) {
56
- keys.add(key);
57
- }
58
- obj = Object.getPrototypeOf(obj);
59
- }
60
- return keys;
61
- }
62
- // deno-lint-ignore no-explicit-any
63
- const Temporal = dntShim.dntGlobalThis.Temporal ??
64
- new Proxy({}, { get: () => { } });
65
- /** A non-exhaustive list of prototypes that can be accurately fast-path compared with `String(instance)` */
66
- const stringComparablePrototypes = new Set([
67
- Intl.Locale,
68
- RegExp,
69
- Temporal.Duration,
70
- Temporal.Instant,
71
- Temporal.PlainDate,
72
- Temporal.PlainDateTime,
73
- Temporal.PlainTime,
74
- Temporal.PlainYearMonth,
75
- Temporal.PlainMonthDay,
76
- Temporal.ZonedDateTime,
77
- URL,
78
- URLSearchParams,
79
- ].filter((x) => x != null).map((x) => x.prototype));
80
- function isPrimitive(x) {
81
- return typeof x === "string" ||
82
- typeof x === "number" ||
83
- typeof x === "boolean" ||
84
- typeof x === "bigint" ||
85
- typeof x === "symbol" ||
86
- x == null;
87
- }
88
- const TypedArray = Object.getPrototypeOf(Uint8Array);
89
- function compareTypedArrays(a, b) {
90
- if (a.length !== b.length)
91
- return false;
92
- for (let i = 0; i < b.length; i++) {
93
- if (!sameValueZero(a[i], b[i]))
94
- return false;
95
- }
96
- return true;
97
- }
98
- /** Check both strict equality (`0 == -0`) and `Object.is` (`NaN == NaN`) */
99
- function sameValueZero(a, b) {
100
- return a === b || Object.is(a, b);
101
- }
102
- /**
103
- * Deep equality comparison used in assertions.
104
- *
105
- * @param a The actual value
106
- * @param b The expected value
107
- * @returns `true` if the values are deeply equal, `false` otherwise
108
- *
109
- * @example Usage
110
- * ```ts
111
- * import { equal } from "@std/assert/equal";
112
- *
113
- * equal({ foo: "bar" }, { foo: "bar" }); // Returns `true`
114
- * equal({ foo: "bar" }, { foo: "baz" }); // Returns `false`
115
- * ```
116
- */
117
- function equal(a, b) {
118
- const seen = new Map();
119
- return (function compare(a, b) {
120
- if (sameValueZero(a, b))
121
- return true;
122
- if (isPrimitive(a) || isPrimitive(b))
123
- return false;
124
- if (a instanceof Date && b instanceof Date) {
125
- return Object.is(a.getTime(), b.getTime());
126
- }
127
- if (a && typeof a === "object" && b && typeof b === "object") {
128
- if (!prototypesEqual(a, b)) {
129
- return false;
130
- }
131
- if (a instanceof TypedArray) {
132
- return compareTypedArrays(a, b);
133
- }
134
- if (a instanceof WeakMap) {
135
- throw new TypeError("cannot compare WeakMap instances");
136
- }
137
- if (a instanceof WeakSet) {
138
- throw new TypeError("cannot compare WeakSet instances");
139
- }
140
- if (a instanceof WeakRef) {
141
- return compare(a.deref(), b.deref());
142
- }
143
- if (seen.get(a) === b) {
144
- return true;
145
- }
146
- if (Object.keys(a).length !== Object.keys(b).length) {
147
- return false;
148
- }
149
- seen.set(a, b);
150
- if (isKeyedCollection(a) && isKeyedCollection(b)) {
151
- if (a.size !== b.size) {
152
- return false;
153
- }
154
- const aKeys = [...a.keys()];
155
- const primitiveKeysFastPath = aKeys.every(isPrimitive);
156
- if (primitiveKeysFastPath) {
157
- if (a instanceof Set) {
158
- return a.symmetricDifference(b).size === 0;
159
- }
160
- for (const key of aKeys) {
161
- if (!b.has(key) ||
162
- !compare(a.get(key), b.get(key))) {
163
- return false;
164
- }
165
- }
166
- return true;
167
- }
168
- let unmatchedEntries = a.size;
169
- for (const [aKey, aValue] of a.entries()) {
170
- for (const [bKey, bValue] of b.entries()) {
171
- /* Given that Map keys can be references, we need
172
- * to ensure that they are also deeply equal */
173
- if (!compare(aKey, bKey))
174
- continue;
175
- if ((aKey === aValue && bKey === bValue) ||
176
- (compare(aValue, bValue))) {
177
- unmatchedEntries--;
178
- break;
179
- }
180
- }
181
- }
182
- return unmatchedEntries === 0;
183
- }
184
- let keys;
185
- if (isBasicObjectOrArray(a)) {
186
- // fast path
187
- keys = ownKeys({ ...a, ...b });
188
- }
189
- else if (stringComparablePrototypes.has(Object.getPrototypeOf(a))) {
190
- // medium path
191
- return String(a) === String(b);
192
- }
193
- else {
194
- // slow path
195
- keys = getKeysDeep(a).union(getKeysDeep(b));
196
- }
197
- for (const key of keys) {
198
- if (!compare(a[key], b[key])) {
199
- return false;
200
- }
201
- if (((key in a) && (!(key in b))) || ((key in b) && (!(key in a)))) {
202
- return false;
203
- }
204
- }
205
- return true;
206
- }
207
- return false;
208
- })(a, b);
209
- }
@@ -1,35 +0,0 @@
1
- /**
2
- * Make an assertion that `actual` and `expected` are equal, deeply. If not
3
- * deeply equal, then throw.
4
- *
5
- * Type parameter can be specified to ensure values under comparison have the
6
- * same type.
7
- *
8
- * Note: When comparing `Blob` objects, you should first convert them to
9
- * `Uint8Array` using the `Blob.bytes()` method and then compare their
10
- * contents.
11
- *
12
- * @example Usage
13
- * ```ts ignore
14
- * import { assertEquals } from "@std/assert";
15
- *
16
- * assertEquals("world", "world"); // Doesn't throw
17
- * assertEquals("hello", "world"); // Throws
18
- * ```
19
- * @example Compare `Blob` objects
20
- * ```ts ignore
21
- * import { assertEquals } from "@std/assert";
22
- *
23
- * const bytes1 = await new Blob(["foo"]).bytes();
24
- * const bytes2 = await new Blob(["foo"]).bytes();
25
- *
26
- * assertEquals(bytes1, bytes2);
27
- * ```
28
- *
29
- * @typeParam T The type of the values to compare. This is usually inferred.
30
- * @param actual The actual value to compare.
31
- * @param expected The expected value to compare.
32
- * @param msg The optional message to display if the assertion fails.
33
- */
34
- export declare function assertEquals<T>(actual: T, expected: T, msg?: string): void;
35
- //# sourceMappingURL=equals.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/equals.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAkBb"}
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertEquals = assertEquals;
4
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
5
- // This module is browser compatible.
6
- const equal_js_1 = require("./equal.js");
7
- const build_message_js_1 = require("../../internal/1.0.5/build_message.js");
8
- const diff_js_1 = require("../../internal/1.0.5/diff.js");
9
- const diff_str_js_1 = require("../../internal/1.0.5/diff_str.js");
10
- const format_js_1 = require("../../internal/1.0.5/format.js");
11
- const assertion_error_js_1 = require("./assertion_error.js");
12
- /**
13
- * Make an assertion that `actual` and `expected` are equal, deeply. If not
14
- * deeply equal, then throw.
15
- *
16
- * Type parameter can be specified to ensure values under comparison have the
17
- * same type.
18
- *
19
- * Note: When comparing `Blob` objects, you should first convert them to
20
- * `Uint8Array` using the `Blob.bytes()` method and then compare their
21
- * contents.
22
- *
23
- * @example Usage
24
- * ```ts ignore
25
- * import { assertEquals } from "@std/assert";
26
- *
27
- * assertEquals("world", "world"); // Doesn't throw
28
- * assertEquals("hello", "world"); // Throws
29
- * ```
30
- * @example Compare `Blob` objects
31
- * ```ts ignore
32
- * import { assertEquals } from "@std/assert";
33
- *
34
- * const bytes1 = await new Blob(["foo"]).bytes();
35
- * const bytes2 = await new Blob(["foo"]).bytes();
36
- *
37
- * assertEquals(bytes1, bytes2);
38
- * ```
39
- *
40
- * @typeParam T The type of the values to compare. This is usually inferred.
41
- * @param actual The actual value to compare.
42
- * @param expected The expected value to compare.
43
- * @param msg The optional message to display if the assertion fails.
44
- */
45
- function assertEquals(actual, expected, msg) {
46
- if ((0, equal_js_1.equal)(actual, expected)) {
47
- return;
48
- }
49
- const msgSuffix = msg ? `: ${msg}` : ".";
50
- let message = `Values are not equal${msgSuffix}`;
51
- const actualString = (0, format_js_1.format)(actual);
52
- const expectedString = (0, format_js_1.format)(expected);
53
- const stringDiff = (typeof actual === "string") &&
54
- (typeof expected === "string");
55
- const diffResult = stringDiff
56
- ? (0, diff_str_js_1.diffStr)(actual, expected)
57
- : (0, diff_js_1.diff)(actualString.split("\n"), expectedString.split("\n"));
58
- const diffMsg = (0, build_message_js_1.buildMessage)(diffResult, { stringDiff }).join("\n");
59
- message = `${message}\n${diffMsg}`;
60
- throw new assertion_error_js_1.AssertionError(message);
61
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Make an assertion that actual is not null or undefined.
3
- * If not then throw.
4
- *
5
- * @example Usage
6
- * ```ts ignore
7
- * import { assertExists } from "@std/assert";
8
- *
9
- * assertExists("something"); // Doesn't throw
10
- * assertExists(undefined); // Throws
11
- * ```
12
- *
13
- * @typeParam T The type of the actual value.
14
- * @param actual The actual value to check.
15
- * @param msg The optional message to include in the error if the assertion fails.
16
- */
17
- export declare function assertExists<T>(actual: T, msg?: string): asserts actual is NonNullable<T>;
18
- //# sourceMappingURL=exists.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exists.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/exists.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,CAOlC"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertExists = assertExists;
4
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
5
- // This module is browser compatible.
6
- const assertion_error_js_1 = require("./assertion_error.js");
7
- /**
8
- * Make an assertion that actual is not null or undefined.
9
- * If not then throw.
10
- *
11
- * @example Usage
12
- * ```ts ignore
13
- * import { assertExists } from "@std/assert";
14
- *
15
- * assertExists("something"); // Doesn't throw
16
- * assertExists(undefined); // Throws
17
- * ```
18
- *
19
- * @typeParam T The type of the actual value.
20
- * @param actual The actual value to check.
21
- * @param msg The optional message to include in the error if the assertion fails.
22
- */
23
- function assertExists(actual, msg) {
24
- if (actual === undefined || actual === null) {
25
- const msgSuffix = msg ? `: ${msg}` : ".";
26
- msg =
27
- `Expected actual: "${actual}" to not be null or undefined${msgSuffix}`;
28
- throw new assertion_error_js_1.AssertionError(msg);
29
- }
30
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * Forcefully throws a failed assertion.
3
- *
4
- * @example Usage
5
- * ```ts ignore
6
- * import { fail } from "@std/assert";
7
- *
8
- * fail("Deliberately failed!"); // Throws
9
- * ```
10
- *
11
- * @param msg Optional message to include in the error.
12
- * @returns Never returns, always throws.
13
- */
14
- export declare function fail(msg?: string): never;
15
- //# sourceMappingURL=fail.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fail.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/fail.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGxC"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fail = fail;
4
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
5
- // This module is browser compatible.
6
- const assertion_error_js_1 = require("./assertion_error.js");
7
- /**
8
- * Forcefully throws a failed assertion.
9
- *
10
- * @example Usage
11
- * ```ts ignore
12
- * import { fail } from "@std/assert";
13
- *
14
- * fail("Deliberately failed!"); // Throws
15
- * ```
16
- *
17
- * @param msg Optional message to include in the error.
18
- * @returns Never returns, always throws.
19
- */
20
- function fail(msg) {
21
- const msgSuffix = msg ? `: ${msg}` : ".";
22
- throw new assertion_error_js_1.AssertionError(`Failed assertion${msgSuffix}`);
23
- }
@@ -1,18 +0,0 @@
1
- /** Assertion condition for {@linkcode assertFalse}. */
2
- export type Falsy = false | 0 | 0n | "" | null | undefined;
3
- /**
4
- * Make an assertion, error will be thrown if `expr` have truthy value.
5
- *
6
- * @example Usage
7
- * ```ts ignore
8
- * import { assertFalse } from "@std/assert";
9
- *
10
- * assertFalse(false); // Doesn't throw
11
- * assertFalse(true); // Throws
12
- * ```
13
- *
14
- * @param expr The expression to test.
15
- * @param msg The optional message to display if the assertion fails.
16
- */
17
- export declare function assertFalse(expr: unknown, msg?: string): asserts expr is Falsy;
18
- //# sourceMappingURL=false.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"false.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/false.ts"],"names":[],"mappings":"AAIA,uDAAuD;AACvD,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAE3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,IAAI,KAAK,CAI1E"}
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertFalse = assertFalse;
4
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
5
- // This module is browser compatible.
6
- const assertion_error_js_1 = require("./assertion_error.js");
7
- /**
8
- * Make an assertion, error will be thrown if `expr` have truthy value.
9
- *
10
- * @example Usage
11
- * ```ts ignore
12
- * import { assertFalse } from "@std/assert";
13
- *
14
- * assertFalse(false); // Doesn't throw
15
- * assertFalse(true); // Throws
16
- * ```
17
- *
18
- * @param expr The expression to test.
19
- * @param msg The optional message to display if the assertion fails.
20
- */
21
- function assertFalse(expr, msg = "") {
22
- if (expr) {
23
- throw new assertion_error_js_1.AssertionError(msg);
24
- }
25
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Make an assertion that `actual` is greater than `expected`.
3
- * If not then throw.
4
- *
5
- * @example Usage
6
- * ```ts ignore
7
- * import { assertGreater } from "@std/assert";
8
- *
9
- * assertGreater(2, 1); // Doesn't throw
10
- * assertGreater(1, 1); // Throws
11
- * assertGreater(0, 1); // Throws
12
- * ```
13
- *
14
- * @typeParam T The type of the values to compare.
15
- * @param actual The actual value to compare.
16
- * @param expected The expected value to compare.
17
- * @param msg The optional message to display if the assertion fails.
18
- */
19
- export declare function assertGreater<T>(actual: T, expected: T, msg?: string): void;
20
- //# sourceMappingURL=greater.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"greater.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/greater.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAMpE"}
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertGreater = assertGreater;
4
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
5
- // This module is browser compatible.
6
- const format_js_1 = require("../../internal/1.0.5/format.js");
7
- const assertion_error_js_1 = require("./assertion_error.js");
8
- /**
9
- * Make an assertion that `actual` is greater than `expected`.
10
- * If not then throw.
11
- *
12
- * @example Usage
13
- * ```ts ignore
14
- * import { assertGreater } from "@std/assert";
15
- *
16
- * assertGreater(2, 1); // Doesn't throw
17
- * assertGreater(1, 1); // Throws
18
- * assertGreater(0, 1); // Throws
19
- * ```
20
- *
21
- * @typeParam T The type of the values to compare.
22
- * @param actual The actual value to compare.
23
- * @param expected The expected value to compare.
24
- * @param msg The optional message to display if the assertion fails.
25
- */
26
- function assertGreater(actual, expected, msg) {
27
- if (actual > expected)
28
- return;
29
- const actualString = (0, format_js_1.format)(actual);
30
- const expectedString = (0, format_js_1.format)(expected);
31
- throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} > ${expectedString}`);
32
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Make an assertion that `actual` is greater than or equal to `expected`.
3
- * If not then throw.
4
- *
5
- * @example Usage
6
- * ```ts ignore
7
- * import { assertGreaterOrEqual } from "@std/assert";
8
- *
9
- * assertGreaterOrEqual(2, 1); // Doesn't throw
10
- * assertGreaterOrEqual(1, 1); // Doesn't throw
11
- * assertGreaterOrEqual(0, 1); // Throws
12
- * ```
13
- *
14
- * @typeParam T The type of the values to compare.
15
- * @param actual The actual value to compare.
16
- * @param expected The expected value to compare.
17
- * @param msg The optional message to display if the assertion fails.
18
- */
19
- export declare function assertGreaterOrEqual<T>(actual: T, expected: T, msg?: string): void;
20
- //# sourceMappingURL=greater_or_equal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"greater_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QASb"}
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertGreaterOrEqual = assertGreaterOrEqual;
4
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
5
- // This module is browser compatible.
6
- const format_js_1 = require("../../internal/1.0.5/format.js");
7
- const assertion_error_js_1 = require("./assertion_error.js");
8
- /**
9
- * Make an assertion that `actual` is greater than or equal to `expected`.
10
- * If not then throw.
11
- *
12
- * @example Usage
13
- * ```ts ignore
14
- * import { assertGreaterOrEqual } from "@std/assert";
15
- *
16
- * assertGreaterOrEqual(2, 1); // Doesn't throw
17
- * assertGreaterOrEqual(1, 1); // Doesn't throw
18
- * assertGreaterOrEqual(0, 1); // Throws
19
- * ```
20
- *
21
- * @typeParam T The type of the values to compare.
22
- * @param actual The actual value to compare.
23
- * @param expected The expected value to compare.
24
- * @param msg The optional message to display if the assertion fails.
25
- */
26
- function assertGreaterOrEqual(actual, expected, msg) {
27
- if (actual >= expected)
28
- return;
29
- const actualString = (0, format_js_1.format)(actual);
30
- const expectedString = (0, format_js_1.format)(expected);
31
- throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} >= ${expectedString}`);
32
- }
@@ -1,23 +0,0 @@
1
- /** Any constructor */
2
- export type AnyConstructor = new (...args: any[]) => any;
3
- /** Gets constructor type */
4
- export type GetConstructorType<T extends AnyConstructor> = InstanceType<T>;
5
- /**
6
- * Make an assertion that `obj` is an instance of `type`.
7
- * If not then throw.
8
- *
9
- * @example Usage
10
- * ```ts ignore
11
- * import { assertInstanceOf } from "@std/assert";
12
- *
13
- * assertInstanceOf(new Date(), Date); // Doesn't throw
14
- * assertInstanceOf(new Date(), Number); // Throws
15
- * ```
16
- *
17
- * @typeParam T The expected type of the object.
18
- * @param actual The object to check.
19
- * @param expectedType The expected class constructor.
20
- * @param msg The optional message to display if the assertion fails.
21
- */
22
- export declare function assertInstanceOf<T extends abstract new (...args: any[]) => any>(actual: unknown, expectedType: T, msg?: string): asserts actual is InstanceType<T>;
23
- //# sourceMappingURL=instance_of.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"instance_of.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/instance_of.ts"],"names":[],"mappings":"AAIA,sBAAsB;AAEtB,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACzD,4BAA4B;AAC5B,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,cAAc,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAE9B,CAAC,SAAS,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAE9C,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,CAAC,EACf,GAAG,SAAK,GACP,OAAO,CAAC,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,CA6BnC"}
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertInstanceOf = assertInstanceOf;
4
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
5
- // This module is browser compatible.
6
- const assertion_error_js_1 = require("./assertion_error.js");
7
- /**
8
- * Make an assertion that `obj` is an instance of `type`.
9
- * If not then throw.
10
- *
11
- * @example Usage
12
- * ```ts ignore
13
- * import { assertInstanceOf } from "@std/assert";
14
- *
15
- * assertInstanceOf(new Date(), Date); // Doesn't throw
16
- * assertInstanceOf(new Date(), Number); // Throws
17
- * ```
18
- *
19
- * @typeParam T The expected type of the object.
20
- * @param actual The object to check.
21
- * @param expectedType The expected class constructor.
22
- * @param msg The optional message to display if the assertion fails.
23
- */
24
- function assertInstanceOf(actual, expectedType, msg = "") {
25
- if (actual instanceof expectedType)
26
- return;
27
- const msgSuffix = msg ? `: ${msg}` : ".";
28
- const expectedTypeStr = expectedType.name;
29
- let actualTypeStr = "";
30
- if (actual === null) {
31
- actualTypeStr = "null";
32
- }
33
- else if (actual === undefined) {
34
- actualTypeStr = "undefined";
35
- }
36
- else if (typeof actual === "object") {
37
- actualTypeStr = actual.constructor?.name ?? "Object";
38
- }
39
- else {
40
- actualTypeStr = typeof actual;
41
- }
42
- if (expectedTypeStr === actualTypeStr) {
43
- msg =
44
- `Expected object to be an instance of "${expectedTypeStr}"${msgSuffix}`;
45
- }
46
- else if (actualTypeStr === "function") {
47
- msg =
48
- `Expected object to be an instance of "${expectedTypeStr}" but was not an instanced object${msgSuffix}`;
49
- }
50
- else {
51
- msg =
52
- `Expected object to be an instance of "${expectedTypeStr}" but was "${actualTypeStr}"${msgSuffix}`;
53
- }
54
- throw new assertion_error_js_1.AssertionError(msg);
55
- }