@effectionx/worker 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/esm/worker.js +1 -1
  2. package/package.json +1 -4
  3. package/script/worker.js +2 -2
  4. package/esm/_dnt.shims.d.ts +0 -2
  5. package/esm/_dnt.shims.d.ts.map +0 -1
  6. package/esm/_dnt.shims.js +0 -57
  7. package/esm/deps/jsr.io/@std/assert/1.0.12/almost_equals.d.ts +0 -29
  8. package/esm/deps/jsr.io/@std/assert/1.0.12/almost_equals.d.ts.map +0 -1
  9. package/esm/deps/jsr.io/@std/assert/1.0.12/almost_equals.js +0 -46
  10. package/esm/deps/jsr.io/@std/assert/1.0.12/array_includes.d.ts +0 -24
  11. package/esm/deps/jsr.io/@std/assert/1.0.12/array_includes.d.ts.map +0 -1
  12. package/esm/deps/jsr.io/@std/assert/1.0.12/array_includes.js +0 -46
  13. package/esm/deps/jsr.io/@std/assert/1.0.12/assert.d.ts +0 -16
  14. package/esm/deps/jsr.io/@std/assert/1.0.12/assert.d.ts.map +0 -1
  15. package/esm/deps/jsr.io/@std/assert/1.0.12/assert.js +0 -22
  16. package/esm/deps/jsr.io/@std/assert/1.0.12/assertion_error.d.ts +0 -26
  17. package/esm/deps/jsr.io/@std/assert/1.0.12/assertion_error.d.ts.map +0 -1
  18. package/esm/deps/jsr.io/@std/assert/1.0.12/assertion_error.js +0 -30
  19. package/esm/deps/jsr.io/@std/assert/1.0.12/equal.d.ts +0 -17
  20. package/esm/deps/jsr.io/@std/assert/1.0.12/equal.d.ts.map +0 -1
  21. package/esm/deps/jsr.io/@std/assert/1.0.12/equal.js +0 -183
  22. package/esm/deps/jsr.io/@std/assert/1.0.12/equals.d.ts +0 -35
  23. package/esm/deps/jsr.io/@std/assert/1.0.12/equals.d.ts.map +0 -1
  24. package/esm/deps/jsr.io/@std/assert/1.0.12/equals.js +0 -58
  25. package/esm/deps/jsr.io/@std/assert/1.0.12/exists.d.ts +0 -18
  26. package/esm/deps/jsr.io/@std/assert/1.0.12/exists.d.ts.map +0 -1
  27. package/esm/deps/jsr.io/@std/assert/1.0.12/exists.js +0 -27
  28. package/esm/deps/jsr.io/@std/assert/1.0.12/fail.d.ts +0 -15
  29. package/esm/deps/jsr.io/@std/assert/1.0.12/fail.d.ts.map +0 -1
  30. package/esm/deps/jsr.io/@std/assert/1.0.12/fail.js +0 -20
  31. package/esm/deps/jsr.io/@std/assert/1.0.12/false.d.ts +0 -18
  32. package/esm/deps/jsr.io/@std/assert/1.0.12/false.d.ts.map +0 -1
  33. package/esm/deps/jsr.io/@std/assert/1.0.12/false.js +0 -22
  34. package/esm/deps/jsr.io/@std/assert/1.0.12/greater.d.ts +0 -20
  35. package/esm/deps/jsr.io/@std/assert/1.0.12/greater.d.ts.map +0 -1
  36. package/esm/deps/jsr.io/@std/assert/1.0.12/greater.js +0 -29
  37. package/esm/deps/jsr.io/@std/assert/1.0.12/greater_or_equal.d.ts +0 -20
  38. package/esm/deps/jsr.io/@std/assert/1.0.12/greater_or_equal.d.ts.map +0 -1
  39. package/esm/deps/jsr.io/@std/assert/1.0.12/greater_or_equal.js +0 -29
  40. package/esm/deps/jsr.io/@std/assert/1.0.12/instance_of.d.ts +0 -23
  41. package/esm/deps/jsr.io/@std/assert/1.0.12/instance_of.d.ts.map +0 -1
  42. package/esm/deps/jsr.io/@std/assert/1.0.12/instance_of.js +0 -52
  43. package/esm/deps/jsr.io/@std/assert/1.0.12/is_error.d.ts +0 -25
  44. package/esm/deps/jsr.io/@std/assert/1.0.12/is_error.d.ts.map +0 -1
  45. package/esm/deps/jsr.io/@std/assert/1.0.12/is_error.js +0 -53
  46. package/esm/deps/jsr.io/@std/assert/1.0.12/less.d.ts +0 -19
  47. package/esm/deps/jsr.io/@std/assert/1.0.12/less.d.ts.map +0 -1
  48. package/esm/deps/jsr.io/@std/assert/1.0.12/less.js +0 -28
  49. package/esm/deps/jsr.io/@std/assert/1.0.12/less_or_equal.d.ts +0 -20
  50. package/esm/deps/jsr.io/@std/assert/1.0.12/less_or_equal.d.ts.map +0 -1
  51. package/esm/deps/jsr.io/@std/assert/1.0.12/less_or_equal.js +0 -29
  52. package/esm/deps/jsr.io/@std/assert/1.0.12/match.d.ts +0 -18
  53. package/esm/deps/jsr.io/@std/assert/1.0.12/match.d.ts.map +0 -1
  54. package/esm/deps/jsr.io/@std/assert/1.0.12/match.js +0 -26
  55. package/esm/deps/jsr.io/@std/assert/1.0.12/mod.d.ts +0 -44
  56. package/esm/deps/jsr.io/@std/assert/1.0.12/mod.d.ts.map +0 -1
  57. package/esm/deps/jsr.io/@std/assert/1.0.12/mod.js +0 -45
  58. package/esm/deps/jsr.io/@std/assert/1.0.12/not_equals.d.ts +0 -21
  59. package/esm/deps/jsr.io/@std/assert/1.0.12/not_equals.d.ts.map +0 -1
  60. package/esm/deps/jsr.io/@std/assert/1.0.12/not_equals.js +0 -33
  61. package/esm/deps/jsr.io/@std/assert/1.0.12/not_instance_of.d.ts +0 -20
  62. package/esm/deps/jsr.io/@std/assert/1.0.12/not_instance_of.d.ts.map +0 -1
  63. package/esm/deps/jsr.io/@std/assert/1.0.12/not_instance_of.js +0 -29
  64. package/esm/deps/jsr.io/@std/assert/1.0.12/not_match.d.ts +0 -18
  65. package/esm/deps/jsr.io/@std/assert/1.0.12/not_match.d.ts.map +0 -1
  66. package/esm/deps/jsr.io/@std/assert/1.0.12/not_match.js +0 -26
  67. package/esm/deps/jsr.io/@std/assert/1.0.12/not_strict_equals.d.ts +0 -23
  68. package/esm/deps/jsr.io/@std/assert/1.0.12/not_strict_equals.d.ts.map +0 -1
  69. package/esm/deps/jsr.io/@std/assert/1.0.12/not_strict_equals.js +0 -32
  70. package/esm/deps/jsr.io/@std/assert/1.0.12/object_match.d.ts +0 -29
  71. package/esm/deps/jsr.io/@std/assert/1.0.12/object_match.d.ts.map +0 -1
  72. package/esm/deps/jsr.io/@std/assert/1.0.12/object_match.js +0 -167
  73. package/esm/deps/jsr.io/@std/assert/1.0.12/rejects.d.ts +0 -42
  74. package/esm/deps/jsr.io/@std/assert/1.0.12/rejects.d.ts.map +0 -1
  75. package/esm/deps/jsr.io/@std/assert/1.0.12/rejects.js +0 -53
  76. package/esm/deps/jsr.io/@std/assert/1.0.12/strict_equals.d.ts +0 -24
  77. package/esm/deps/jsr.io/@std/assert/1.0.12/strict_equals.d.ts.map +0 -1
  78. package/esm/deps/jsr.io/@std/assert/1.0.12/strict_equals.js +0 -57
  79. package/esm/deps/jsr.io/@std/assert/1.0.12/string_includes.d.ts +0 -18
  80. package/esm/deps/jsr.io/@std/assert/1.0.12/string_includes.d.ts.map +0 -1
  81. package/esm/deps/jsr.io/@std/assert/1.0.12/string_includes.js +0 -26
  82. package/esm/deps/jsr.io/@std/assert/1.0.12/throws.d.ts +0 -45
  83. package/esm/deps/jsr.io/@std/assert/1.0.12/throws.d.ts.map +0 -1
  84. package/esm/deps/jsr.io/@std/assert/1.0.12/throws.js +0 -44
  85. package/esm/deps/jsr.io/@std/assert/1.0.12/unimplemented.d.ts +0 -15
  86. package/esm/deps/jsr.io/@std/assert/1.0.12/unimplemented.d.ts.map +0 -1
  87. package/esm/deps/jsr.io/@std/assert/1.0.12/unimplemented.js +0 -20
  88. package/esm/deps/jsr.io/@std/assert/1.0.12/unreachable.d.ts +0 -15
  89. package/esm/deps/jsr.io/@std/assert/1.0.12/unreachable.d.ts.map +0 -1
  90. package/esm/deps/jsr.io/@std/assert/1.0.12/unreachable.js +0 -20
  91. package/esm/deps/jsr.io/@std/internal/1.0.6/build_message.d.ts +0 -82
  92. package/esm/deps/jsr.io/@std/internal/1.0.6/build_message.d.ts.map +0 -1
  93. package/esm/deps/jsr.io/@std/internal/1.0.6/build_message.js +0 -110
  94. package/esm/deps/jsr.io/@std/internal/1.0.6/diff.d.ts +0 -140
  95. package/esm/deps/jsr.io/@std/internal/1.0.6/diff.d.ts.map +0 -1
  96. package/esm/deps/jsr.io/@std/internal/1.0.6/diff.js +0 -276
  97. package/esm/deps/jsr.io/@std/internal/1.0.6/diff_str.d.ts +0 -99
  98. package/esm/deps/jsr.io/@std/internal/1.0.6/diff_str.d.ts.map +0 -1
  99. package/esm/deps/jsr.io/@std/internal/1.0.6/diff_str.js +0 -182
  100. package/esm/deps/jsr.io/@std/internal/1.0.6/format.d.ts +0 -2
  101. package/esm/deps/jsr.io/@std/internal/1.0.6/format.d.ts.map +0 -1
  102. package/esm/deps/jsr.io/@std/internal/1.0.6/format.js +0 -37
  103. package/esm/deps/jsr.io/@std/internal/1.0.6/styles.d.ts +0 -159
  104. package/esm/deps/jsr.io/@std/internal/1.0.6/styles.d.ts.map +0 -1
  105. package/esm/deps/jsr.io/@std/internal/1.0.6/styles.js +0 -207
  106. package/esm/deps/jsr.io/@std/internal/1.0.6/types.d.ts +0 -16
  107. package/esm/deps/jsr.io/@std/internal/1.0.6/types.d.ts.map +0 -1
  108. package/esm/deps/jsr.io/@std/internal/1.0.6/types.js +0 -3
  109. package/script/_dnt.shims.d.ts +0 -2
  110. package/script/_dnt.shims.d.ts.map +0 -1
  111. package/script/_dnt.shims.js +0 -60
  112. package/script/deps/jsr.io/@std/assert/1.0.12/almost_equals.d.ts +0 -29
  113. package/script/deps/jsr.io/@std/assert/1.0.12/almost_equals.d.ts.map +0 -1
  114. package/script/deps/jsr.io/@std/assert/1.0.12/almost_equals.js +0 -49
  115. package/script/deps/jsr.io/@std/assert/1.0.12/array_includes.d.ts +0 -24
  116. package/script/deps/jsr.io/@std/assert/1.0.12/array_includes.d.ts.map +0 -1
  117. package/script/deps/jsr.io/@std/assert/1.0.12/array_includes.js +0 -49
  118. package/script/deps/jsr.io/@std/assert/1.0.12/assert.d.ts +0 -16
  119. package/script/deps/jsr.io/@std/assert/1.0.12/assert.d.ts.map +0 -1
  120. package/script/deps/jsr.io/@std/assert/1.0.12/assert.js +0 -25
  121. package/script/deps/jsr.io/@std/assert/1.0.12/assertion_error.d.ts +0 -26
  122. package/script/deps/jsr.io/@std/assert/1.0.12/assertion_error.d.ts.map +0 -1
  123. package/script/deps/jsr.io/@std/assert/1.0.12/assertion_error.js +0 -34
  124. package/script/deps/jsr.io/@std/assert/1.0.12/equal.d.ts +0 -17
  125. package/script/deps/jsr.io/@std/assert/1.0.12/equal.d.ts.map +0 -1
  126. package/script/deps/jsr.io/@std/assert/1.0.12/equal.js +0 -209
  127. package/script/deps/jsr.io/@std/assert/1.0.12/equals.d.ts +0 -35
  128. package/script/deps/jsr.io/@std/assert/1.0.12/equals.d.ts.map +0 -1
  129. package/script/deps/jsr.io/@std/assert/1.0.12/equals.js +0 -61
  130. package/script/deps/jsr.io/@std/assert/1.0.12/exists.d.ts +0 -18
  131. package/script/deps/jsr.io/@std/assert/1.0.12/exists.d.ts.map +0 -1
  132. package/script/deps/jsr.io/@std/assert/1.0.12/exists.js +0 -30
  133. package/script/deps/jsr.io/@std/assert/1.0.12/fail.d.ts +0 -15
  134. package/script/deps/jsr.io/@std/assert/1.0.12/fail.d.ts.map +0 -1
  135. package/script/deps/jsr.io/@std/assert/1.0.12/fail.js +0 -23
  136. package/script/deps/jsr.io/@std/assert/1.0.12/false.d.ts +0 -18
  137. package/script/deps/jsr.io/@std/assert/1.0.12/false.d.ts.map +0 -1
  138. package/script/deps/jsr.io/@std/assert/1.0.12/false.js +0 -25
  139. package/script/deps/jsr.io/@std/assert/1.0.12/greater.d.ts +0 -20
  140. package/script/deps/jsr.io/@std/assert/1.0.12/greater.d.ts.map +0 -1
  141. package/script/deps/jsr.io/@std/assert/1.0.12/greater.js +0 -32
  142. package/script/deps/jsr.io/@std/assert/1.0.12/greater_or_equal.d.ts +0 -20
  143. package/script/deps/jsr.io/@std/assert/1.0.12/greater_or_equal.d.ts.map +0 -1
  144. package/script/deps/jsr.io/@std/assert/1.0.12/greater_or_equal.js +0 -32
  145. package/script/deps/jsr.io/@std/assert/1.0.12/instance_of.d.ts +0 -23
  146. package/script/deps/jsr.io/@std/assert/1.0.12/instance_of.d.ts.map +0 -1
  147. package/script/deps/jsr.io/@std/assert/1.0.12/instance_of.js +0 -55
  148. package/script/deps/jsr.io/@std/assert/1.0.12/is_error.d.ts +0 -25
  149. package/script/deps/jsr.io/@std/assert/1.0.12/is_error.d.ts.map +0 -1
  150. package/script/deps/jsr.io/@std/assert/1.0.12/is_error.js +0 -56
  151. package/script/deps/jsr.io/@std/assert/1.0.12/less.d.ts +0 -19
  152. package/script/deps/jsr.io/@std/assert/1.0.12/less.d.ts.map +0 -1
  153. package/script/deps/jsr.io/@std/assert/1.0.12/less.js +0 -31
  154. package/script/deps/jsr.io/@std/assert/1.0.12/less_or_equal.d.ts +0 -20
  155. package/script/deps/jsr.io/@std/assert/1.0.12/less_or_equal.d.ts.map +0 -1
  156. package/script/deps/jsr.io/@std/assert/1.0.12/less_or_equal.js +0 -32
  157. package/script/deps/jsr.io/@std/assert/1.0.12/match.d.ts +0 -18
  158. package/script/deps/jsr.io/@std/assert/1.0.12/match.d.ts.map +0 -1
  159. package/script/deps/jsr.io/@std/assert/1.0.12/match.js +0 -29
  160. package/script/deps/jsr.io/@std/assert/1.0.12/mod.d.ts +0 -44
  161. package/script/deps/jsr.io/@std/assert/1.0.12/mod.d.ts.map +0 -1
  162. package/script/deps/jsr.io/@std/assert/1.0.12/mod.js +0 -61
  163. package/script/deps/jsr.io/@std/assert/1.0.12/not_equals.d.ts +0 -21
  164. package/script/deps/jsr.io/@std/assert/1.0.12/not_equals.d.ts.map +0 -1
  165. package/script/deps/jsr.io/@std/assert/1.0.12/not_equals.js +0 -36
  166. package/script/deps/jsr.io/@std/assert/1.0.12/not_instance_of.d.ts +0 -20
  167. package/script/deps/jsr.io/@std/assert/1.0.12/not_instance_of.d.ts.map +0 -1
  168. package/script/deps/jsr.io/@std/assert/1.0.12/not_instance_of.js +0 -32
  169. package/script/deps/jsr.io/@std/assert/1.0.12/not_match.d.ts +0 -18
  170. package/script/deps/jsr.io/@std/assert/1.0.12/not_match.d.ts.map +0 -1
  171. package/script/deps/jsr.io/@std/assert/1.0.12/not_match.js +0 -29
  172. package/script/deps/jsr.io/@std/assert/1.0.12/not_strict_equals.d.ts +0 -23
  173. package/script/deps/jsr.io/@std/assert/1.0.12/not_strict_equals.d.ts.map +0 -1
  174. package/script/deps/jsr.io/@std/assert/1.0.12/not_strict_equals.js +0 -35
  175. package/script/deps/jsr.io/@std/assert/1.0.12/object_match.d.ts +0 -29
  176. package/script/deps/jsr.io/@std/assert/1.0.12/object_match.d.ts.map +0 -1
  177. package/script/deps/jsr.io/@std/assert/1.0.12/object_match.js +0 -170
  178. package/script/deps/jsr.io/@std/assert/1.0.12/rejects.d.ts +0 -42
  179. package/script/deps/jsr.io/@std/assert/1.0.12/rejects.d.ts.map +0 -1
  180. package/script/deps/jsr.io/@std/assert/1.0.12/rejects.js +0 -56
  181. package/script/deps/jsr.io/@std/assert/1.0.12/strict_equals.d.ts +0 -24
  182. package/script/deps/jsr.io/@std/assert/1.0.12/strict_equals.d.ts.map +0 -1
  183. package/script/deps/jsr.io/@std/assert/1.0.12/strict_equals.js +0 -60
  184. package/script/deps/jsr.io/@std/assert/1.0.12/string_includes.d.ts +0 -18
  185. package/script/deps/jsr.io/@std/assert/1.0.12/string_includes.d.ts.map +0 -1
  186. package/script/deps/jsr.io/@std/assert/1.0.12/string_includes.js +0 -29
  187. package/script/deps/jsr.io/@std/assert/1.0.12/throws.d.ts +0 -45
  188. package/script/deps/jsr.io/@std/assert/1.0.12/throws.d.ts.map +0 -1
  189. package/script/deps/jsr.io/@std/assert/1.0.12/throws.js +0 -47
  190. package/script/deps/jsr.io/@std/assert/1.0.12/unimplemented.d.ts +0 -15
  191. package/script/deps/jsr.io/@std/assert/1.0.12/unimplemented.d.ts.map +0 -1
  192. package/script/deps/jsr.io/@std/assert/1.0.12/unimplemented.js +0 -23
  193. package/script/deps/jsr.io/@std/assert/1.0.12/unreachable.d.ts +0 -15
  194. package/script/deps/jsr.io/@std/assert/1.0.12/unreachable.d.ts.map +0 -1
  195. package/script/deps/jsr.io/@std/assert/1.0.12/unreachable.js +0 -23
  196. package/script/deps/jsr.io/@std/internal/1.0.6/build_message.d.ts +0 -82
  197. package/script/deps/jsr.io/@std/internal/1.0.6/build_message.d.ts.map +0 -1
  198. package/script/deps/jsr.io/@std/internal/1.0.6/build_message.js +0 -115
  199. package/script/deps/jsr.io/@std/internal/1.0.6/diff.d.ts +0 -140
  200. package/script/deps/jsr.io/@std/internal/1.0.6/diff.d.ts.map +0 -1
  201. package/script/deps/jsr.io/@std/internal/1.0.6/diff.js +0 -283
  202. package/script/deps/jsr.io/@std/internal/1.0.6/diff_str.d.ts +0 -99
  203. package/script/deps/jsr.io/@std/internal/1.0.6/diff_str.d.ts.map +0 -1
  204. package/script/deps/jsr.io/@std/internal/1.0.6/diff_str.js +0 -188
  205. package/script/deps/jsr.io/@std/internal/1.0.6/format.d.ts +0 -2
  206. package/script/deps/jsr.io/@std/internal/1.0.6/format.d.ts.map +0 -1
  207. package/script/deps/jsr.io/@std/internal/1.0.6/format.js +0 -63
  208. package/script/deps/jsr.io/@std/internal/1.0.6/styles.d.ts +0 -159
  209. package/script/deps/jsr.io/@std/internal/1.0.6/styles.d.ts.map +0 -1
  210. package/script/deps/jsr.io/@std/internal/1.0.6/styles.js +0 -242
  211. package/script/deps/jsr.io/@std/internal/1.0.6/types.d.ts +0 -16
  212. package/script/deps/jsr.io/@std/internal/1.0.6/types.d.ts.map +0 -1
  213. package/script/deps/jsr.io/@std/internal/1.0.6/types.js +0 -4
