hein 2.0.0-alpha.1 → 2.0.0-alpha.3

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 (413) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +34 -0
  2. package/dist/assert/deep-equal.cjs +40 -0
  3. package/dist/assert/deep-equal.cjs.map +1 -0
  4. package/dist/assert/deep-equal.d.cts +5 -0
  5. package/dist/assert/deep-equal.d.cts.map +1 -0
  6. package/dist/assert/deep-equal.d.ts +5 -0
  7. package/dist/assert/deep-equal.d.ts.map +1 -0
  8. package/dist/assert/deep-equal.js +36 -0
  9. package/dist/assert/deep-equal.js.map +1 -0
  10. package/dist/assert/deep-has-property.cjs +68 -0
  11. package/dist/assert/deep-has-property.cjs.map +1 -0
  12. package/dist/assert/deep-has-property.d.cts +22 -0
  13. package/dist/assert/deep-has-property.d.cts.map +1 -0
  14. package/dist/assert/deep-has-property.d.ts +22 -0
  15. package/dist/assert/deep-has-property.d.ts.map +1 -0
  16. package/dist/assert/deep-has-property.js +63 -0
  17. package/dist/assert/deep-has-property.js.map +1 -0
  18. package/dist/assert/ends-with.cjs +30 -0
  19. package/dist/assert/ends-with.cjs.map +1 -0
  20. package/dist/assert/ends-with.d.cts +13 -0
  21. package/dist/assert/ends-with.d.cts.map +1 -0
  22. package/dist/assert/ends-with.d.ts +13 -0
  23. package/dist/assert/ends-with.d.ts.map +1 -0
  24. package/dist/assert/ends-with.js +27 -0
  25. package/dist/assert/ends-with.js.map +1 -0
  26. package/dist/assert/equal.cjs +37 -0
  27. package/dist/assert/equal.cjs.map +1 -0
  28. package/dist/assert/equal.d.cts +11 -0
  29. package/dist/assert/equal.d.cts.map +1 -0
  30. package/dist/assert/equal.d.ts +11 -0
  31. package/dist/assert/equal.d.ts.map +1 -0
  32. package/dist/assert/equal.js +34 -0
  33. package/dist/assert/equal.js.map +1 -0
  34. package/dist/assert/greater-than-equal.cjs +32 -0
  35. package/dist/assert/greater-than-equal.cjs.map +1 -0
  36. package/dist/assert/greater-than-equal.d.cts +11 -0
  37. package/dist/assert/greater-than-equal.d.cts.map +1 -0
  38. package/dist/assert/greater-than-equal.d.ts +11 -0
  39. package/dist/assert/greater-than-equal.d.ts.map +1 -0
  40. package/dist/assert/greater-than-equal.js +29 -0
  41. package/dist/assert/greater-than-equal.js.map +1 -0
  42. package/dist/assert/greater-than.cjs +33 -0
  43. package/dist/assert/greater-than.cjs.map +1 -0
  44. package/dist/assert/greater-than.d.cts +11 -0
  45. package/dist/assert/greater-than.d.cts.map +1 -0
  46. package/dist/assert/greater-than.d.ts +11 -0
  47. package/dist/assert/greater-than.d.ts.map +1 -0
  48. package/dist/assert/greater-than.js +30 -0
  49. package/dist/assert/greater-than.js.map +1 -0
  50. package/dist/assert/has-keys.cjs +58 -0
  51. package/dist/assert/has-keys.cjs.map +1 -0
  52. package/dist/assert/has-keys.d.cts +16 -0
  53. package/dist/assert/has-keys.d.cts.map +1 -0
  54. package/dist/assert/has-keys.d.ts +16 -0
  55. package/dist/assert/has-keys.d.ts.map +1 -0
  56. package/dist/assert/has-keys.js +54 -0
  57. package/dist/assert/has-keys.js.map +1 -0
  58. package/dist/assert/has-members.cjs +67 -0
  59. package/dist/assert/has-members.cjs.map +1 -0
  60. package/dist/assert/has-members.d.cts +48 -0
  61. package/dist/assert/has-members.d.cts.map +1 -0
  62. package/dist/assert/has-members.d.ts +48 -0
  63. package/dist/assert/has-members.d.ts.map +1 -0
  64. package/dist/assert/has-members.js +64 -0
  65. package/dist/assert/has-members.js.map +1 -0
  66. package/dist/assert/has-property.cjs +61 -0
  67. package/dist/assert/has-property.cjs.map +1 -0
  68. package/dist/assert/has-property.d.cts +22 -0
  69. package/dist/assert/has-property.d.cts.map +1 -0
  70. package/dist/assert/has-property.d.ts +22 -0
  71. package/dist/assert/has-property.d.ts.map +1 -0
  72. package/dist/assert/has-property.js +58 -0
  73. package/dist/assert/has-property.js.map +1 -0
  74. package/dist/assert/has-size.cjs +122 -0
  75. package/dist/assert/has-size.cjs.map +1 -0
  76. package/dist/assert/has-size.d.cts +42 -0
  77. package/dist/assert/has-size.d.cts.map +1 -0
  78. package/dist/assert/has-size.d.ts +42 -0
  79. package/dist/assert/has-size.d.ts.map +1 -0
  80. package/dist/assert/has-size.js +118 -0
  81. package/dist/assert/has-size.js.map +1 -0
  82. package/dist/assert/in-ballpark.cjs +44 -0
  83. package/dist/assert/in-ballpark.cjs.map +1 -0
  84. package/dist/assert/in-ballpark.d.cts +16 -0
  85. package/dist/assert/in-ballpark.d.cts.map +1 -0
  86. package/dist/assert/in-ballpark.d.ts +16 -0
  87. package/dist/assert/in-ballpark.d.ts.map +1 -0
  88. package/dist/assert/in-ballpark.js +41 -0
  89. package/dist/assert/in-ballpark.js.map +1 -0
  90. package/dist/assert/includes.cjs +30 -0
  91. package/dist/assert/includes.cjs.map +1 -0
  92. package/dist/assert/includes.d.cts +24 -0
  93. package/dist/assert/includes.d.cts.map +1 -0
  94. package/dist/assert/includes.d.ts +24 -0
  95. package/dist/assert/includes.d.ts.map +1 -0
  96. package/dist/assert/includes.js +27 -0
  97. package/dist/assert/includes.js.map +1 -0
  98. package/dist/assert/instance-of.cjs +36 -0
  99. package/dist/assert/instance-of.cjs.map +1 -0
  100. package/dist/assert/instance-of.d.cts +16 -0
  101. package/dist/assert/instance-of.d.cts.map +1 -0
  102. package/dist/assert/instance-of.d.ts +16 -0
  103. package/dist/assert/instance-of.d.ts.map +1 -0
  104. package/dist/assert/instance-of.js +32 -0
  105. package/dist/assert/instance-of.js.map +1 -0
  106. package/dist/assert/is-after.cjs +29 -0
  107. package/dist/assert/is-after.cjs.map +1 -0
  108. package/dist/assert/is-after.d.cts +11 -0
  109. package/dist/assert/is-after.d.cts.map +1 -0
  110. package/dist/assert/is-after.d.ts +11 -0
  111. package/dist/assert/is-after.d.ts.map +1 -0
  112. package/dist/assert/is-after.js +26 -0
  113. package/dist/assert/is-after.js.map +1 -0
  114. package/dist/assert/is-before.cjs +29 -0
  115. package/dist/assert/is-before.cjs.map +1 -0
  116. package/dist/assert/is-before.d.cts +11 -0
  117. package/dist/assert/is-before.d.cts.map +1 -0
  118. package/dist/assert/is-before.d.ts +11 -0
  119. package/dist/assert/is-before.d.ts.map +1 -0
  120. package/dist/assert/is-before.js +26 -0
  121. package/dist/assert/is-before.js.map +1 -0
  122. package/dist/assert/is-between.cjs +47 -0
  123. package/dist/assert/is-between.cjs.map +1 -0
  124. package/dist/assert/is-between.d.cts +15 -0
  125. package/dist/assert/is-between.d.cts.map +1 -0
  126. package/dist/assert/is-between.d.ts +15 -0
  127. package/dist/assert/is-between.d.ts.map +1 -0
  128. package/dist/assert/is-between.js +44 -0
  129. package/dist/assert/is-between.js.map +1 -0
  130. package/dist/assert/is-empty.cjs +98 -0
  131. package/dist/assert/is-empty.cjs.map +1 -0
  132. package/dist/assert/is-empty.d.cts +31 -0
  133. package/dist/assert/is-empty.d.cts.map +1 -0
  134. package/dist/assert/is-empty.d.ts +31 -0
  135. package/dist/assert/is-empty.d.ts.map +1 -0
  136. package/dist/assert/is-empty.js +94 -0
  137. package/dist/assert/is-empty.js.map +1 -0
  138. package/dist/assert/is-type.cjs +34 -0
  139. package/dist/assert/is-type.cjs.map +1 -0
  140. package/dist/assert/is-type.d.cts +97 -0
  141. package/dist/assert/is-type.d.cts.map +1 -0
  142. package/dist/assert/is-type.d.ts +97 -0
  143. package/dist/assert/is-type.d.ts.map +1 -0
  144. package/dist/assert/is-type.js +31 -0
  145. package/dist/assert/is-type.js.map +1 -0
  146. package/dist/assert/less-than-equal.cjs +36 -0
  147. package/dist/assert/less-than-equal.cjs.map +1 -0
  148. package/dist/assert/less-than-equal.d.cts +11 -0
  149. package/dist/assert/less-than-equal.d.cts.map +1 -0
  150. package/dist/assert/less-than-equal.d.ts +11 -0
  151. package/dist/assert/less-than-equal.d.ts.map +1 -0
  152. package/dist/assert/less-than-equal.js +33 -0
  153. package/dist/assert/less-than-equal.js.map +1 -0
  154. package/dist/assert/less-than.cjs +34 -0
  155. package/dist/assert/less-than.cjs.map +1 -0
  156. package/dist/assert/less-than.d.cts +11 -0
  157. package/dist/assert/less-than.d.cts.map +1 -0
  158. package/dist/assert/less-than.d.ts +11 -0
  159. package/dist/assert/less-than.d.ts.map +1 -0
  160. package/dist/assert/less-than.js +31 -0
  161. package/dist/assert/less-than.js.map +1 -0
  162. package/dist/assert/match.cjs +31 -0
  163. package/dist/assert/match.cjs.map +1 -0
  164. package/dist/assert/match.d.cts +15 -0
  165. package/dist/assert/match.d.cts.map +1 -0
  166. package/dist/assert/match.d.ts +15 -0
  167. package/dist/assert/match.d.ts.map +1 -0
  168. package/dist/assert/match.js +28 -0
  169. package/dist/assert/match.js.map +1 -0
  170. package/dist/assert/rejects.cjs +49 -0
  171. package/dist/assert/rejects.cjs.map +1 -0
  172. package/dist/assert/rejects.d.cts +36 -0
  173. package/dist/assert/rejects.d.cts.map +1 -0
  174. package/dist/assert/rejects.d.ts +36 -0
  175. package/dist/assert/rejects.d.ts.map +1 -0
  176. package/dist/assert/rejects.js +46 -0
  177. package/dist/assert/rejects.js.map +1 -0
  178. package/dist/assert/round-to.cjs +54 -0
  179. package/dist/assert/round-to.cjs.map +1 -0
  180. package/dist/assert/round-to.d.cts +15 -0
  181. package/dist/assert/round-to.d.cts.map +1 -0
  182. package/dist/assert/round-to.d.ts +15 -0
  183. package/dist/assert/round-to.d.ts.map +1 -0
  184. package/dist/assert/round-to.js +51 -0
  185. package/dist/assert/round-to.js.map +1 -0
  186. package/dist/assert/starts-with.cjs +30 -0
  187. package/dist/assert/starts-with.cjs.map +1 -0
  188. package/dist/assert/starts-with.d.cts +14 -0
  189. package/dist/assert/starts-with.d.cts.map +1 -0
  190. package/dist/assert/starts-with.d.ts +14 -0
  191. package/dist/assert/starts-with.d.ts.map +1 -0
  192. package/dist/assert/starts-with.js +27 -0
  193. package/dist/assert/starts-with.js.map +1 -0
  194. package/dist/assert/throws.cjs +41 -0
  195. package/dist/assert/throws.cjs.map +1 -0
  196. package/dist/{throws-CYLYG7gu.d.cts → assert/throws.d.cts} +4 -11
  197. package/dist/assert/throws.d.cts.map +1 -0
  198. package/dist/{throws-BlzO4xvg.d.ts → assert/throws.d.ts} +3 -12
  199. package/dist/assert/throws.d.ts.map +1 -0
  200. package/dist/assert/throws.js +38 -0
  201. package/dist/assert/throws.js.map +1 -0
  202. package/dist/assert.cjs +143 -52
  203. package/dist/assert.cjs.map +1 -0
  204. package/dist/assert.d.cts +34 -3
  205. package/dist/assert.d.cts.map +1 -0
  206. package/dist/assert.d.ts +34 -3
  207. package/dist/assert.d.ts.map +1 -0
  208. package/dist/assert.js +87 -2
  209. package/dist/assert.js.map +1 -0
  210. package/dist/expect/after.cjs +15 -0
  211. package/dist/expect/after.cjs.map +1 -0
  212. package/dist/expect/after.js +16 -0
  213. package/dist/expect/after.js.map +1 -0
  214. package/dist/expect/ballpark.cjs +15 -0
  215. package/dist/expect/ballpark.cjs.map +1 -0
  216. package/dist/expect/ballpark.js +16 -0
  217. package/dist/expect/ballpark.js.map +1 -0
  218. package/dist/expect/before.cjs +15 -0
  219. package/dist/expect/before.cjs.map +1 -0
  220. package/dist/expect/before.js +16 -0
  221. package/dist/expect/before.js.map +1 -0
  222. package/dist/expect/between.cjs +15 -0
  223. package/dist/expect/between.cjs.map +1 -0
  224. package/dist/expect/between.js +16 -0
  225. package/dist/expect/between.js.map +1 -0
  226. package/dist/expect/empty.cjs +15 -0
  227. package/dist/expect/empty.cjs.map +1 -0
  228. package/dist/expect/empty.js +16 -0
  229. package/dist/expect/empty.js.map +1 -0
  230. package/dist/expect/end-with.cjs +15 -0
  231. package/dist/expect/end-with.cjs.map +1 -0
  232. package/dist/expect/end-with.js +16 -0
  233. package/dist/expect/end-with.js.map +1 -0
  234. package/dist/expect/eql.cjs +21 -0
  235. package/dist/expect/eql.cjs.map +1 -0
  236. package/dist/expect/eql.js +22 -0
  237. package/dist/expect/eql.js.map +1 -0
  238. package/dist/expect/equal-shorthand.cjs +34 -0
  239. package/dist/expect/equal-shorthand.cjs.map +1 -0
  240. package/dist/expect/equal-shorthand.js +33 -0
  241. package/dist/expect/equal-shorthand.js.map +1 -0
  242. package/dist/expect/equal.cjs +27 -0
  243. package/dist/expect/equal.cjs.map +1 -0
  244. package/dist/expect/equal.js +28 -0
  245. package/dist/expect/equal.js.map +1 -0
  246. package/dist/expect/excluding.cjs +19 -0
  247. package/dist/expect/excluding.cjs.map +1 -0
  248. package/dist/expect/excluding.js +18 -0
  249. package/dist/expect/excluding.js.map +1 -0
  250. package/dist/expect/greater-than-equal.cjs +25 -0
  251. package/dist/expect/greater-than-equal.cjs.map +1 -0
  252. package/dist/expect/greater-than-equal.js +26 -0
  253. package/dist/expect/greater-than-equal.js.map +1 -0
  254. package/dist/expect/greater-than.cjs +25 -0
  255. package/dist/expect/greater-than.cjs.map +1 -0
  256. package/dist/expect/greater-than.js +26 -0
  257. package/dist/expect/greater-than.js.map +1 -0
  258. package/dist/expect/has-property.cjs +20 -0
  259. package/dist/expect/has-property.cjs.map +1 -0
  260. package/dist/expect/has-property.js +21 -0
  261. package/dist/expect/has-property.js.map +1 -0
  262. package/dist/expect/include.cjs +21 -0
  263. package/dist/expect/include.cjs.map +1 -0
  264. package/dist/expect/include.js +22 -0
  265. package/dist/expect/include.js.map +1 -0
  266. package/dist/expect/instance-of-shorthand.cjs +24 -0
  267. package/dist/expect/instance-of-shorthand.cjs.map +1 -0
  268. package/dist/expect/instance-of-shorthand.js +25 -0
  269. package/dist/expect/instance-of-shorthand.js.map +1 -0
  270. package/dist/expect/instance-of.cjs +15 -0
  271. package/dist/expect/instance-of.cjs.map +1 -0
  272. package/dist/expect/instance-of.js +16 -0
  273. package/dist/expect/instance-of.js.map +1 -0
  274. package/dist/expect/keys.cjs +15 -0
  275. package/dist/expect/keys.cjs.map +1 -0
  276. package/dist/expect/keys.js +16 -0
  277. package/dist/expect/keys.js.map +1 -0
  278. package/dist/expect/length.cjs +21 -0
  279. package/dist/expect/length.cjs.map +1 -0
  280. package/dist/expect/length.js +22 -0
  281. package/dist/expect/length.js.map +1 -0
  282. package/dist/expect/less-than-equal.cjs +25 -0
  283. package/dist/expect/less-than-equal.cjs.map +1 -0
  284. package/dist/expect/less-than-equal.js +26 -0
  285. package/dist/expect/less-than-equal.js.map +1 -0
  286. package/dist/expect/less-than.cjs +25 -0
  287. package/dist/expect/less-than.cjs.map +1 -0
  288. package/dist/expect/less-than.js +26 -0
  289. package/dist/expect/less-than.js.map +1 -0
  290. package/dist/expect/match.cjs +15 -0
  291. package/dist/expect/match.cjs.map +1 -0
  292. package/dist/expect/match.js +16 -0
  293. package/dist/expect/match.js.map +1 -0
  294. package/dist/expect/members.cjs +41 -0
  295. package/dist/expect/members.cjs.map +1 -0
  296. package/dist/expect/members.js +42 -0
  297. package/dist/expect/members.js.map +1 -0
  298. package/dist/expect/reject.cjs +14 -0
  299. package/dist/expect/reject.cjs.map +1 -0
  300. package/dist/expect/reject.js +15 -0
  301. package/dist/expect/reject.js.map +1 -0
  302. package/dist/expect/round-to.cjs +15 -0
  303. package/dist/expect/round-to.cjs.map +1 -0
  304. package/dist/expect/round-to.js +16 -0
  305. package/dist/expect/round-to.js.map +1 -0
  306. package/dist/expect/start-with.cjs +15 -0
  307. package/dist/expect/start-with.cjs.map +1 -0
  308. package/dist/expect/start-with.js +16 -0
  309. package/dist/expect/start-with.js.map +1 -0
  310. package/dist/expect/throw.cjs +14 -0
  311. package/dist/expect/throw.cjs.map +1 -0
  312. package/dist/expect/throw.js +15 -0
  313. package/dist/expect/throw.js.map +1 -0
  314. package/dist/expect/type-shorthand.cjs +29 -0
  315. package/dist/expect/type-shorthand.cjs.map +1 -0
  316. package/dist/expect/type-shorthand.js +30 -0
  317. package/dist/expect/type-shorthand.js.map +1 -0
  318. package/dist/expect/type.cjs +15 -0
  319. package/dist/expect/type.cjs.map +1 -0
  320. package/dist/expect/type.js +16 -0
  321. package/dist/expect/type.js.map +1 -0
  322. package/dist/expect.cjs +144 -0
  323. package/dist/expect.cjs.map +1 -0
  324. package/dist/expect.d.cts +10 -0
  325. package/dist/expect.d.cts.map +1 -0
  326. package/dist/expect.d.ts +10 -0
  327. package/dist/expect.d.ts.map +1 -0
  328. package/dist/expect.js +141 -0
  329. package/dist/expect.js.map +1 -0
  330. package/dist/expect.types.d.cts +67 -3
  331. package/dist/expect.types.d.cts.map +1 -0
  332. package/dist/expect.types.d.ts +67 -3
  333. package/dist/expect.types.d.ts.map +1 -0
  334. package/dist/index.cjs +13 -582
  335. package/dist/index.d.cts +8 -15
  336. package/dist/index.d.ts +8 -15
  337. package/dist/index.js +8 -575
  338. package/dist/mixins.cjs +11 -0
  339. package/dist/mixins.cjs.map +1 -0
  340. package/dist/mixins.d.cts +28 -0
  341. package/dist/mixins.d.cts.map +1 -0
  342. package/dist/mixins.d.ts +28 -0
  343. package/dist/mixins.d.ts.map +1 -0
  344. package/dist/mixins.js +9 -0
  345. package/dist/mixins.js.map +1 -0
  346. package/dist/utils/chain.cjs +20 -0
  347. package/dist/utils/chain.cjs.map +1 -0
  348. package/dist/utils/chain.js +18 -0
  349. package/dist/utils/chain.js.map +1 -0
  350. package/dist/utils/fail.cjs +16 -0
  351. package/dist/utils/fail.cjs.map +1 -0
  352. package/dist/utils/fail.d.cts +9 -0
  353. package/dist/utils/fail.d.cts.map +1 -0
  354. package/dist/utils/fail.d.ts +9 -0
  355. package/dist/utils/fail.d.ts.map +1 -0
  356. package/dist/utils/fail.js +14 -0
  357. package/dist/utils/fail.js.map +1 -0
  358. package/dist/utils/get-size.cjs +17 -0
  359. package/dist/utils/get-size.cjs.map +1 -0
  360. package/dist/utils/get-size.js +15 -0
  361. package/dist/utils/get-size.js.map +1 -0
  362. package/dist/utils/get-type.cjs +12 -0
  363. package/dist/utils/get-type.cjs.map +1 -0
  364. package/dist/utils/get-type.d.cts +5 -0
  365. package/dist/utils/get-type.d.cts.map +1 -0
  366. package/dist/utils/get-type.d.ts +5 -0
  367. package/dist/utils/get-type.d.ts.map +1 -0
  368. package/dist/utils/get-type.js +11 -0
  369. package/dist/utils/get-type.js.map +1 -0
  370. package/dist/utils/match.cjs +118 -0
  371. package/dist/utils/match.cjs.map +1 -0
  372. package/dist/utils/match.d.cts +7 -0
  373. package/dist/utils/match.d.cts.map +1 -0
  374. package/dist/utils/match.d.ts +7 -0
  375. package/dist/utils/match.d.ts.map +1 -0
  376. package/dist/utils/match.js +114 -0
  377. package/dist/utils/match.js.map +1 -0
  378. package/dist/utils/process-error.cjs +86 -0
  379. package/dist/utils/process-error.cjs.map +1 -0
  380. package/dist/utils/process-error.d.cts +8 -0
  381. package/dist/utils/process-error.d.cts.map +1 -0
  382. package/dist/utils/process-error.d.ts +10 -0
  383. package/dist/utils/process-error.d.ts.map +1 -0
  384. package/dist/utils/process-error.js +85 -0
  385. package/dist/utils/process-error.js.map +1 -0
  386. package/dist/utils/validate-numeric-and-dates.cjs +20 -0
  387. package/dist/utils/validate-numeric-and-dates.cjs.map +1 -0
  388. package/dist/utils/validate-numeric-and-dates.js +18 -0
  389. package/dist/utils/validate-numeric-and-dates.js.map +1 -0
  390. package/dist/utils/xor.cjs +9 -0
  391. package/dist/utils/xor.cjs.map +1 -0
  392. package/dist/utils/xor.js +8 -0
  393. package/dist/utils/xor.js.map +1 -0
  394. package/package.json +1 -1
  395. package/dist/assert-ChQPKP5C.d.cts +0 -480
  396. package/dist/assert-ChQPKP5C.d.cts.map +0 -1
  397. package/dist/assert-CsN7srt-.d.ts +0 -478
  398. package/dist/assert-CsN7srt-.d.ts.map +0 -1
  399. package/dist/assert-DZjgWjOw.cjs +0 -1626
  400. package/dist/assert-DZjgWjOw.cjs.map +0 -1
  401. package/dist/assert-kFXp7i_B.js +0 -1260
  402. package/dist/assert-kFXp7i_B.js.map +0 -1
  403. package/dist/expect.types-CHYPdbCW.d.cts +0 -454
  404. package/dist/expect.types-CHYPdbCW.d.cts.map +0 -1
  405. package/dist/expect.types-nBq4Rg8e.d.ts +0 -454
  406. package/dist/expect.types-nBq4Rg8e.d.ts.map +0 -1
  407. package/dist/index.cjs.map +0 -1
  408. package/dist/index.d.cts.map +0 -1
  409. package/dist/index.d.ts.map +0 -1
  410. package/dist/index.js.map +0 -1
  411. package/dist/throws-BlzO4xvg.d.ts.map +0 -1
  412. package/dist/throws-CYLYG7gu.d.cts.map +0 -1
  413. /package/dist/{chunk-CTAAG5j7.js → _virtual/rolldown_runtime.js} +0 -0
