structured-outputs 0.1.0-beta.20 → 0.1.0-beta.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (320) hide show
  1. package/esm/ResponseFormat.d.ts +21 -0
  2. package/esm/ResponseFormat.d.ts.map +1 -0
  3. package/esm/ResponseFormat.js +43 -19
  4. package/esm/ResponseFormat.js.map +1 -1
  5. package/esm/oai.d.ts +5 -0
  6. package/esm/oai.d.ts.map +1 -0
  7. package/esm/oai.js +2 -0
  8. package/esm/oai.js.map +1 -0
  9. package/package.json +5 -10
  10. package/src/ResponseFormat.ts +48 -41
  11. package/src/oai.ts +5 -0
  12. package/esm/_dnt.shims.js +0 -58
  13. package/esm/_dnt.shims.js.map +0 -1
  14. package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js +0 -47
  15. package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js.map +0 -1
  16. package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js +0 -47
  17. package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js.map +0 -1
  18. package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js +0 -23
  19. package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js.map +0 -1
  20. package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js +0 -31
  21. package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js.map +0 -1
  22. package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js +0 -184
  23. package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js.map +0 -1
  24. package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js +0 -46
  25. package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js.map +0 -1
  26. package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js +0 -28
  27. package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js.map +0 -1
  28. package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js +0 -21
  29. package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js.map +0 -1
  30. package/esm/deps/jsr.io/@std/assert/1.0.8/false.js +0 -23
  31. package/esm/deps/jsr.io/@std/assert/1.0.8/false.js.map +0 -1
  32. package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js +0 -30
  33. package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js.map +0 -1
  34. package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js +0 -30
  35. package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js.map +0 -1
  36. package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js +0 -53
  37. package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js.map +0 -1
  38. package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js +0 -54
  39. package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js.map +0 -1
  40. package/esm/deps/jsr.io/@std/assert/1.0.8/less.js +0 -29
  41. package/esm/deps/jsr.io/@std/assert/1.0.8/less.js.map +0 -1
  42. package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js +0 -30
  43. package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js.map +0 -1
  44. package/esm/deps/jsr.io/@std/assert/1.0.8/match.js +0 -27
  45. package/esm/deps/jsr.io/@std/assert/1.0.8/match.js.map +0 -1
  46. package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js +0 -46
  47. package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js.map +0 -1
  48. package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js +0 -33
  49. package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js.map +0 -1
  50. package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js +0 -30
  51. package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js.map +0 -1
  52. package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js +0 -27
  53. package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js.map +0 -1
  54. package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js +0 -33
  55. package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js.map +0 -1
  56. package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js +0 -160
  57. package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js.map +0 -1
  58. package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js +0 -54
  59. package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js.map +0 -1
  60. package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js +0 -58
  61. package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js.map +0 -1
  62. package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js +0 -27
  63. package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js.map +0 -1
  64. package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js +0 -45
  65. package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js.map +0 -1
  66. package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js +0 -21
  67. package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js.map +0 -1
  68. package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js +0 -21
  69. package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js.map +0 -1
  70. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -111
  71. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js.map +0 -1
  72. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -277
  73. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js.map +0 -1
  74. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -180
  75. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js.map +0 -1
  76. package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +0 -38
  77. package/esm/deps/jsr.io/@std/internal/1.0.5/format.js.map +0 -1
  78. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -208
  79. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js.map +0 -1
  80. package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
  81. package/esm/deps/jsr.io/@std/internal/1.0.5/types.js.map +0 -1
  82. package/src/_dnt.shims.ts +0 -60
  83. package/src/deps/jsr.io/@std/assert/1.0.8/almost_equals.ts +0 -55
  84. package/src/deps/jsr.io/@std/assert/1.0.8/array_includes.ts +0 -57
  85. package/src/deps/jsr.io/@std/assert/1.0.8/assert.ts +0 -23
  86. package/src/deps/jsr.io/@std/assert/1.0.8/assertion_error.ts +0 -31
  87. package/src/deps/jsr.io/@std/assert/1.0.8/equal.ts +0 -210
  88. package/src/deps/jsr.io/@std/assert/1.0.8/equals.ts +0 -52
  89. package/src/deps/jsr.io/@std/assert/1.0.8/exists.ts +0 -31
  90. package/src/deps/jsr.io/@std/assert/1.0.8/fail.ts +0 -21
  91. package/src/deps/jsr.io/@std/assert/1.0.8/false.ts +0 -26
  92. package/src/deps/jsr.io/@std/assert/1.0.8/greater.ts +0 -30
  93. package/src/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.ts +0 -36
  94. package/src/deps/jsr.io/@std/assert/1.0.8/instance_of.ts +0 -64
  95. package/src/deps/jsr.io/@std/assert/1.0.8/is_error.ts +0 -65
  96. package/src/deps/jsr.io/@std/assert/1.0.8/less.ts +0 -29
  97. package/src/deps/jsr.io/@std/assert/1.0.8/less_or_equal.ts +0 -36
  98. package/src/deps/jsr.io/@std/assert/1.0.8/match.ts +0 -30
  99. package/src/deps/jsr.io/@std/assert/1.0.8/mod.ts +0 -47
  100. package/src/deps/jsr.io/@std/assert/1.0.8/not_equals.ts +0 -36
  101. package/src/deps/jsr.io/@std/assert/1.0.8/not_instance_of.ts +0 -33
  102. package/src/deps/jsr.io/@std/assert/1.0.8/not_match.ts +0 -30
  103. package/src/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.ts +0 -42
  104. package/src/deps/jsr.io/@std/assert/1.0.8/object_match.ts +0 -202
  105. package/src/deps/jsr.io/@std/assert/1.0.8/rejects.ts +0 -123
  106. package/src/deps/jsr.io/@std/assert/1.0.8/strict_equals.ts +0 -67
  107. package/src/deps/jsr.io/@std/assert/1.0.8/string_includes.ts +0 -30
  108. package/src/deps/jsr.io/@std/assert/1.0.8/throws.ts +0 -111
  109. package/src/deps/jsr.io/@std/assert/1.0.8/unimplemented.ts +0 -21
  110. package/src/deps/jsr.io/@std/assert/1.0.8/unreachable.ts +0 -21
  111. package/src/deps/jsr.io/@std/internal/1.0.5/build_message.ts +0 -134
  112. package/src/deps/jsr.io/@std/internal/1.0.5/diff.ts +0 -317
  113. package/src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts +0 -204
  114. package/src/deps/jsr.io/@std/internal/1.0.5/format.ts +0 -39
  115. package/src/deps/jsr.io/@std/internal/1.0.5/styles.ts +0 -233
  116. package/src/deps/jsr.io/@std/internal/1.0.5/types.ts +0 -18
  117. package/types/ResponseFormat.d.ts +0 -26
  118. package/types/ResponseFormat.d.ts.map +0 -1
  119. package/types/_dnt.shims.d.ts +0 -2
  120. package/types/_dnt.shims.d.ts.map +0 -1
  121. package/types/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts +0 -29
  122. package/types/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts.map +0 -1
  123. package/types/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts +0 -24
  124. package/types/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts.map +0 -1
  125. package/types/deps/jsr.io/@std/assert/1.0.8/assert.d.ts +0 -16
  126. package/types/deps/jsr.io/@std/assert/1.0.8/assert.d.ts.map +0 -1
  127. package/types/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts +0 -26
  128. package/types/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts.map +0 -1
  129. package/types/deps/jsr.io/@std/assert/1.0.8/equal.d.ts +0 -17
  130. package/types/deps/jsr.io/@std/assert/1.0.8/equal.d.ts.map +0 -1
  131. package/types/deps/jsr.io/@std/assert/1.0.8/equals.d.ts +0 -22
  132. package/types/deps/jsr.io/@std/assert/1.0.8/equals.d.ts.map +0 -1
  133. package/types/deps/jsr.io/@std/assert/1.0.8/exists.d.ts +0 -18
  134. package/types/deps/jsr.io/@std/assert/1.0.8/exists.d.ts.map +0 -1
  135. package/types/deps/jsr.io/@std/assert/1.0.8/fail.d.ts +0 -15
  136. package/types/deps/jsr.io/@std/assert/1.0.8/fail.d.ts.map +0 -1
  137. package/types/deps/jsr.io/@std/assert/1.0.8/false.d.ts +0 -18
  138. package/types/deps/jsr.io/@std/assert/1.0.8/false.d.ts.map +0 -1
  139. package/types/deps/jsr.io/@std/assert/1.0.8/greater.d.ts +0 -20
  140. package/types/deps/jsr.io/@std/assert/1.0.8/greater.d.ts.map +0 -1
  141. package/types/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts +0 -20
  142. package/types/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts.map +0 -1
  143. package/types/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts +0 -23
  144. package/types/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts.map +0 -1
  145. package/types/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts +0 -25
  146. package/types/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts.map +0 -1
  147. package/types/deps/jsr.io/@std/assert/1.0.8/less.d.ts +0 -19
  148. package/types/deps/jsr.io/@std/assert/1.0.8/less.d.ts.map +0 -1
  149. package/types/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts +0 -20
  150. package/types/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts.map +0 -1
  151. package/types/deps/jsr.io/@std/assert/1.0.8/match.d.ts +0 -18
  152. package/types/deps/jsr.io/@std/assert/1.0.8/match.d.ts.map +0 -1
  153. package/types/deps/jsr.io/@std/assert/1.0.8/mod.d.ts +0 -44
  154. package/types/deps/jsr.io/@std/assert/1.0.8/mod.d.ts.map +0 -1
  155. package/types/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts +0 -21
  156. package/types/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts.map +0 -1
  157. package/types/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts +0 -20
  158. package/types/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts.map +0 -1
  159. package/types/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts +0 -18
  160. package/types/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts.map +0 -1
  161. package/types/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts +0 -23
  162. package/types/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts.map +0 -1
  163. package/types/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts +0 -28
  164. package/types/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts.map +0 -1
  165. package/types/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts +0 -42
  166. package/types/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts.map +0 -1
  167. package/types/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts +0 -24
  168. package/types/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts.map +0 -1
  169. package/types/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts +0 -18
  170. package/types/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts.map +0 -1
  171. package/types/deps/jsr.io/@std/assert/1.0.8/throws.d.ts +0 -45
  172. package/types/deps/jsr.io/@std/assert/1.0.8/throws.d.ts.map +0 -1
  173. package/types/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts +0 -15
  174. package/types/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts.map +0 -1
  175. package/types/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts +0 -15
  176. package/types/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts.map +0 -1
  177. package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
  178. package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  179. package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +0 -140
  180. package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  181. package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +0 -99
  182. package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  183. package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
  184. package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  185. package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +0 -159
  186. package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  187. package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
  188. package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  189. /package/{types → esm}/Tool.d.ts +0 -0
  190. /package/{types → esm}/Tool.d.ts.map +0 -0
  191. /package/{types → esm}/_dnt.polyfills.d.ts +0 -0
  192. /package/{types → esm}/_dnt.polyfills.d.ts.map +0 -0
  193. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts +0 -0
  194. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts.map +0 -0
  195. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts +0 -0
  196. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts.map +0 -0
  197. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts +0 -0
  198. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts.map +0 -0
  199. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts +0 -0
  200. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts.map +0 -0
  201. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts +0 -0
  202. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts.map +0 -0
  203. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts +0 -0
  204. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts.map +0 -0
  205. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts +0 -0
  206. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts.map +0 -0
  207. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts +0 -0
  208. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts.map +0 -0
  209. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts +0 -0
  210. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts.map +0 -0
  211. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts +0 -0
  212. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts.map +0 -0
  213. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts +0 -0
  214. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts.map +0 -0
  215. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts +0 -0
  216. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts.map +0 -0
  217. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts +0 -0
  218. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts.map +0 -0
  219. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts +0 -0
  220. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts.map +0 -0
  221. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts +0 -0
  222. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts.map +0 -0
  223. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts +0 -0
  224. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts.map +0 -0
  225. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts +0 -0
  226. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts.map +0 -0
  227. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/invert.d.ts +0 -0
  228. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/invert.d.ts.map +0 -0
  229. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts +0 -0
  230. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts.map +0 -0
  231. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts +0 -0
  232. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts.map +0 -0
  233. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts +0 -0
  234. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts.map +0 -0
  235. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts +0 -0
  236. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts.map +0 -0
  237. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts +0 -0
  238. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts.map +0 -0
  239. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts +0 -0
  240. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts.map +0 -0
  241. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts +0 -0
  242. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts.map +0 -0
  243. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts +0 -0
  244. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts.map +0 -0
  245. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts +0 -0
  246. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts.map +0 -0
  247. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts +0 -0
  248. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts.map +0 -0
  249. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts +0 -0
  250. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts.map +0 -0
  251. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts +0 -0
  252. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts.map +0 -0
  253. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/mod.d.ts +0 -0
  254. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/mod.d.ts.map +0 -0
  255. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/omit.d.ts +0 -0
  256. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/omit.d.ts.map +0 -0
  257. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/partition.d.ts +0 -0
  258. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/partition.d.ts.map +0 -0
  259. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts +0 -0
  260. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts.map +0 -0
  261. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts +0 -0
  262. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts.map +0 -0
  263. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/pick.d.ts +0 -0
  264. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/pick.d.ts.map +0 -0
  265. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts +0 -0
  266. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts.map +0 -0
  267. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts +0 -0
  268. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts.map +0 -0
  269. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sample.d.ts +0 -0
  270. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sample.d.ts.map +0 -0
  271. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts +0 -0
  272. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts.map +0 -0
  273. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts +0 -0
  274. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts.map +0 -0
  275. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts +0 -0
  276. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts.map +0 -0
  277. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts +0 -0
  278. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts.map +0 -0
  279. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts +0 -0
  280. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts.map +0 -0
  281. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/union.d.ts +0 -0
  282. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/union.d.ts.map +0 -0
  283. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts +0 -0
  284. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts.map +0 -0
  285. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts +0 -0
  286. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts.map +0 -0
  287. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/zip.d.ts +0 -0
  288. /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/zip.d.ts.map +0 -0
  289. /package/{types → esm}/mod.d.ts +0 -0
  290. /package/{types → esm}/mod.d.ts.map +0 -0
  291. /package/{types → esm}/types/Ref.d.ts +0 -0
  292. /package/{types → esm}/types/Ref.d.ts.map +0 -0
  293. /package/{types → esm}/types/RootTy.d.ts +0 -0
  294. /package/{types → esm}/types/RootTy.d.ts.map +0 -0
  295. /package/{types → esm}/types/Ty.d.ts +0 -0
  296. /package/{types → esm}/types/Ty.d.ts.map +0 -0
  297. /package/{types → esm}/types/array.d.ts +0 -0
  298. /package/{types → esm}/types/array.d.ts.map +0 -0
  299. /package/{types → esm}/types/constant.d.ts +0 -0
  300. /package/{types → esm}/types/constant.d.ts.map +0 -0
  301. /package/{types → esm}/types/constantUnion.d.ts +0 -0
  302. /package/{types → esm}/types/constantUnion.d.ts.map +0 -0
  303. /package/{types → esm}/types/leaves.d.ts +0 -0
  304. /package/{types → esm}/types/leaves.d.ts.map +0 -0
  305. /package/{types → esm}/types/mod.d.ts +0 -0
  306. /package/{types → esm}/types/mod.d.ts.map +0 -0
  307. /package/{types → esm}/types/object.d.ts +0 -0
  308. /package/{types → esm}/types/object.d.ts.map +0 -0
  309. /package/{types → esm}/types/std/Option.d.ts +0 -0
  310. /package/{types → esm}/types/std/Option.d.ts.map +0 -0
  311. /package/{types → esm}/types/std/Wrapper.d.ts +0 -0
  312. /package/{types → esm}/types/std/Wrapper.d.ts.map +0 -0
  313. /package/{types → esm}/types/std/mod.d.ts +0 -0
  314. /package/{types → esm}/types/std/mod.d.ts.map +0 -0
  315. /package/{types → esm}/types/taggedUnion.d.ts +0 -0
  316. /package/{types → esm}/types/taggedUnion.d.ts.map +0 -0
  317. /package/{types → esm}/util/phantoms.d.ts +0 -0
  318. /package/{types → esm}/util/phantoms.d.ts.map +0 -0
  319. /package/{types → esm}/util/recombineTaggedTemplateArgs.d.ts +0 -0
  320. /package/{types → esm}/util/recombineTaggedTemplateArgs.d.ts.map +0 -0