@@ -1,58 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { equal } from "./equal.js";
4
- import { buildMessage } from "../../internal/1.0.6/build_message.js";
5
- import { diff } from "../../internal/1.0.6/diff.js";
6
- import { diffStr } from "../../internal/1.0.6/diff_str.js";
7
- import { format } from "../../internal/1.0.6/format.js";
8
- import { AssertionError } from "./assertion_error.js";
9
- /**
10
- * Make an assertion that `actual` and `expected` are equal, deeply. If not
11
- * deeply equal, then throw.
12
- *
13
- * Type parameter can be specified to ensure values under comparison have the
14
- * same type.
15
- *
16
- * Note: When comparing `Blob` objects, you should first convert them to
17
- * `Uint8Array` using the `Blob.bytes()` method and then compare their
18
- * contents.
19
- *
20
- * @example Usage
21
- * ```ts ignore
22
- * import { assertEquals } from "@std/assert";
23
- *
24
- * assertEquals("world", "world"); // Doesn't throw
25
- * assertEquals("hello", "world"); // Throws
26
- * ```
27
- * @example Compare `Blob` objects
28
- * ```ts ignore
29
- * import { assertEquals } from "@std/assert";
30
- *
31
- * const bytes1 = await new Blob(["foo"]).bytes();
32
- * const bytes2 = await new Blob(["foo"]).bytes();
33
- *
34
- * assertEquals(bytes1, bytes2);
35
- * ```
36
- *
37
- * @typeParam T The type of the values to compare. This is usually inferred.
38
- * @param actual The actual value to compare.
39
- * @param expected The expected value to compare.
40
- * @param msg The optional message to display if the assertion fails.
41
- */
42
- export function assertEquals(actual, expected, msg) {
43
- if (equal(actual, expected)) {
44
- return;
45
- }
46
- const msgSuffix = msg ? `: ${msg}` : ".";
47
- let message = `Values are not equal${msgSuffix}`;
48
- const actualString = format(actual);
49
- const expectedString = format(expected);
50
- const stringDiff = (typeof actual === "string") &&
51
- (typeof expected === "string");
52
- const diffResult = stringDiff
53
- ? diffStr(actual, expected)
54
- : diff(actualString.split("\n"), expectedString.split("\n"));
55
- const diffMsg = buildMessage(diffResult, { stringDiff }).join("\n");
56
- message = `${message}\n${diffMsg}`;
57
- throw new AssertionError(message);
58
- }
@@ -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.12/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,27 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { AssertionError } from "./assertion_error.js";
4
- /**
5
- * Make an assertion that actual is not null or undefined.
6
- * If not then throw.
7
- *
8
- * @example Usage
9
- * ```ts ignore
10
- * import { assertExists } from "@std/assert";
11
- *
12
- * assertExists("something"); // Doesn't throw
13
- * assertExists(undefined); // Throws
14
- * ```
15
- *
16
- * @typeParam T The type of the actual value.
17
- * @param actual The actual value to check.
18
- * @param msg The optional message to include in the error if the assertion fails.
19
- */
20
- export function assertExists(actual, msg) {
21
- if (actual === undefined || actual === null) {
22
- const msgSuffix = msg ? `: ${msg}` : ".";
23
- msg =
24
- `Expected actual: "${actual}" to not be null or undefined${msgSuffix}`;
25
- throw new AssertionError(msg);
26
- }
27
- }
@@ -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.12/fail.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGxC"}
@@ -1,20 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { AssertionError } from "./assertion_error.js";
4
- /**
5
- * Forcefully throws a failed assertion.
6
- *
7
- * @example Usage
8
- * ```ts ignore
9
- * import { fail } from "@std/assert";
10
- *
11
- * fail("Deliberately failed!"); // Throws
12
- * ```
13
- *
14
- * @param msg Optional message to include in the error.
15
- * @returns Never returns, always throws.
16
- */
17
- export function fail(msg) {
18
- const msgSuffix = msg ? `: ${msg}` : ".";
19
- throw new AssertionError(`Failed assertion${msgSuffix}`);
20
- }
@@ -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.12/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,22 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { AssertionError } from "./assertion_error.js";
4
- /**
5
- * Make an assertion, error will be thrown if `expr` have truthy value.
6
- *
7
- * @example Usage
8
- * ```ts ignore
9
- * import { assertFalse } from "@std/assert";
10
- *
11
- * assertFalse(false); // Doesn't throw
12
- * assertFalse(true); // Throws
13
- * ```
14
- *
15
- * @param expr The expression to test.
16
- * @param msg The optional message to display if the assertion fails.
17
- */
18
- export function assertFalse(expr, msg = "") {
19
- if (expr) {
20
- throw new AssertionError(msg);
21
- }
22
- }
@@ -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.12/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,29 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { format } from "../../internal/1.0.6/format.js";
4
- import { AssertionError } from "./assertion_error.js";
5
- /**
6
- * Make an assertion that `actual` is greater than `expected`.
7
- * If not then throw.
8
- *
9
- * @example Usage
10
- * ```ts ignore
11
- * import { assertGreater } from "@std/assert";
12
- *
13
- * assertGreater(2, 1); // Doesn't throw
14
- * assertGreater(1, 1); // Throws
15
- * assertGreater(0, 1); // Throws
16
- * ```
17
- *
18
- * @typeParam T The type of the values to compare.
19
- * @param actual The actual value to compare.
20
- * @param expected The expected value to compare.
21
- * @param msg The optional message to display if the assertion fails.
22
- */
23
- export function assertGreater(actual, expected, msg) {
24
- if (actual > expected)
25
- return;
26
- const actualString = format(actual);
27
- const expectedString = format(expected);
28
- throw new AssertionError(msg ?? `Expect ${actualString} > ${expectedString}`);
29
- }
@@ -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.12/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,29 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { format } from "../../internal/1.0.6/format.js";
4
- import { AssertionError } from "./assertion_error.js";
5
- /**
6
- * Make an assertion that `actual` is greater than or equal to `expected`.
7
- * If not then throw.
8
- *
9
- * @example Usage
10
- * ```ts ignore
11
- * import { assertGreaterOrEqual } from "@std/assert";
12
- *
13
- * assertGreaterOrEqual(2, 1); // Doesn't throw
14
- * assertGreaterOrEqual(1, 1); // Doesn't throw
15
- * assertGreaterOrEqual(0, 1); // Throws
16
- * ```
17
- *
18
- * @typeParam T The type of the values to compare.
19
- * @param actual The actual value to compare.
20
- * @param expected The expected value to compare.
21
- * @param msg The optional message to display if the assertion fails.
22
- */
23
- export function assertGreaterOrEqual(actual, expected, msg) {
24
- if (actual >= expected)
25
- return;
26
- const actualString = format(actual);
27
- const expectedString = format(expected);
28
- throw new AssertionError(msg ?? `Expect ${actualString} >= ${expectedString}`);
29
- }
@@ -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.12/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,52 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { AssertionError } from "./assertion_error.js";
4
- /**
5
- * Make an assertion that `obj` is an instance of `type`.
6
- * If not then throw.
7
- *
8
- * @example Usage
9
- * ```ts ignore
10
- * import { assertInstanceOf } from "@std/assert";
11
- *
12
- * assertInstanceOf(new Date(), Date); // Doesn't throw
13
- * assertInstanceOf(new Date(), Number); // Throws
14
- * ```
15
- *
16
- * @typeParam T The expected type of the object.
17
- * @param actual The object to check.
18
- * @param expectedType The expected class constructor.
19
- * @param msg The optional message to display if the assertion fails.
20
- */
21
- export function assertInstanceOf(actual, expectedType, msg = "") {
22
- if (actual instanceof expectedType)
23
- return;
24
- const msgSuffix = msg ? `: ${msg}` : ".";
25
- const expectedTypeStr = expectedType.name;
26
- let actualTypeStr = "";
27
- if (actual === null) {
28
- actualTypeStr = "null";
29
- }
30
- else if (actual === undefined) {
31
- actualTypeStr = "undefined";
32
- }
33
- else if (typeof actual === "object") {
34
- actualTypeStr = actual.constructor?.name ?? "Object";
35
- }
36
- else {
37
- actualTypeStr = typeof actual;
38
- }
39
- if (expectedTypeStr === actualTypeStr) {
40
- msg =
41
- `Expected object to be an instance of "${expectedTypeStr}"${msgSuffix}`;
42
- }
43
- else if (actualTypeStr === "function") {
44
- msg =
45
- `Expected object to be an instance of "${expectedTypeStr}" but was not an instanced object${msgSuffix}`;
46
- }
47
- else {
48
- msg =
49
- `Expected object to be an instance of "${expectedTypeStr}" but was "${actualTypeStr}"${msgSuffix}`;
50
- }
51
- throw new AssertionError(msg);
52
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * Make an assertion that `error` is an `Error`.
3
- * If not then an error will be thrown.
4
- * An error class and a string that should be included in the
5
- * error message can also be asserted.
6
- *
7
- * @example Usage
8
- * ```ts ignore
9
- * import { assertIsError } from "@std/assert";
10
- *
11
- * assertIsError(null); // Throws
12
- * assertIsError(new RangeError("Out of range")); // Doesn't throw
13
- * assertIsError(new RangeError("Out of range"), SyntaxError); // Throws
14
- * assertIsError(new RangeError("Out of range"), SyntaxError, "Out of range"); // Doesn't throw
15
- * assertIsError(new RangeError("Out of range"), SyntaxError, "Within range"); // Throws
16
- * ```
17
- *
18
- * @typeParam E The type of the error to assert.
19
- * @param error The error to assert.
20
- * @param ErrorClass The optional error class to assert.
21
- * @param msgMatches The optional string or RegExp to assert in the error message.
22
- * @param msg The optional message to display if the assertion fails.
23
- */
24
- export declare function assertIsError<E extends Error = Error>(error: unknown, ErrorClass?: abstract new (...args: any[]) => E, msgMatches?: string | RegExp, msg?: string): asserts error is E;
25
- //# sourceMappingURL=is_error.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/is_error.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACnD,KAAK,EAAE,OAAO,EAEd,UAAU,CAAC,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC/C,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAC5B,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,KAAK,IAAI,CAAC,CA8BpB"}
@@ -1,53 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { AssertionError } from "./assertion_error.js";
4
- import { stripAnsiCode } from "../../internal/1.0.6/styles.js";
5
- /**
6
- * Make an assertion that `error` is an `Error`.
7
- * If not then an error will be thrown.
8
- * An error class and a string that should be included in the
9
- * error message can also be asserted.
10
- *
11
- * @example Usage
12
- * ```ts ignore
13
- * import { assertIsError } from "@std/assert";
14
- *
15
- * assertIsError(null); // Throws
16
- * assertIsError(new RangeError("Out of range")); // Doesn't throw
17
- * assertIsError(new RangeError("Out of range"), SyntaxError); // Throws
18
- * assertIsError(new RangeError("Out of range"), SyntaxError, "Out of range"); // Doesn't throw
19
- * assertIsError(new RangeError("Out of range"), SyntaxError, "Within range"); // Throws
20
- * ```
21
- *
22
- * @typeParam E The type of the error to assert.
23
- * @param error The error to assert.
24
- * @param ErrorClass The optional error class to assert.
25
- * @param msgMatches The optional string or RegExp to assert in the error message.
26
- * @param msg The optional message to display if the assertion fails.
27
- */
28
- export function assertIsError(error,
29
- // deno-lint-ignore no-explicit-any
30
- ErrorClass, msgMatches, msg) {
31
- const msgSuffix = msg ? `: ${msg}` : ".";
32
- if (!(error instanceof Error)) {
33
- throw new AssertionError(`Expected "error" to be an Error object${msgSuffix}`);
34
- }
35
- if (ErrorClass && !(error instanceof ErrorClass)) {
36
- msg =
37
- `Expected error to be instance of "${ErrorClass.name}", but was "${error?.constructor?.name}"${msgSuffix}`;
38
- throw new AssertionError(msg);
39
- }
40
- let msgCheck;
41
- if (typeof msgMatches === "string") {
42
- msgCheck = stripAnsiCode(error.message).includes(stripAnsiCode(msgMatches));
43
- }
44
- if (msgMatches instanceof RegExp) {
45
- msgCheck = msgMatches.test(stripAnsiCode(error.message));
46
- }
47
- if (msgMatches && !msgCheck) {
48
- msg = `Expected error message to include ${msgMatches instanceof RegExp
49
- ? msgMatches.toString()
50
- : JSON.stringify(msgMatches)}, but got ${JSON.stringify(error?.message)}${msgSuffix}`;
51
- throw new AssertionError(msg);
52
- }
53
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * Make an assertion that `actual` is less than `expected`.
3
- * If not then throw.
4
- *
5
- * @example Usage
6
- * ```ts ignore
7
- * import { assertLess } from "@std/assert";
8
- *
9
- * assertLess(1, 2); // Doesn't throw
10
- * assertLess(2, 1); // Throws
11
- * ```
12
- *
13
- * @typeParam T The type of the values to compare.
14
- * @param actual The actual value to compare.
15
- * @param expected The expected value to compare.
16
- * @param msg The optional message to display if the assertion fails.
17
- */
18
- export declare function assertLess<T>(actual: T, expected: T, msg?: string): void;
19
- //# sourceMappingURL=less.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"less.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/less.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAMjE"}
@@ -1,28 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { format } from "../../internal/1.0.6/format.js";
4
- import { AssertionError } from "./assertion_error.js";
5
- /**
6
- * Make an assertion that `actual` is less than `expected`.
7
- * If not then throw.
8
- *
9
- * @example Usage
10
- * ```ts ignore
11
- * import { assertLess } from "@std/assert";
12
- *
13
- * assertLess(1, 2); // Doesn't throw
14
- * assertLess(2, 1); // Throws
15
- * ```
16
- *
17
- * @typeParam T The type of the values to compare.
18
- * @param actual The actual value to compare.
19
- * @param expected The expected value to compare.
20
- * @param msg The optional message to display if the assertion fails.
21
- */
22
- export function assertLess(actual, expected, msg) {
23
- if (actual < expected)
24
- return;
25
- const actualString = format(actual);
26
- const expectedString = format(expected);
27
- throw new AssertionError(msg ?? `Expect ${actualString} < ${expectedString}`);
28
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Make an assertion that `actual` is less than or equal to `expected`.
3
- * If not then throw.
4
- *
5
- * @example Usage
6
- * ```ts ignore
7
- * import { assertLessOrEqual } from "@std/assert";
8
- *
9
- * assertLessOrEqual(1, 2); // Doesn't throw
10
- * assertLessOrEqual(1, 1); // Doesn't throw
11
- * assertLessOrEqual(1, 0); // 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 assertLessOrEqual<T>(actual: T, expected: T, msg?: string): void;
20
- //# sourceMappingURL=less_or_equal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"less_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/less_or_equal.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QASb"}
@@ -1,29 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { format } from "../../internal/1.0.6/format.js";
4
- import { AssertionError } from "./assertion_error.js";
5
- /**
6
- * Make an assertion that `actual` is less than or equal to `expected`.
7
- * If not then throw.
8
- *
9
- * @example Usage
10
- * ```ts ignore
11
- * import { assertLessOrEqual } from "@std/assert";
12
- *
13
- * assertLessOrEqual(1, 2); // Doesn't throw
14
- * assertLessOrEqual(1, 1); // Doesn't throw
15
- * assertLessOrEqual(1, 0); // Throws
16
- * ```
17
- *
18
- * @typeParam T The type of the values to compare.
19
- * @param actual The actual value to compare.
20
- * @param expected The expected value to compare.
21
- * @param msg The optional message to display if the assertion fails.
22
- */
23
- export function assertLessOrEqual(actual, expected, msg) {
24
- if (actual <= expected)
25
- return;
26
- const actualString = format(actual);
27
- const expectedString = format(expected);
28
- throw new AssertionError(msg ?? `Expect ${actualString} <= ${expectedString}`);
29
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Make an assertion that `actual` match RegExp `expected`. If not
3
- * then throw.
4
- *
5
- * @example Usage
6
- * ```ts ignore
7
- * import { assertMatch } from "@std/assert";
8
- *
9
- * assertMatch("Raptor", /Raptor/); // Doesn't throw
10
- * assertMatch("Denosaurus", /Raptor/); // Throws
11
- * ```
12
- *
13
- * @param actual The actual value to be matched.
14
- * @param expected The expected pattern to match.
15
- * @param msg The optional message to display if the assertion fails.
16
- */
17
- export declare function assertMatch(actual: string, expected: RegExp, msg?: string): void;
18
- //# sourceMappingURL=match.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
@@ -1,26 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { AssertionError } from "./assertion_error.js";
4
- /**
5
- * Make an assertion that `actual` match RegExp `expected`. If not
6
- * then throw.
7
- *
8
- * @example Usage
9
- * ```ts ignore
10
- * import { assertMatch } from "@std/assert";
11
- *
12
- * assertMatch("Raptor", /Raptor/); // Doesn't throw
13
- * assertMatch("Denosaurus", /Raptor/); // Throws
14
- * ```
15
- *
16
- * @param actual The actual value to be matched.
17
- * @param expected The expected pattern to match.
18
- * @param msg The optional message to display if the assertion fails.
19
- */
20
- export function assertMatch(actual, expected, msg) {
21
- if (expected.test(actual))
22
- return;
23
- const msgSuffix = msg ? `: ${msg}` : ".";
24
- msg = `Expected actual: "${actual}" to match: "${expected}"${msgSuffix}`;
25
- throw new AssertionError(msg);
26
- }