@@ -0,0 +1,44 @@
1
+ import { createAssertion } from "hein-assertion-utils";
2
+
3
+ //#region src/assert/is-between.ts
4
+ const [isBetween, notBetween] = createAssertion({
5
+ messages: {
6
+ notBetween: "Expected {{= it.actual }} to be between {{= it.lesser }} and {{= it.greater }}",
7
+ not: "Expected {{= it.actual }} to not be between {{= it.lesser }} and {{= it.greater }}"
8
+ },
9
+ test: (report) => (actual, start, end, { inclusive = true } = {}) => {
10
+ const [greater, lesser] = end > start ? [end, start] : [start, end];
11
+ const inclusivelyBetween = actual <= greater && actual >= lesser;
12
+ const exclusivelyBetween = actual < greater && actual > lesser;
13
+ if (inclusive && !inclusivelyBetween) return report({
14
+ messageId: "notBetween",
15
+ status: "notok",
16
+ actual,
17
+ data: {
18
+ lesser,
19
+ greater
20
+ }
21
+ });
22
+ if (!inclusive && !exclusivelyBetween) return report({
23
+ messageId: "notBetween",
24
+ status: "notok",
25
+ actual,
26
+ data: {
27
+ lesser,
28
+ greater
29
+ }
30
+ });
31
+ return report({
32
+ status: "ok",
33
+ actual,
34
+ data: {
35
+ lesser,
36
+ greater
37
+ }
38
+ });
39
+ }
40
+ });
41
+
42
+ //#endregion
43
+ export { isBetween, notBetween };
44
+ //# sourceMappingURL=is-between.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-between.js","names":[],"sources":["../../src/assert/is-between.ts"],"sourcesContent":["import { createAssertion } from 'hein-assertion-utils';\n\ninterface IsBetweenOptions {\n inclusive?: boolean;\n}\n\ninterface IsBetween {\n /**\n * check that date is Between another date\n */\n <T extends Date>(actual: T, start: T, end: T, options?: IsBetweenOptions): void;\n <T extends number>(actual: T, start: T, end: T, options?: IsBetweenOptions): void;\n}\n\nexport const [isBetween, notBetween] = createAssertion({\n messages: {\n notBetween: 'Expected {{= it.actual }} to be between {{= it.lesser }} and {{= it.greater }}',\n not: 'Expected {{= it.actual }} to not be between {{= it.lesser }} and {{= it.greater }}'\n },\n test:\n (report): IsBetween =>\n <T extends Date | number>(actual: T, start: T, end: T, { inclusive = true }: IsBetweenOptions = {}) => {\n const [greater, lesser] = end > start ? [end, start] : [start, end];\n const inclusivelyBetween = actual <= greater && actual >= lesser;\n const exclusivelyBetween = actual < greater && actual > lesser;\n if (inclusive && !inclusivelyBetween) {\n return report({\n messageId: 'notBetween',\n status: 'notok',\n actual,\n data: { lesser, greater }\n });\n }\n if (!inclusive && !exclusivelyBetween) {\n return report({\n messageId: 'notBetween',\n status: 'notok',\n actual,\n data: { lesser, greater }\n });\n }\n return report({\n status: 'ok',\n actual,\n data: { lesser, greater }\n });\n }\n});\n"],"mappings":";;;AAcA,MAAa,CAAC,WAAW,cAAc,gBAAgB;CACnD,UAAU;EACN,YAAY;EACZ,KAAK;EACR;CACD,OACK,YACyB,QAAW,OAAU,KAAQ,EAAE,YAAY,SAA2B,EAAE,KAAK;EACnG,MAAM,CAAC,SAAS,UAAU,MAAM,QAAQ,CAAC,KAAK,MAAM,GAAG,CAAC,OAAO,IAAI;EACnE,MAAM,qBAAqB,UAAU,WAAW,UAAU;EAC1D,MAAM,qBAAqB,SAAS,WAAW,SAAS;AACxD,MAAI,aAAa,CAAC,mBACd,QAAO,OAAO;GACV,WAAW;GACX,QAAQ;GACR;GACA,MAAM;IAAE;IAAQ;IAAS;GAC5B,CAAC;AAEN,MAAI,CAAC,aAAa,CAAC,mBACf,QAAO,OAAO;GACV,WAAW;GACX,QAAQ;GACR;GACA,MAAM;IAAE;IAAQ;IAAS;GAC5B,CAAC;AAEN,SAAO,OAAO;GACV,QAAQ;GACR;GACA,MAAM;IAAE;IAAQ;IAAS;GAC5B,CAAC;;CAEb,CAAC"}
@@ -0,0 +1,98 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ let hein_assertion_utils = require("hein-assertion-utils");
3
+ hein_assertion_utils = require_rolldown_runtime.__toESM(hein_assertion_utils);
4
+ let lodash_isPlainObject_js = require("lodash/isPlainObject.js");
5
+ lodash_isPlainObject_js = require_rolldown_runtime.__toESM(lodash_isPlainObject_js);
6
+
7
+ //#region src/assert/is-empty.ts
8
+ const [isEmpty, notIsEmpty] = (0, hein_assertion_utils.createAssertion)({
9
+ messages: {
10
+ array: "Expected array to be empty",
11
+ object: "Expected object to be empty",
12
+ map: "Expected Map to be empty",
13
+ set: "Expected Set to be empty",
14
+ not: "Expected array to not be empty",
15
+ notObject: "Expected object to not be empty",
16
+ notMap: "Expected Map to not be empty",
17
+ notSet: "Expected Set to not be empty",
18
+ invalidArgument: "Expected {{= it.actual }} to be an array, object, Map, or Set"
19
+ },
20
+ test: (report) => (actual, message) => {
21
+ if (Array.isArray(actual)) {
22
+ if (actual.length === 0) return report({
23
+ message,
24
+ status: "ok",
25
+ actual,
26
+ expected: []
27
+ });
28
+ return report({
29
+ message,
30
+ status: "notok",
31
+ messageId: "array",
32
+ actual,
33
+ expected: []
34
+ });
35
+ }
36
+ if ((0, lodash_isPlainObject_js.default)(actual)) {
37
+ if (Object.keys(actual).length === 0) return report({
38
+ message,
39
+ status: "ok",
40
+ messageId: "notObject",
41
+ actual
42
+ });
43
+ return report({
44
+ message,
45
+ status: "notok",
46
+ messageId: "object",
47
+ actual,
48
+ expected: {}
49
+ });
50
+ }
51
+ if (actual instanceof Map) {
52
+ if (actual.size === 0) return report({
53
+ message,
54
+ status: "ok",
55
+ messageId: "notMap",
56
+ actual
57
+ });
58
+ return report({
59
+ message,
60
+ status: "notok",
61
+ messageId: "map",
62
+ actual,
63
+ expected: /* @__PURE__ */ new Map()
64
+ });
65
+ }
66
+ if (actual instanceof Set) {
67
+ if (actual.size === 0) return report({
68
+ message,
69
+ status: "ok",
70
+ messageId: "notSet",
71
+ actual
72
+ });
73
+ return report({
74
+ message,
75
+ status: "notok",
76
+ messageId: "set",
77
+ actual
78
+ });
79
+ }
80
+ report({
81
+ message,
82
+ status: "notok",
83
+ messageId: "invalidArgument",
84
+ actual
85
+ });
86
+ report({
87
+ message,
88
+ status: "ok",
89
+ messageId: "invalidArgument",
90
+ actual
91
+ });
92
+ }
93
+ });
94
+
95
+ //#endregion
96
+ exports.isEmpty = isEmpty;
97
+ exports.notIsEmpty = notIsEmpty;
98
+ //# sourceMappingURL=is-empty.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-empty.cjs","names":[],"sources":["../../src/assert/is-empty.ts"],"sourcesContent":["import isPlainObject from 'lodash/isPlainObject.js';\nimport { createAssertion } from 'hein-assertion-utils';\n\ninterface IsEmpty {\n /**\n * check if array is empty\n * @param array\n * @example isEmpty([]);\n */\n <T>(array: T[], message?: string): void;\n /**\n * check if object is empty\n * @param object\n * @example isEmpty({});\n */\n (object: Record<string, unknown>, message?: string): void;\n /**\n * check if Map is empty\n * @param map\n * @example isEmpty(new Map());\n */\n <K, V>(map: Map<K, V>, message?: string): void;\n /**\n * check if Set is empty\n * @param set\n * @example isEmpty(new Set());\n */\n <T>(set: Set<T>, message?: string): void;\n}\n\nexport const [isEmpty, notIsEmpty] = createAssertion({\n messages: {\n array: 'Expected array to be empty',\n object: 'Expected object to be empty',\n map: 'Expected Map to be empty',\n set: 'Expected Set to be empty',\n not: 'Expected array to not be empty',\n notObject: 'Expected object to not be empty',\n notMap: 'Expected Map to not be empty',\n notSet: 'Expected Set to not be empty',\n invalidArgument: 'Expected {{= it.actual }} to be an array, object, Map, or Set'\n },\n test:\n (report): IsEmpty =>\n <T>(actual: T, message?: string) => {\n if (Array.isArray(actual)) {\n if (actual.length === 0) {\n return report({ message, status: 'ok', actual, expected: [] as any });\n }\n return report({ message, status: 'notok', messageId: 'array', actual, expected: [] as any });\n }\n if (isPlainObject(actual)) {\n if (Object.keys(actual).length === 0) {\n return report({ message, status: 'ok', messageId: 'notObject', actual });\n }\n return report({ message, status: 'notok', messageId: 'object', actual, expected: {} });\n }\n if (actual instanceof Map) {\n if (actual.size === 0) {\n return report({ message, status: 'ok', messageId: 'notMap', actual });\n }\n return report({ message, status: 'notok', messageId: 'map', actual, expected: new Map() });\n }\n if (actual instanceof Set) {\n if (actual.size === 0) {\n return report({ message, status: 'ok', messageId: 'notSet', actual });\n }\n return report({ message, status: 'notok', messageId: 'set', actual });\n }\n report({ message, status: 'notok', messageId: 'invalidArgument', actual });\n report({ message, status: 'ok', messageId: 'invalidArgument', actual });\n }\n});\n"],"mappings":";;;;;;;AA8BA,MAAa,CAAC,SAAS,wDAA8B;CACjD,UAAU;EACN,OAAO;EACP,QAAQ;EACR,KAAK;EACL,KAAK;EACL,KAAK;EACL,WAAW;EACX,QAAQ;EACR,QAAQ;EACR,iBAAiB;EACpB;CACD,OACK,YACG,QAAW,YAAqB;AAChC,MAAI,MAAM,QAAQ,OAAO,EAAE;AACvB,OAAI,OAAO,WAAW,EAClB,QAAO,OAAO;IAAE;IAAS,QAAQ;IAAM;IAAQ,UAAU,EAAE;IAAS,CAAC;AAEzE,UAAO,OAAO;IAAE;IAAS,QAAQ;IAAS,WAAW;IAAS;IAAQ,UAAU,EAAE;IAAS,CAAC;;AAEhG,2CAAkB,OAAO,EAAE;AACvB,OAAI,OAAO,KAAK,OAAO,CAAC,WAAW,EAC/B,QAAO,OAAO;IAAE;IAAS,QAAQ;IAAM,WAAW;IAAa;IAAQ,CAAC;AAE5E,UAAO,OAAO;IAAE;IAAS,QAAQ;IAAS,WAAW;IAAU;IAAQ,UAAU,EAAE;IAAE,CAAC;;AAE1F,MAAI,kBAAkB,KAAK;AACvB,OAAI,OAAO,SAAS,EAChB,QAAO,OAAO;IAAE;IAAS,QAAQ;IAAM,WAAW;IAAU;IAAQ,CAAC;AAEzE,UAAO,OAAO;IAAE;IAAS,QAAQ;IAAS,WAAW;IAAO;IAAQ,0BAAU,IAAI,KAAK;IAAE,CAAC;;AAE9F,MAAI,kBAAkB,KAAK;AACvB,OAAI,OAAO,SAAS,EAChB,QAAO,OAAO;IAAE;IAAS,QAAQ;IAAM,WAAW;IAAU;IAAQ,CAAC;AAEzE,UAAO,OAAO;IAAE;IAAS,QAAQ;IAAS,WAAW;IAAO;IAAQ,CAAC;;AAEzE,SAAO;GAAE;GAAS,QAAQ;GAAS,WAAW;GAAmB;GAAQ,CAAC;AAC1E,SAAO;GAAE;GAAS,QAAQ;GAAM,WAAW;GAAmB;GAAQ,CAAC;;CAElF,CAAC"}
@@ -0,0 +1,31 @@
1
+ //#region src/assert/is-empty.d.ts
2
+ interface IsEmpty {
3
+ /**
4
+ * check if array is empty
5
+ * @param array
6
+ * @example isEmpty([]);
7
+ */
8
+ <T>(array: T[], message?: string): void;
9
+ /**
10
+ * check if object is empty
11
+ * @param object
12
+ * @example isEmpty({});
13
+ */
14
+ (object: Record<string, unknown>, message?: string): void;
15
+ /**
16
+ * check if Map is empty
17
+ * @param map
18
+ * @example isEmpty(new Map());
19
+ */
20
+ <K, V>(map: Map<K, V>, message?: string): void;
21
+ /**
22
+ * check if Set is empty
23
+ * @param set
24
+ * @example isEmpty(new Set());
25
+ */
26
+ <T>(set: Set<T>, message?: string): void;
27
+ }
28
+ declare const isEmpty: IsEmpty, notIsEmpty: IsEmpty;
29
+ //#endregion
30
+ export { isEmpty, notIsEmpty };
31
+ //# sourceMappingURL=is-empty.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-empty.d.cts","names":[],"sources":["../../src/assert/is-empty.ts"],"sourcesContent":[],"mappings":";UAGU,OAAA;EAAA;;;;;KAkBa,CAAA,KAAA,EAZR,CAYQ,EAAA,EAAA,OAAA,CAAA,EAAA,MAAA,CAAA,EAAA,IAAA;;;;;AASvB;EAAqB,CAAA,MAAA,EAfR,MAeQ,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,OAAA,CAAA,EAAA,MAAA,CAAA,EAAA,IAAA;;;;;;cATL,IAAI,GAAG;;;;;;WAMV,IAAI;;cAGH,SAAO,qBAAY"}
@@ -0,0 +1,31 @@
1
+ //#region src/assert/is-empty.d.ts
2
+ interface IsEmpty {
3
+ /**
4
+ * check if array is empty
5
+ * @param array
6
+ * @example isEmpty([]);
7
+ */
8
+ <T>(array: T[], message?: string): void;
9
+ /**
10
+ * check if object is empty
11
+ * @param object
12
+ * @example isEmpty({});
13
+ */
14
+ (object: Record<string, unknown>, message?: string): void;
15
+ /**
16
+ * check if Map is empty
17
+ * @param map
18
+ * @example isEmpty(new Map());
19
+ */
20
+ <K, V>(map: Map<K, V>, message?: string): void;
21
+ /**
22
+ * check if Set is empty
23
+ * @param set
24
+ * @example isEmpty(new Set());
25
+ */
26
+ <T>(set: Set<T>, message?: string): void;
27
+ }
28
+ declare const isEmpty: IsEmpty, notIsEmpty: IsEmpty;
29
+ //#endregion
30
+ export { isEmpty, notIsEmpty };
31
+ //# sourceMappingURL=is-empty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-empty.d.ts","names":[],"sources":["../../src/assert/is-empty.ts"],"sourcesContent":[],"mappings":";UAGU,OAAA;EAAA;;;;;KAkBa,CAAA,KAAA,EAZR,CAYQ,EAAA,EAAA,OAAA,CAAA,EAAA,MAAA,CAAA,EAAA,IAAA;;;;;AASvB;EAAqB,CAAA,MAAA,EAfR,MAeQ,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,OAAA,CAAA,EAAA,MAAA,CAAA,EAAA,IAAA;;;;;;cATL,IAAI,GAAG;;;;;;WAMV,IAAI;;cAGH,SAAO,qBAAY"}
@@ -0,0 +1,94 @@
1
+ import { createAssertion } from "hein-assertion-utils";
2
+ import isPlainObject from "lodash/isPlainObject.js";
3
+
4
+ //#region src/assert/is-empty.ts
5
+ const [isEmpty, notIsEmpty] = createAssertion({
6
+ messages: {
7
+ array: "Expected array to be empty",
8
+ object: "Expected object to be empty",
9
+ map: "Expected Map to be empty",
10
+ set: "Expected Set to be empty",
11
+ not: "Expected array to not be empty",
12
+ notObject: "Expected object to not be empty",
13
+ notMap: "Expected Map to not be empty",
14
+ notSet: "Expected Set to not be empty",
15
+ invalidArgument: "Expected {{= it.actual }} to be an array, object, Map, or Set"
16
+ },
17
+ test: (report) => (actual, message) => {
18
+ if (Array.isArray(actual)) {
19
+ if (actual.length === 0) return report({
20
+ message,
21
+ status: "ok",
22
+ actual,
23
+ expected: []
24
+ });
25
+ return report({
26
+ message,
27
+ status: "notok",
28
+ messageId: "array",
29
+ actual,
30
+ expected: []
31
+ });
32
+ }
33
+ if (isPlainObject(actual)) {
34
+ if (Object.keys(actual).length === 0) return report({
35
+ message,
36
+ status: "ok",
37
+ messageId: "notObject",
38
+ actual
39
+ });
40
+ return report({
41
+ message,
42
+ status: "notok",
43
+ messageId: "object",
44
+ actual,
45
+ expected: {}
46
+ });
47
+ }
48
+ if (actual instanceof Map) {
49
+ if (actual.size === 0) return report({
50
+ message,
51
+ status: "ok",
52
+ messageId: "notMap",
53
+ actual
54
+ });
55
+ return report({
56
+ message,
57
+ status: "notok",
58
+ messageId: "map",
59
+ actual,
60
+ expected: /* @__PURE__ */ new Map()
61
+ });
62
+ }
63
+ if (actual instanceof Set) {
64
+ if (actual.size === 0) return report({
65
+ message,
66
+ status: "ok",
67
+ messageId: "notSet",
68
+ actual
69
+ });
70
+ return report({
71
+ message,
72
+ status: "notok",
73
+ messageId: "set",
74
+ actual
75
+ });
76
+ }
77
+ report({
78
+ message,
79
+ status: "notok",
80
+ messageId: "invalidArgument",
81
+ actual
82
+ });
83
+ report({
84
+ message,
85
+ status: "ok",
86
+ messageId: "invalidArgument",
87
+ actual
88
+ });
89
+ }
90
+ });
91
+
92
+ //#endregion
93
+ export { isEmpty, notIsEmpty };
94
+ //# sourceMappingURL=is-empty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-empty.js","names":[],"sources":["../../src/assert/is-empty.ts"],"sourcesContent":["import isPlainObject from 'lodash/isPlainObject.js';\nimport { createAssertion } from 'hein-assertion-utils';\n\ninterface IsEmpty {\n /**\n * check if array is empty\n * @param array\n * @example isEmpty([]);\n */\n <T>(array: T[], message?: string): void;\n /**\n * check if object is empty\n * @param object\n * @example isEmpty({});\n */\n (object: Record<string, unknown>, message?: string): void;\n /**\n * check if Map is empty\n * @param map\n * @example isEmpty(new Map());\n */\n <K, V>(map: Map<K, V>, message?: string): void;\n /**\n * check if Set is empty\n * @param set\n * @example isEmpty(new Set());\n */\n <T>(set: Set<T>, message?: string): void;\n}\n\nexport const [isEmpty, notIsEmpty] = createAssertion({\n messages: {\n array: 'Expected array to be empty',\n object: 'Expected object to be empty',\n map: 'Expected Map to be empty',\n set: 'Expected Set to be empty',\n not: 'Expected array to not be empty',\n notObject: 'Expected object to not be empty',\n notMap: 'Expected Map to not be empty',\n notSet: 'Expected Set to not be empty',\n invalidArgument: 'Expected {{= it.actual }} to be an array, object, Map, or Set'\n },\n test:\n (report): IsEmpty =>\n <T>(actual: T, message?: string) => {\n if (Array.isArray(actual)) {\n if (actual.length === 0) {\n return report({ message, status: 'ok', actual, expected: [] as any });\n }\n return report({ message, status: 'notok', messageId: 'array', actual, expected: [] as any });\n }\n if (isPlainObject(actual)) {\n if (Object.keys(actual).length === 0) {\n return report({ message, status: 'ok', messageId: 'notObject', actual });\n }\n return report({ message, status: 'notok', messageId: 'object', actual, expected: {} });\n }\n if (actual instanceof Map) {\n if (actual.size === 0) {\n return report({ message, status: 'ok', messageId: 'notMap', actual });\n }\n return report({ message, status: 'notok', messageId: 'map', actual, expected: new Map() });\n }\n if (actual instanceof Set) {\n if (actual.size === 0) {\n return report({ message, status: 'ok', messageId: 'notSet', actual });\n }\n return report({ message, status: 'notok', messageId: 'set', actual });\n }\n report({ message, status: 'notok', messageId: 'invalidArgument', actual });\n report({ message, status: 'ok', messageId: 'invalidArgument', actual });\n }\n});\n"],"mappings":";;;;AA8BA,MAAa,CAAC,SAAS,cAAc,gBAAgB;CACjD,UAAU;EACN,OAAO;EACP,QAAQ;EACR,KAAK;EACL,KAAK;EACL,KAAK;EACL,WAAW;EACX,QAAQ;EACR,QAAQ;EACR,iBAAiB;EACpB;CACD,OACK,YACG,QAAW,YAAqB;AAChC,MAAI,MAAM,QAAQ,OAAO,EAAE;AACvB,OAAI,OAAO,WAAW,EAClB,QAAO,OAAO;IAAE;IAAS,QAAQ;IAAM;IAAQ,UAAU,EAAE;IAAS,CAAC;AAEzE,UAAO,OAAO;IAAE;IAAS,QAAQ;IAAS,WAAW;IAAS;IAAQ,UAAU,EAAE;IAAS,CAAC;;AAEhG,MAAI,cAAc,OAAO,EAAE;AACvB,OAAI,OAAO,KAAK,OAAO,CAAC,WAAW,EAC/B,QAAO,OAAO;IAAE;IAAS,QAAQ;IAAM,WAAW;IAAa;IAAQ,CAAC;AAE5E,UAAO,OAAO;IAAE;IAAS,QAAQ;IAAS,WAAW;IAAU;IAAQ,UAAU,EAAE;IAAE,CAAC;;AAE1F,MAAI,kBAAkB,KAAK;AACvB,OAAI,OAAO,SAAS,EAChB,QAAO,OAAO;IAAE;IAAS,QAAQ;IAAM,WAAW;IAAU;IAAQ,CAAC;AAEzE,UAAO,OAAO;IAAE;IAAS,QAAQ;IAAS,WAAW;IAAO;IAAQ,0BAAU,IAAI,KAAK;IAAE,CAAC;;AAE9F,MAAI,kBAAkB,KAAK;AACvB,OAAI,OAAO,SAAS,EAChB,QAAO,OAAO;IAAE;IAAS,QAAQ;IAAM,WAAW;IAAU;IAAQ,CAAC;AAEzE,UAAO,OAAO;IAAE;IAAS,QAAQ;IAAS,WAAW;IAAO;IAAQ,CAAC;;AAEzE,SAAO;GAAE;GAAS,QAAQ;GAAS,WAAW;GAAmB;GAAQ,CAAC;AAC1E,SAAO;GAAE;GAAS,QAAQ;GAAM,WAAW;GAAmB;GAAQ,CAAC;;CAElF,CAAC"}
@@ -0,0 +1,34 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ const require_get_type = require('../utils/get-type.cjs');
3
+ let hein_assertion_utils = require("hein-assertion-utils");
4
+ hein_assertion_utils = require_rolldown_runtime.__toESM(hein_assertion_utils);
5
+
6
+ //#region src/assert/is-type.ts
7
+ const [isType, notIsType] = (0, hein_assertion_utils.createAssertion)({
8
+ messages: {
9
+ wrongType: "Expected {{= it.actual }} to be a(n) {{= it.expected }}",
10
+ not: `Expected {{= it.actual }} to not be a(n) {{= it.expected }}`
11
+ },
12
+ test: (report) => (value, expectedType) => {
13
+ const actualType = require_get_type.getType(value);
14
+ if (actualType !== expectedType) return report({
15
+ status: "notok",
16
+ messageId: "wrongType",
17
+ actual: actualType,
18
+ expected: expectedType,
19
+ noStringify: true
20
+ });
21
+ return report({
22
+ status: "ok",
23
+ messageId: "not",
24
+ actual: actualType,
25
+ expected: expectedType,
26
+ noStringify: true
27
+ });
28
+ }
29
+ });
30
+
31
+ //#endregion
32
+ exports.isType = isType;
33
+ exports.notIsType = notIsType;
34
+ //# sourceMappingURL=is-type.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-type.cjs","names":["getType"],"sources":["../../src/assert/is-type.ts"],"sourcesContent":["import { createAssertion } from 'hein-assertion-utils';\nimport { type ValueType, getType } from '../utils/get-type.js';\n\ninterface IsType {\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType('foo', 'string');\n * @example isType(1, 'number');\n * @example isType(1n, 'bigint');\n * @example isType(true, 'boolean');\n * @example isType(Symbol('foo'), 'symbol');\n * @example isType(undefined, 'undefined');\n * @example isType({}, 'object');\n * @example isType(() => {}, 'function');\n * @example isType(null, 'null');\n * @example isType(NaN, 'NaN');\n * @example isType([], 'array');\n */\n (value: unknown, expectedType: ValueType): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType('foo', 'string');\n */\n (value: string, expectedType: 'string'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(1, 'number');\n * @example isType(NaN, 'NaN');\n */\n (value: number, expectedType: 'number' | 'NaN'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(1n, 'bigint');\n */\n (value: bigint, expectedType: 'bigint'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(true, 'boolean');\n */\n (value: boolean, expectedType: 'boolean'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(Symbol('foo'), 'symbol');\n */\n (value: symbol, expectedType: 'symbol'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(Symbol('foo'), 'symbol');\n */\n (value: undefined, expectedType: 'undefined'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType({}, 'object');\n */\n (value: object, expectedType: 'object'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(() => {}, 'function');\n */\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n (value: Function, expectedType: 'function'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(null, 'null');\n */\n (value: null, expectedType: 'null'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType([], 'array');\n */\n (value: any[], expectedType: 'array'): void;\n}\n\nexport const [isType, notIsType] = createAssertion({\n messages: {\n wrongType: 'Expected {{= it.actual }} to be a(n) {{= it.expected }}',\n not: `Expected {{= it.actual }} to not be a(n) {{= it.expected }}`\n },\n test:\n (report): IsType =>\n (value: any, expectedType: ValueType) => {\n const actualType = getType(value);\n if (actualType !== expectedType) {\n return report({\n status: 'notok',\n messageId: 'wrongType',\n actual: actualType,\n expected: expectedType,\n noStringify: true\n });\n }\n return report({\n status: 'ok',\n messageId: 'not',\n actual: actualType,\n expected: expectedType,\n noStringify: true\n });\n }\n});\n"],"mappings":";;;;;;AA+FA,MAAa,CAAC,QAAQ,uDAA6B;CAC/C,UAAU;EACN,WAAW;EACX,KAAK;EACR;CACD,OACK,YACA,OAAY,iBAA4B;EACrC,MAAM,aAAaA,yBAAQ,MAAM;AACjC,MAAI,eAAe,aACf,QAAO,OAAO;GACV,QAAQ;GACR,WAAW;GACX,QAAQ;GACR,UAAU;GACV,aAAa;GAChB,CAAC;AAEN,SAAO,OAAO;GACV,QAAQ;GACR,WAAW;GACX,QAAQ;GACR,UAAU;GACV,aAAa;GAChB,CAAC;;CAEb,CAAC"}
@@ -0,0 +1,97 @@
1
+ import { ValueType } from "../utils/get-type.cjs";
2
+
3
+ //#region src/assert/is-type.d.ts
4
+ interface IsType {
5
+ /**
6
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
7
+ * @param value
8
+ * @param expectedType
9
+ * @example isType('foo', 'string');
10
+ * @example isType(1, 'number');
11
+ * @example isType(1n, 'bigint');
12
+ * @example isType(true, 'boolean');
13
+ * @example isType(Symbol('foo'), 'symbol');
14
+ * @example isType(undefined, 'undefined');
15
+ * @example isType({}, 'object');
16
+ * @example isType(() => {}, 'function');
17
+ * @example isType(null, 'null');
18
+ * @example isType(NaN, 'NaN');
19
+ * @example isType([], 'array');
20
+ */
21
+ (value: unknown, expectedType: ValueType): void;
22
+ /**
23
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
24
+ * @param value
25
+ * @param expectedType
26
+ * @example isType('foo', 'string');
27
+ */
28
+ (value: string, expectedType: 'string'): void;
29
+ /**
30
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
31
+ * @param value
32
+ * @param expectedType
33
+ * @example isType(1, 'number');
34
+ * @example isType(NaN, 'NaN');
35
+ */
36
+ (value: number, expectedType: 'number' | 'NaN'): void;
37
+ /**
38
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
39
+ * @param value
40
+ * @param expectedType
41
+ * @example isType(1n, 'bigint');
42
+ */
43
+ (value: bigint, expectedType: 'bigint'): void;
44
+ /**
45
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
46
+ * @param value
47
+ * @param expectedType
48
+ * @example isType(true, 'boolean');
49
+ */
50
+ (value: boolean, expectedType: 'boolean'): void;
51
+ /**
52
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
53
+ * @param value
54
+ * @param expectedType
55
+ * @example isType(Symbol('foo'), 'symbol');
56
+ */
57
+ (value: symbol, expectedType: 'symbol'): void;
58
+ /**
59
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
60
+ * @param value
61
+ * @param expectedType
62
+ * @example isType(Symbol('foo'), 'symbol');
63
+ */
64
+ (value: undefined, expectedType: 'undefined'): void;
65
+ /**
66
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
67
+ * @param value
68
+ * @param expectedType
69
+ * @example isType({}, 'object');
70
+ */
71
+ (value: object, expectedType: 'object'): void;
72
+ /**
73
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
74
+ * @param value
75
+ * @param expectedType
76
+ * @example isType(() => {}, 'function');
77
+ */
78
+ (value: Function, expectedType: 'function'): void;
79
+ /**
80
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
81
+ * @param value
82
+ * @param expectedType
83
+ * @example isType(null, 'null');
84
+ */
85
+ (value: null, expectedType: 'null'): void;
86
+ /**
87
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
88
+ * @param value
89
+ * @param expectedType
90
+ * @example isType([], 'array');
91
+ */
92
+ (value: any[], expectedType: 'array'): void;
93
+ }
94
+ declare const isType: IsType, notIsType: IsType;
95
+ //#endregion
96
+ export { isType, notIsType };
97
+ //# sourceMappingURL=is-type.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-type.d.cts","names":[],"sources":["../../src/assert/is-type.ts"],"sourcesContent":[],"mappings":";;;UAGU,MAAA;;AAFqD;;;;;AA8F/D;;;;;;;;;;iCA3EmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA0DvB;;;;;;;;;;;;;;;;cAiBE,QAAM,mBAAW"}
@@ -0,0 +1,97 @@
1
+ import { ValueType } from "../utils/get-type.js";
2
+
3
+ //#region src/assert/is-type.d.ts
4
+ interface IsType {
5
+ /**
6
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
7
+ * @param value
8
+ * @param expectedType
9
+ * @example isType('foo', 'string');
10
+ * @example isType(1, 'number');
11
+ * @example isType(1n, 'bigint');
12
+ * @example isType(true, 'boolean');
13
+ * @example isType(Symbol('foo'), 'symbol');
14
+ * @example isType(undefined, 'undefined');
15
+ * @example isType({}, 'object');
16
+ * @example isType(() => {}, 'function');
17
+ * @example isType(null, 'null');
18
+ * @example isType(NaN, 'NaN');
19
+ * @example isType([], 'array');
20
+ */
21
+ (value: unknown, expectedType: ValueType): void;
22
+ /**
23
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
24
+ * @param value
25
+ * @param expectedType
26
+ * @example isType('foo', 'string');
27
+ */
28
+ (value: string, expectedType: 'string'): void;
29
+ /**
30
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
31
+ * @param value
32
+ * @param expectedType
33
+ * @example isType(1, 'number');
34
+ * @example isType(NaN, 'NaN');
35
+ */
36
+ (value: number, expectedType: 'number' | 'NaN'): void;
37
+ /**
38
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
39
+ * @param value
40
+ * @param expectedType
41
+ * @example isType(1n, 'bigint');
42
+ */
43
+ (value: bigint, expectedType: 'bigint'): void;
44
+ /**
45
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
46
+ * @param value
47
+ * @param expectedType
48
+ * @example isType(true, 'boolean');
49
+ */
50
+ (value: boolean, expectedType: 'boolean'): void;
51
+ /**
52
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
53
+ * @param value
54
+ * @param expectedType
55
+ * @example isType(Symbol('foo'), 'symbol');
56
+ */
57
+ (value: symbol, expectedType: 'symbol'): void;
58
+ /**
59
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
60
+ * @param value
61
+ * @param expectedType
62
+ * @example isType(Symbol('foo'), 'symbol');
63
+ */
64
+ (value: undefined, expectedType: 'undefined'): void;
65
+ /**
66
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
67
+ * @param value
68
+ * @param expectedType
69
+ * @example isType({}, 'object');
70
+ */
71
+ (value: object, expectedType: 'object'): void;
72
+ /**
73
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
74
+ * @param value
75
+ * @param expectedType
76
+ * @example isType(() => {}, 'function');
77
+ */
78
+ (value: Function, expectedType: 'function'): void;
79
+ /**
80
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
81
+ * @param value
82
+ * @param expectedType
83
+ * @example isType(null, 'null');
84
+ */
85
+ (value: null, expectedType: 'null'): void;
86
+ /**
87
+ * check if value is of a specific type, nulls, NaN and arrays are specially handled
88
+ * @param value
89
+ * @param expectedType
90
+ * @example isType([], 'array');
91
+ */
92
+ (value: any[], expectedType: 'array'): void;
93
+ }
94
+ declare const isType: IsType, notIsType: IsType;
95
+ //#endregion
96
+ export { isType, notIsType };
97
+ //# sourceMappingURL=is-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-type.d.ts","names":[],"sources":["../../src/assert/is-type.ts"],"sourcesContent":[],"mappings":";;;UAGU,MAAA;;AAFqD;;;;;AA8F/D;;;;;;;;;;iCA3EmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA0DvB;;;;;;;;;;;;;;;;cAiBE,QAAM,mBAAW"}
@@ -0,0 +1,31 @@
1
+ import { getType } from "../utils/get-type.js";
2
+ import { createAssertion } from "hein-assertion-utils";
3
+
4
+ //#region src/assert/is-type.ts
5
+ const [isType, notIsType] = createAssertion({
6
+ messages: {
7
+ wrongType: "Expected {{= it.actual }} to be a(n) {{= it.expected }}",
8
+ not: `Expected {{= it.actual }} to not be a(n) {{= it.expected }}`
9
+ },
10
+ test: (report) => (value, expectedType) => {
11
+ const actualType = getType(value);
12
+ if (actualType !== expectedType) return report({
13
+ status: "notok",
14
+ messageId: "wrongType",
15
+ actual: actualType,
16
+ expected: expectedType,
17
+ noStringify: true
18
+ });
19
+ return report({
20
+ status: "ok",
21
+ messageId: "not",
22
+ actual: actualType,
23
+ expected: expectedType,
24
+ noStringify: true
25
+ });
26
+ }
27
+ });
28
+
29
+ //#endregion
30
+ export { isType, notIsType };
31
+ //# sourceMappingURL=is-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-type.js","names":[],"sources":["../../src/assert/is-type.ts"],"sourcesContent":["import { createAssertion } from 'hein-assertion-utils';\nimport { type ValueType, getType } from '../utils/get-type.js';\n\ninterface IsType {\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType('foo', 'string');\n * @example isType(1, 'number');\n * @example isType(1n, 'bigint');\n * @example isType(true, 'boolean');\n * @example isType(Symbol('foo'), 'symbol');\n * @example isType(undefined, 'undefined');\n * @example isType({}, 'object');\n * @example isType(() => {}, 'function');\n * @example isType(null, 'null');\n * @example isType(NaN, 'NaN');\n * @example isType([], 'array');\n */\n (value: unknown, expectedType: ValueType): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType('foo', 'string');\n */\n (value: string, expectedType: 'string'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(1, 'number');\n * @example isType(NaN, 'NaN');\n */\n (value: number, expectedType: 'number' | 'NaN'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(1n, 'bigint');\n */\n (value: bigint, expectedType: 'bigint'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(true, 'boolean');\n */\n (value: boolean, expectedType: 'boolean'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(Symbol('foo'), 'symbol');\n */\n (value: symbol, expectedType: 'symbol'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(Symbol('foo'), 'symbol');\n */\n (value: undefined, expectedType: 'undefined'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType({}, 'object');\n */\n (value: object, expectedType: 'object'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(() => {}, 'function');\n */\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n (value: Function, expectedType: 'function'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(null, 'null');\n */\n (value: null, expectedType: 'null'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType([], 'array');\n */\n (value: any[], expectedType: 'array'): void;\n}\n\nexport const [isType, notIsType] = createAssertion({\n messages: {\n wrongType: 'Expected {{= it.actual }} to be a(n) {{= it.expected }}',\n not: `Expected {{= it.actual }} to not be a(n) {{= it.expected }}`\n },\n test:\n (report): IsType =>\n (value: any, expectedType: ValueType) => {\n const actualType = getType(value);\n if (actualType !== expectedType) {\n return report({\n status: 'notok',\n messageId: 'wrongType',\n actual: actualType,\n expected: expectedType,\n noStringify: true\n });\n }\n return report({\n status: 'ok',\n messageId: 'not',\n actual: actualType,\n expected: expectedType,\n noStringify: true\n });\n }\n});\n"],"mappings":";;;;AA+FA,MAAa,CAAC,QAAQ,aAAa,gBAAgB;CAC/C,UAAU;EACN,WAAW;EACX,KAAK;EACR;CACD,OACK,YACA,OAAY,iBAA4B;EACrC,MAAM,aAAa,QAAQ,MAAM;AACjC,MAAI,eAAe,aACf,QAAO,OAAO;GACV,QAAQ;GACR,WAAW;GACX,QAAQ;GACR,UAAU;GACV,aAAa;GAChB,CAAC;AAEN,SAAO,OAAO;GACV,QAAQ;GACR,WAAW;GACX,QAAQ;GACR,UAAU;GACV,aAAa;GAChB,CAAC;;CAEb,CAAC"}
@@ -0,0 +1,36 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ const require_validate_numeric_and_dates = require('../utils/validate-numeric-and-dates.cjs');
3
+ let hein_assertion_utils = require("hein-assertion-utils");
4
+ hein_assertion_utils = require_rolldown_runtime.__toESM(hein_assertion_utils);
5
+
6
+ //#region src/assert/less-than-equal.ts
7
+ const [lessThanEqual, notLessThanEqual] = (0, hein_assertion_utils.createAssertion)({
8
+ messages: {
9
+ lesserThanEqual: "Expected {{= it.actual }} to be less than or equal to {{= it.expected }}",
10
+ not: "Expected {{= it.actual }} to not be less than or equal to {{= it.expected }}"
11
+ },
12
+ test: (report) => (actual, expected, message) => {
13
+ require_validate_numeric_and_dates.validateNumericsAndDates(actual, expected);
14
+ if (actual > expected) return report({
15
+ status: "notok",
16
+ messageId: "lesserThanEqual",
17
+ actual,
18
+ expected,
19
+ message,
20
+ noStringify: true
21
+ });
22
+ return report({
23
+ status: "ok",
24
+ actual,
25
+ expected,
26
+ message,
27
+ messageId: "not",
28
+ noStringify: true
29
+ });
30
+ }
31
+ });
32
+
33
+ //#endregion
34
+ exports.lessThanEqual = lessThanEqual;
35
+ exports.notLessThanEqual = notLessThanEqual;
36
+ //# sourceMappingURL=less-than-equal.cjs.map