@@ -1,184 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- // This module is browser compatible.
3
- import * as dntShim from "../../../../../_dnt.shims.js";
4
- function isKeyedCollection(x) {
5
- return x instanceof Set || x instanceof Map;
6
- }
7
- function prototypesEqual(a, b) {
8
- const pa = Object.getPrototypeOf(a);
9
- const pb = Object.getPrototypeOf(b);
10
- return pa === pb ||
11
- pa === Object.prototype && pb === null ||
12
- pa === null && pb === Object.prototype;
13
- }
14
- function isBasicObjectOrArray(obj) {
15
- const proto = Object.getPrototypeOf(obj);
16
- return proto === null || proto === Object.prototype ||
17
- proto === Array.prototype;
18
- }
19
- // Slightly faster than Reflect.ownKeys in V8 as of 12.9.202.13-rusty (2024-10-28)
20
- function ownKeys(obj) {
21
- return [
22
- ...Object.getOwnPropertyNames(obj),
23
- ...Object.getOwnPropertySymbols(obj),
24
- ];
25
- }
26
- function getKeysDeep(obj) {
27
- const keys = new Set();
28
- while (obj !== Object.prototype && obj !== Array.prototype && obj != null) {
29
- for (const key of ownKeys(obj)) {
30
- keys.add(key);
31
- }
32
- obj = Object.getPrototypeOf(obj);
33
- }
34
- return keys;
35
- }
36
- // deno-lint-ignore no-explicit-any
37
- const Temporal = dntShim.dntGlobalThis.Temporal ??
38
- new Proxy({}, { get: () => { } });
39
- /** A non-exhaustive list of prototypes that can be accurately fast-path compared with `String(instance)` */
40
- const stringComparablePrototypes = new Set([
41
- Intl.Locale,
42
- RegExp,
43
- Temporal.Duration,
44
- Temporal.Instant,
45
- Temporal.PlainDate,
46
- Temporal.PlainDateTime,
47
- Temporal.PlainTime,
48
- Temporal.PlainYearMonth,
49
- Temporal.PlainMonthDay,
50
- Temporal.ZonedDateTime,
51
- URL,
52
- URLSearchParams,
53
- ].filter((x) => x != null).map((x) => x.prototype));
54
- function isPrimitive(x) {
55
- return typeof x === "string" ||
56
- typeof x === "number" ||
57
- typeof x === "boolean" ||
58
- typeof x === "bigint" ||
59
- typeof x === "symbol" ||
60
- x == null;
61
- }
62
- const TypedArray = Object.getPrototypeOf(Uint8Array);
63
- function compareTypedArrays(a, b) {
64
- if (a.length !== b.length)
65
- return false;
66
- for (let i = 0; i < b.length; i++) {
67
- if (!sameValueZero(a[i], b[i]))
68
- return false;
69
- }
70
- return true;
71
- }
72
- /** Check both strict equality (`0 == -0`) and `Object.is` (`NaN == NaN`) */
73
- function sameValueZero(a, b) {
74
- return a === b || Object.is(a, b);
75
- }
76
- /**
77
- * Deep equality comparison used in assertions.
78
- *
79
- * @param a The actual value
80
- * @param b The expected value
81
- * @returns `true` if the values are deeply equal, `false` otherwise
82
- *
83
- * @example Usage
84
- * ```ts
85
- * import { equal } from "@std/assert/equal";
86
- *
87
- * equal({ foo: "bar" }, { foo: "bar" }); // Returns `true`
88
- * equal({ foo: "bar" }, { foo: "baz" }); // Returns `false`
89
- * ```
90
- */
91
- export function equal(a, b) {
92
- const seen = new Map();
93
- return (function compare(a, b) {
94
- if (sameValueZero(a, b))
95
- return true;
96
- if (isPrimitive(a) || isPrimitive(b))
97
- return false;
98
- if (a instanceof Date && b instanceof Date) {
99
- return Object.is(a.getTime(), b.getTime());
100
- }
101
- if (a && typeof a === "object" && b && typeof b === "object") {
102
- if (!prototypesEqual(a, b)) {
103
- return false;
104
- }
105
- if (a instanceof TypedArray) {
106
- return compareTypedArrays(a, b);
107
- }
108
- if (a instanceof WeakMap) {
109
- throw new TypeError("cannot compare WeakMap instances");
110
- }
111
- if (a instanceof WeakSet) {
112
- throw new TypeError("cannot compare WeakSet instances");
113
- }
114
- if (a instanceof WeakRef) {
115
- return compare(a.deref(), b.deref());
116
- }
117
- if (seen.get(a) === b) {
118
- return true;
119
- }
120
- if (Object.keys(a).length !== Object.keys(b).length) {
121
- return false;
122
- }
123
- seen.set(a, b);
124
- if (isKeyedCollection(a) && isKeyedCollection(b)) {
125
- if (a.size !== b.size) {
126
- return false;
127
- }
128
- const aKeys = [...a.keys()];
129
- const primitiveKeysFastPath = aKeys.every(isPrimitive);
130
- if (primitiveKeysFastPath) {
131
- if (a instanceof Set) {
132
- return a.symmetricDifference(b).size === 0;
133
- }
134
- for (const key of aKeys) {
135
- if (!b.has(key) ||
136
- !compare(a.get(key), b.get(key))) {
137
- return false;
138
- }
139
- }
140
- return true;
141
- }
142
- let unmatchedEntries = a.size;
143
- for (const [aKey, aValue] of a.entries()) {
144
- for (const [bKey, bValue] of b.entries()) {
145
- /* Given that Map keys can be references, we need
146
- * to ensure that they are also deeply equal */
147
- if (!compare(aKey, bKey))
148
- continue;
149
- if ((aKey === aValue && bKey === bValue) ||
150
- (compare(aValue, bValue))) {
151
- unmatchedEntries--;
152
- break;
153
- }
154
- }
155
- }
156
- return unmatchedEntries === 0;
157
- }
158
- let keys;
159
- if (isBasicObjectOrArray(a)) {
160
- // fast path
161
- keys = ownKeys({ ...a, ...b });
162
- }
163
- else if (stringComparablePrototypes.has(Object.getPrototypeOf(a))) {
164
- // medium path
165
- return String(a) === String(b);
166
- }
167
- else {
168
- // slow path
169
- keys = getKeysDeep(a).union(getKeysDeep(b));
170
- }
171
- for (const key of keys) {
172
- if (!compare(a[key], b[key])) {
173
- return false;
174
- }
175
- if (((key in a) && (!(key in b))) || ((key in b) && (!(key in a)))) {
176
- return false;
177
- }
178
- }
179
- return true;
180
- }
181
- return false;
182
- })(a, b);
183
- }
184
- //# sourceMappingURL=equal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"equal.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/equal.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,KAAK,OAAO,MAAM,8BA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CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9C,CAAC;YAED,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;gBAEvB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAU,CAAC,EAAE,CAAC,CAAC,GAAU,CAAC,CAAC,EAAE,CAAC;oBAC3C,OAAO,KAAK,CAAC;gBACf,CAAC;gBACD,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBACnE,OAAO,KAAK,CAAC;gBACf,CAAC;YACH,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACX,CAAC"}
@@ -1,46 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- // This module is browser compatible.
3
- import { equal } from "./equal.js";
4
- import { buildMessage } from "../../internal/1.0.5/build_message.js";
5
- import { diff } from "../../internal/1.0.5/diff.js";
6
- import { diffStr } from "../../internal/1.0.5/diff_str.js";
7
- import { format } from "../../internal/1.0.5/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
- * @example Usage
17
- * ```ts ignore
18
- * import { assertEquals } from "@std/assert";
19
- *
20
- * assertEquals("world", "world"); // Doesn't throw
21
- * assertEquals("hello", "world"); // Throws
22
- * ```
23
- *
24
- * @typeParam T The type of the values to compare. This is usually inferred.
25
- * @param actual The actual value to compare.
26
- * @param expected The expected value to compare.
27
- * @param msg The optional message to display if the assertion fails.
28
- */
29
- export function assertEquals(actual, expected, msg) {
30
- if (equal(actual, expected)) {
31
- return;
32
- }
33
- const msgSuffix = msg ? `: ${msg}` : ".";
34
- let message = `Values are not equal${msgSuffix}`;
35
- const actualString = format(actual);
36
- const expectedString = format(expected);
37
- const stringDiff = (typeof actual === "string") &&
38
- (typeof expected === "string");
39
- const diffResult = stringDiff
40
- ? diffStr(actual, expected)
41
- : diff(actualString.split("\n"), expectedString.split("\n"));
42
- const diffMsg = buildMessage(diffResult, { stringDiff }).join("\n");
43
- message = `${message}\n${diffMsg}`;
44
- throw new AssertionError(message);
45
- }
46
- //# sourceMappingURL=equals.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"equals.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/equals.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAS,EACT,QAAW,EACX,GAAY;IAEZ,IAAI,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO;IACT,CAAC;IACD,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,IAAI,OAAO,GAAG,uBAAuB,SAAS,EAAE,CAAC;IAEjD,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,UAAU,GAAG,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC;QAC7C,CAAC,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC;IACjC,MAAM,UAAU,GAAG,UAAU;QAC3B,CAAC,CAAC,OAAO,CAAC,MAAgB,EAAE,QAAkB,CAAC;QAC/C,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/D,MAAM,OAAO,GAAG,YAAY,CAAC,UAAU,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpE,OAAO,GAAG,GAAG,OAAO,KAAK,OAAO,EAAE,CAAC;IACnC,MAAM,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC"}
@@ -1,28 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. 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
- }
28
- //# sourceMappingURL=exists.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exists.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/exists.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAS,EACT,GAAY;IAEZ,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QAC5C,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;QACzC,GAAG;YACD,qBAAqB,MAAM,gCAAgC,SAAS,EAAE,CAAC;QACzE,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;AACH,CAAC"}
@@ -1,21 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. 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
- }
21
- //# sourceMappingURL=fail.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fail.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/fail.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,IAAI,CAAC,GAAY;IAC/B,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,MAAM,IAAI,cAAc,CAAC,mBAAmB,SAAS,EAAE,CAAC,CAAC;AAC3D,CAAC"}
@@ -1,23 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. 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
- }
23
- //# sourceMappingURL=false.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"false.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/false.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,IAAa,EAAE,GAAG,GAAG,EAAE;IACjD,IAAI,IAAI,EAAE,CAAC;QACT,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;AACH,CAAC"}
@@ -1,30 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- // This module is browser compatible.
3
- import { format } from "../../internal/1.0.5/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
- }
30
- //# sourceMappingURL=greater.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"greater.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/greater.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,aAAa,CAAI,MAAS,EAAE,QAAW,EAAE,GAAY;IACnE,IAAI,MAAM,GAAG,QAAQ;QAAE,OAAO;IAE9B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,IAAI,cAAc,CAAC,GAAG,IAAI,UAAU,YAAY,MAAM,cAAc,EAAE,CAAC,CAAC;AAChF,CAAC"}
@@ -1,30 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- // This module is browser compatible.
3
- import { format } from "../../internal/1.0.5/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
- }
30
- //# sourceMappingURL=greater_or_equal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"greater_or_equal.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAS,EACT,QAAW,EACX,GAAY;IAEZ,IAAI,MAAM,IAAI,QAAQ;QAAE,OAAO;IAE/B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,IAAI,cAAc,CACtB,GAAG,IAAI,UAAU,YAAY,OAAO,cAAc,EAAE,CACrD,CAAC;AACJ,CAAC"}
@@ -1,53 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. 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
- }
53
- //# sourceMappingURL=instance_of.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"instance_of.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/instance_of.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQtD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,gBAAgB,CAI9B,MAAe,EACf,YAAe,EACf,GAAG,GAAG,EAAE;IAER,IAAI,MAAM,YAAY,YAAY;QAAE,OAAO;IAE3C,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,MAAM,eAAe,GAAG,YAAY,CAAC,IAAI,CAAC;IAE1C,IAAI,aAAa,GAAG,EAAE,CAAC;IACvB,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,aAAa,GAAG,MAAM,CAAC;IACzB,CAAC;SAAM,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAChC,aAAa,GAAG,WAAW,CAAC;IAC9B,CAAC;SAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACtC,aAAa,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,QAAQ,CAAC;IACvD,CAAC;SAAM,CAAC;QACN,aAAa,GAAG,OAAO,MAAM,CAAC;IAChC,CAAC;IAED,IAAI,eAAe,KAAK,aAAa,EAAE,CAAC;QACtC,GAAG;YACD,yCAAyC,eAAe,IAAI,SAAS,EAAE,CAAC;IAC5E,CAAC;SAAM,IAAI,aAAa,KAAK,UAAU,EAAE,CAAC;QACxC,GAAG;YACD,yCAAyC,eAAe,oCAAoC,SAAS,EAAE,CAAC;IAC5G,CAAC;SAAM,CAAC;QACN,GAAG;YACD,yCAAyC,eAAe,cAAc,aAAa,IAAI,SAAS,EAAE,CAAC;IACvG,CAAC;IAED,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC"}
@@ -1,54 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- // This module is browser compatible.
3
- import { AssertionError } from "./assertion_error.js";
4
- import { stripAnsiCode } from "../../internal/1.0.5/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
- }
54
- //# sourceMappingURL=is_error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is_error.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/is_error.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAc;AACd,mCAAmC;AACnC,UAA+C,EAC/C,UAA4B,EAC5B,GAAY;IAEZ,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,cAAc,CACtB,yCAAyC,SAAS,EAAE,CACrD,CAAC;IACJ,CAAC;IACD,IAAI,UAAU,IAAI,CAAC,CAAC,KAAK,YAAY,UAAU,CAAC,EAAE,CAAC;QACjD,GAAG;YACD,qCAAqC,UAAU,CAAC,IAAI,eAAe,KAAK,EAAE,WAAW,EAAE,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7G,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IACD,IAAI,QAAQ,CAAC;IACb,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACnC,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,CAC9C,aAAa,CAAC,UAAU,CAAC,CAC1B,CAAC;IACJ,CAAC;IACD,IAAI,UAAU,YAAY,MAAM,EAAE,CAAC;QACjC,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,UAAU,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC5B,GAAG,GAAG,qCACJ,UAAU,YAAY,MAAM;YAC1B,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE;YACvB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAC/B,aAAa,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,SAAS,EAAE,CAAC;QAC1D,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;AACH,CAAC"}
@@ -1,29 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- // This module is browser compatible.
3
- import { format } from "../../internal/1.0.5/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
- }
29
- //# sourceMappingURL=less.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"less.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/less.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,UAAU,CAAI,MAAS,EAAE,QAAW,EAAE,GAAY;IAChE,IAAI,MAAM,GAAG,QAAQ;QAAE,OAAO;IAE9B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,IAAI,cAAc,CAAC,GAAG,IAAI,UAAU,YAAY,MAAM,cAAc,EAAE,CAAC,CAAC;AAChF,CAAC"}
@@ -1,30 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- // This module is browser compatible.
3
- import { format } from "../../internal/1.0.5/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
- }
30
- //# sourceMappingURL=less_or_equal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"less_or_equal.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/less_or_equal.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAS,EACT,QAAW,EACX,GAAY;IAEZ,IAAI,MAAM,IAAI,QAAQ;QAAE,OAAO;IAE/B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,IAAI,cAAc,CACtB,GAAG,IAAI,UAAU,YAAY,OAAO,cAAc,EAAE,CACrD,CAAC;AACJ,CAAC"}
@@ -1,27 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. 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
- }
27
- //# sourceMappingURL=match.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"match.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/match.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW,CACzB,MAAc,EACd,QAAgB,EAChB,GAAY;IAEZ,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;QAAE,OAAO;IAClC,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,GAAG,GAAG,qBAAqB,MAAM,gBAAgB,QAAQ,IAAI,SAAS,EAAE,CAAC;IACzE,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC"}