bupkis 0.18.1 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.json +1 -4
  3. package/src/assertion/assertion-types.ts +4 -4
  4. package/src/assertion/impl/sync-parametric.ts +1 -1
  5. package/src/expect.ts +0 -4
  6. package/src/guards.ts +24 -24
  7. package/src/internal-schema.ts +16 -32
  8. package/src/value-to-schema.ts +1 -1
  9. package/dist/assertion/assertion-async.cjs +0 -268
  10. package/dist/assertion/assertion-async.cjs.map +0 -1
  11. package/dist/assertion/assertion-async.d.cts +0 -40
  12. package/dist/assertion/assertion-async.d.cts.map +0 -1
  13. package/dist/assertion/assertion-async.d.ts +0 -40
  14. package/dist/assertion/assertion-async.d.ts.map +0 -1
  15. package/dist/assertion/assertion-async.js +0 -259
  16. package/dist/assertion/assertion-async.js.map +0 -1
  17. package/dist/assertion/assertion-standard-schema-async.cjs +0 -132
  18. package/dist/assertion/assertion-standard-schema-async.cjs.map +0 -1
  19. package/dist/assertion/assertion-standard-schema-async.d.cts +0 -52
  20. package/dist/assertion/assertion-standard-schema-async.d.cts.map +0 -1
  21. package/dist/assertion/assertion-standard-schema-async.d.ts +0 -52
  22. package/dist/assertion/assertion-standard-schema-async.d.ts.map +0 -1
  23. package/dist/assertion/assertion-standard-schema-async.js +0 -128
  24. package/dist/assertion/assertion-standard-schema-async.js.map +0 -1
  25. package/dist/assertion/assertion-standard-schema-sync.cjs +0 -141
  26. package/dist/assertion/assertion-standard-schema-sync.cjs.map +0 -1
  27. package/dist/assertion/assertion-standard-schema-sync.d.cts +0 -52
  28. package/dist/assertion/assertion-standard-schema-sync.d.cts.map +0 -1
  29. package/dist/assertion/assertion-standard-schema-sync.d.ts +0 -52
  30. package/dist/assertion/assertion-standard-schema-sync.d.ts.map +0 -1
  31. package/dist/assertion/assertion-standard-schema-sync.js +0 -137
  32. package/dist/assertion/assertion-standard-schema-sync.js.map +0 -1
  33. package/dist/assertion/assertion-sync.cjs +0 -284
  34. package/dist/assertion/assertion-sync.cjs.map +0 -1
  35. package/dist/assertion/assertion-sync.d.cts +0 -60
  36. package/dist/assertion/assertion-sync.d.cts.map +0 -1
  37. package/dist/assertion/assertion-sync.d.ts +0 -60
  38. package/dist/assertion/assertion-sync.d.ts.map +0 -1
  39. package/dist/assertion/assertion-sync.js +0 -275
  40. package/dist/assertion/assertion-sync.js.map +0 -1
  41. package/dist/assertion/assertion-types.cjs +0 -20
  42. package/dist/assertion/assertion-types.cjs.map +0 -1
  43. package/dist/assertion/assertion-types.d.cts +0 -1086
  44. package/dist/assertion/assertion-types.d.cts.map +0 -1
  45. package/dist/assertion/assertion-types.d.ts +0 -1086
  46. package/dist/assertion/assertion-types.d.ts.map +0 -1
  47. package/dist/assertion/assertion-types.js +0 -19
  48. package/dist/assertion/assertion-types.js.map +0 -1
  49. package/dist/assertion/assertion.cjs +0 -382
  50. package/dist/assertion/assertion.cjs.map +0 -1
  51. package/dist/assertion/assertion.d.cts +0 -109
  52. package/dist/assertion/assertion.d.cts.map +0 -1
  53. package/dist/assertion/assertion.d.ts +0 -109
  54. package/dist/assertion/assertion.d.ts.map +0 -1
  55. package/dist/assertion/assertion.js +0 -375
  56. package/dist/assertion/assertion.js.map +0 -1
  57. package/dist/assertion/create.cjs +0 -148
  58. package/dist/assertion/create.cjs.map +0 -1
  59. package/dist/assertion/create.d.cts +0 -85
  60. package/dist/assertion/create.d.cts.map +0 -1
  61. package/dist/assertion/create.d.ts +0 -85
  62. package/dist/assertion/create.d.ts.map +0 -1
  63. package/dist/assertion/create.js +0 -143
  64. package/dist/assertion/create.js.map +0 -1
  65. package/dist/assertion/format-assertion-failure.cjs +0 -63
  66. package/dist/assertion/format-assertion-failure.cjs.map +0 -1
  67. package/dist/assertion/format-assertion-failure.d.cts +0 -21
  68. package/dist/assertion/format-assertion-failure.d.cts.map +0 -1
  69. package/dist/assertion/format-assertion-failure.d.ts +0 -21
  70. package/dist/assertion/format-assertion-failure.d.ts.map +0 -1
  71. package/dist/assertion/format-assertion-failure.js +0 -59
  72. package/dist/assertion/format-assertion-failure.js.map +0 -1
  73. package/dist/assertion/impl/assertion-util.cjs +0 -68
  74. package/dist/assertion/impl/assertion-util.cjs.map +0 -1
  75. package/dist/assertion/impl/assertion-util.d.cts +0 -36
  76. package/dist/assertion/impl/assertion-util.d.cts.map +0 -1
  77. package/dist/assertion/impl/assertion-util.d.ts +0 -36
  78. package/dist/assertion/impl/assertion-util.d.ts.map +0 -1
  79. package/dist/assertion/impl/assertion-util.js +0 -62
  80. package/dist/assertion/impl/assertion-util.js.map +0 -1
  81. package/dist/assertion/impl/async-iterable.cjs +0 -627
  82. package/dist/assertion/impl/async-iterable.cjs.map +0 -1
  83. package/dist/assertion/impl/async-iterable.d.cts +0 -406
  84. package/dist/assertion/impl/async-iterable.d.cts.map +0 -1
  85. package/dist/assertion/impl/async-iterable.d.ts +0 -406
  86. package/dist/assertion/impl/async-iterable.d.ts.map +0 -1
  87. package/dist/assertion/impl/async-iterable.js +0 -624
  88. package/dist/assertion/impl/async-iterable.js.map +0 -1
  89. package/dist/assertion/impl/async-parametric.cjs +0 -412
  90. package/dist/assertion/impl/async-parametric.cjs.map +0 -1
  91. package/dist/assertion/impl/async-parametric.d.cts +0 -278
  92. package/dist/assertion/impl/async-parametric.d.cts.map +0 -1
  93. package/dist/assertion/impl/async-parametric.d.ts +0 -278
  94. package/dist/assertion/impl/async-parametric.d.ts.map +0 -1
  95. package/dist/assertion/impl/async-parametric.js +0 -409
  96. package/dist/assertion/impl/async-parametric.js.map +0 -1
  97. package/dist/assertion/impl/async.cjs +0 -56
  98. package/dist/assertion/impl/async.cjs.map +0 -1
  99. package/dist/assertion/impl/async.d.cts +0 -179
  100. package/dist/assertion/impl/async.d.cts.map +0 -1
  101. package/dist/assertion/impl/async.d.ts +0 -179
  102. package/dist/assertion/impl/async.d.ts.map +0 -1
  103. package/dist/assertion/impl/async.js +0 -39
  104. package/dist/assertion/impl/async.js.map +0 -1
  105. package/dist/assertion/impl/index.cjs +0 -37
  106. package/dist/assertion/impl/index.cjs.map +0 -1
  107. package/dist/assertion/impl/index.d.cts +0 -21
  108. package/dist/assertion/impl/index.d.cts.map +0 -1
  109. package/dist/assertion/impl/index.d.ts +0 -21
  110. package/dist/assertion/impl/index.d.ts.map +0 -1
  111. package/dist/assertion/impl/index.js +0 -21
  112. package/dist/assertion/impl/index.js.map +0 -1
  113. package/dist/assertion/impl/iteration-util.cjs +0 -297
  114. package/dist/assertion/impl/iteration-util.cjs.map +0 -1
  115. package/dist/assertion/impl/iteration-util.d.cts +0 -12
  116. package/dist/assertion/impl/iteration-util.d.cts.map +0 -1
  117. package/dist/assertion/impl/iteration-util.d.ts +0 -12
  118. package/dist/assertion/impl/iteration-util.d.ts.map +0 -1
  119. package/dist/assertion/impl/iteration-util.js +0 -282
  120. package/dist/assertion/impl/iteration-util.js.map +0 -1
  121. package/dist/assertion/impl/snapshot.cjs +0 -276
  122. package/dist/assertion/impl/snapshot.cjs.map +0 -1
  123. package/dist/assertion/impl/snapshot.d.cts +0 -278
  124. package/dist/assertion/impl/snapshot.d.cts.map +0 -1
  125. package/dist/assertion/impl/snapshot.d.ts +0 -278
  126. package/dist/assertion/impl/snapshot.d.ts.map +0 -1
  127. package/dist/assertion/impl/snapshot.js +0 -273
  128. package/dist/assertion/impl/snapshot.js.map +0 -1
  129. package/dist/assertion/impl/sync-basic.cjs +0 -553
  130. package/dist/assertion/impl/sync-basic.cjs.map +0 -1
  131. package/dist/assertion/impl/sync-basic.d.cts +0 -528
  132. package/dist/assertion/impl/sync-basic.d.cts.map +0 -1
  133. package/dist/assertion/impl/sync-basic.d.ts +0 -528
  134. package/dist/assertion/impl/sync-basic.d.ts.map +0 -1
  135. package/dist/assertion/impl/sync-basic.js +0 -550
  136. package/dist/assertion/impl/sync-basic.js.map +0 -1
  137. package/dist/assertion/impl/sync-collection.cjs +0 -856
  138. package/dist/assertion/impl/sync-collection.cjs.map +0 -1
  139. package/dist/assertion/impl/sync-collection.d.cts +0 -607
  140. package/dist/assertion/impl/sync-collection.d.cts.map +0 -1
  141. package/dist/assertion/impl/sync-collection.d.ts +0 -607
  142. package/dist/assertion/impl/sync-collection.d.ts.map +0 -1
  143. package/dist/assertion/impl/sync-collection.js +0 -850
  144. package/dist/assertion/impl/sync-collection.js.map +0 -1
  145. package/dist/assertion/impl/sync-date.cjs +0 -341
  146. package/dist/assertion/impl/sync-date.cjs.map +0 -1
  147. package/dist/assertion/impl/sync-date.d.cts +0 -209
  148. package/dist/assertion/impl/sync-date.d.cts.map +0 -1
  149. package/dist/assertion/impl/sync-date.d.ts +0 -209
  150. package/dist/assertion/impl/sync-date.d.ts.map +0 -1
  151. package/dist/assertion/impl/sync-date.js +0 -338
  152. package/dist/assertion/impl/sync-date.js.map +0 -1
  153. package/dist/assertion/impl/sync-esoteric.cjs +0 -214
  154. package/dist/assertion/impl/sync-esoteric.cjs.map +0 -1
  155. package/dist/assertion/impl/sync-esoteric.d.cts +0 -191
  156. package/dist/assertion/impl/sync-esoteric.d.cts.map +0 -1
  157. package/dist/assertion/impl/sync-esoteric.d.ts +0 -191
  158. package/dist/assertion/impl/sync-esoteric.d.ts.map +0 -1
  159. package/dist/assertion/impl/sync-esoteric.js +0 -211
  160. package/dist/assertion/impl/sync-esoteric.js.map +0 -1
  161. package/dist/assertion/impl/sync-iterable.cjs +0 -512
  162. package/dist/assertion/impl/sync-iterable.cjs.map +0 -1
  163. package/dist/assertion/impl/sync-iterable.d.cts +0 -334
  164. package/dist/assertion/impl/sync-iterable.d.cts.map +0 -1
  165. package/dist/assertion/impl/sync-iterable.d.ts +0 -334
  166. package/dist/assertion/impl/sync-iterable.d.ts.map +0 -1
  167. package/dist/assertion/impl/sync-iterable.js +0 -509
  168. package/dist/assertion/impl/sync-iterable.js.map +0 -1
  169. package/dist/assertion/impl/sync-parametric.cjs +0 -805
  170. package/dist/assertion/impl/sync-parametric.cjs.map +0 -1
  171. package/dist/assertion/impl/sync-parametric.d.cts +0 -560
  172. package/dist/assertion/impl/sync-parametric.d.cts.map +0 -1
  173. package/dist/assertion/impl/sync-parametric.d.ts +0 -560
  174. package/dist/assertion/impl/sync-parametric.d.ts.map +0 -1
  175. package/dist/assertion/impl/sync-parametric.js +0 -802
  176. package/dist/assertion/impl/sync-parametric.js.map +0 -1
  177. package/dist/assertion/impl/sync.cjs +0 -214
  178. package/dist/assertion/impl/sync.cjs.map +0 -1
  179. package/dist/assertion/impl/sync.d.cts +0 -512
  180. package/dist/assertion/impl/sync.d.cts.map +0 -1
  181. package/dist/assertion/impl/sync.d.ts +0 -512
  182. package/dist/assertion/impl/sync.d.ts.map +0 -1
  183. package/dist/assertion/impl/sync.js +0 -197
  184. package/dist/assertion/impl/sync.js.map +0 -1
  185. package/dist/assertion/index.cjs +0 -38
  186. package/dist/assertion/index.cjs.map +0 -1
  187. package/dist/assertion/index.d.cts +0 -18
  188. package/dist/assertion/index.d.cts.map +0 -1
  189. package/dist/assertion/index.d.ts +0 -18
  190. package/dist/assertion/index.d.ts.map +0 -1
  191. package/dist/assertion/index.js +0 -17
  192. package/dist/assertion/index.js.map +0 -1
  193. package/dist/assertion/slotify.cjs +0 -165
  194. package/dist/assertion/slotify.cjs.map +0 -1
  195. package/dist/assertion/slotify.d.cts +0 -11
  196. package/dist/assertion/slotify.d.cts.map +0 -1
  197. package/dist/assertion/slotify.d.ts +0 -11
  198. package/dist/assertion/slotify.d.ts.map +0 -1
  199. package/dist/assertion/slotify.js +0 -161
  200. package/dist/assertion/slotify.js.map +0 -1
  201. package/dist/bootstrap.cjs +0 -43
  202. package/dist/bootstrap.cjs.map +0 -1
  203. package/dist/bootstrap.d.cts +0 -27
  204. package/dist/bootstrap.d.cts.map +0 -1
  205. package/dist/bootstrap.d.ts +0 -27
  206. package/dist/bootstrap.d.ts.map +0 -1
  207. package/dist/bootstrap.js +0 -40
  208. package/dist/bootstrap.js.map +0 -1
  209. package/dist/constant.cjs +0 -82
  210. package/dist/constant.cjs.map +0 -1
  211. package/dist/constant.d.cts +0 -69
  212. package/dist/constant.d.cts.map +0 -1
  213. package/dist/constant.d.ts +0 -69
  214. package/dist/constant.d.ts.map +0 -1
  215. package/dist/constant.js +0 -79
  216. package/dist/constant.js.map +0 -1
  217. package/dist/diff.cjs +0 -340
  218. package/dist/diff.cjs.map +0 -1
  219. package/dist/diff.d.cts +0 -51
  220. package/dist/diff.d.cts.map +0 -1
  221. package/dist/diff.d.ts +0 -51
  222. package/dist/diff.d.ts.map +0 -1
  223. package/dist/diff.js +0 -334
  224. package/dist/diff.js.map +0 -1
  225. package/dist/error.cjs +0 -204
  226. package/dist/error.cjs.map +0 -1
  227. package/dist/error.d.cts +0 -212
  228. package/dist/error.d.cts.map +0 -1
  229. package/dist/error.d.ts +0 -212
  230. package/dist/error.d.ts.map +0 -1
  231. package/dist/error.js +0 -191
  232. package/dist/error.js.map +0 -1
  233. package/dist/expect.cjs +0 -590
  234. package/dist/expect.cjs.map +0 -1
  235. package/dist/expect.d.cts +0 -138
  236. package/dist/expect.d.cts.map +0 -1
  237. package/dist/expect.d.ts +0 -138
  238. package/dist/expect.d.ts.map +0 -1
  239. package/dist/expect.js +0 -582
  240. package/dist/expect.js.map +0 -1
  241. package/dist/guards.cjs +0 -297
  242. package/dist/guards.cjs.map +0 -1
  243. package/dist/guards.d.cts +0 -231
  244. package/dist/guards.d.cts.map +0 -1
  245. package/dist/guards.d.ts +0 -231
  246. package/dist/guards.d.ts.map +0 -1
  247. package/dist/guards.js +0 -277
  248. package/dist/guards.js.map +0 -1
  249. package/dist/index.cjs +0 -111
  250. package/dist/index.cjs.map +0 -1
  251. package/dist/index.d.cts +0 -448
  252. package/dist/index.d.cts.map +0 -1
  253. package/dist/index.d.ts +0 -448
  254. package/dist/index.d.ts.map +0 -1
  255. package/dist/index.js +0 -71
  256. package/dist/index.js.map +0 -1
  257. package/dist/internal-schema.cjs +0 -253
  258. package/dist/internal-schema.cjs.map +0 -1
  259. package/dist/internal-schema.d.cts +0 -8
  260. package/dist/internal-schema.d.cts.map +0 -1
  261. package/dist/internal-schema.d.ts +0 -8
  262. package/dist/internal-schema.d.ts.map +0 -1
  263. package/dist/internal-schema.js +0 -248
  264. package/dist/internal-schema.js.map +0 -1
  265. package/dist/metadata.cjs +0 -57
  266. package/dist/metadata.cjs.map +0 -1
  267. package/dist/metadata.d.cts +0 -27
  268. package/dist/metadata.d.cts.map +0 -1
  269. package/dist/metadata.d.ts +0 -27
  270. package/dist/metadata.d.ts.map +0 -1
  271. package/dist/metadata.js +0 -54
  272. package/dist/metadata.js.map +0 -1
  273. package/dist/schema.cjs +0 -1522
  274. package/dist/schema.cjs.map +0 -1
  275. package/dist/schema.d.cts +0 -1196
  276. package/dist/schema.d.cts.map +0 -1
  277. package/dist/schema.d.ts +0 -1196
  278. package/dist/schema.d.ts.map +0 -1
  279. package/dist/schema.js +0 -1516
  280. package/dist/schema.js.map +0 -1
  281. package/dist/snapshot/adapter.cjs +0 -31
  282. package/dist/snapshot/adapter.cjs.map +0 -1
  283. package/dist/snapshot/adapter.d.cts +0 -258
  284. package/dist/snapshot/adapter.d.cts.map +0 -1
  285. package/dist/snapshot/adapter.d.ts +0 -258
  286. package/dist/snapshot/adapter.d.ts.map +0 -1
  287. package/dist/snapshot/adapter.js +0 -27
  288. package/dist/snapshot/adapter.js.map +0 -1
  289. package/dist/snapshot/adapters/fallback.cjs +0 -453
  290. package/dist/snapshot/adapters/fallback.cjs.map +0 -1
  291. package/dist/snapshot/adapters/fallback.d.cts +0 -185
  292. package/dist/snapshot/adapters/fallback.d.cts.map +0 -1
  293. package/dist/snapshot/adapters/fallback.d.ts +0 -185
  294. package/dist/snapshot/adapters/fallback.d.ts.map +0 -1
  295. package/dist/snapshot/adapters/fallback.js +0 -446
  296. package/dist/snapshot/adapters/fallback.js.map +0 -1
  297. package/dist/snapshot/adapters/node-test.cjs +0 -301
  298. package/dist/snapshot/adapters/node-test.cjs.map +0 -1
  299. package/dist/snapshot/adapters/node-test.d.cts +0 -131
  300. package/dist/snapshot/adapters/node-test.d.cts.map +0 -1
  301. package/dist/snapshot/adapters/node-test.d.ts +0 -131
  302. package/dist/snapshot/adapters/node-test.d.ts.map +0 -1
  303. package/dist/snapshot/adapters/node-test.js +0 -297
  304. package/dist/snapshot/adapters/node-test.js.map +0 -1
  305. package/dist/snapshot/index.cjs +0 -61
  306. package/dist/snapshot/index.cjs.map +0 -1
  307. package/dist/snapshot/index.d.cts +0 -40
  308. package/dist/snapshot/index.d.cts.map +0 -1
  309. package/dist/snapshot/index.d.ts +0 -40
  310. package/dist/snapshot/index.d.ts.map +0 -1
  311. package/dist/snapshot/index.js +0 -44
  312. package/dist/snapshot/index.js.map +0 -1
  313. package/dist/snapshot/node-version.cjs +0 -49
  314. package/dist/snapshot/node-version.cjs.map +0 -1
  315. package/dist/snapshot/node-version.d.cts +0 -34
  316. package/dist/snapshot/node-version.d.cts.map +0 -1
  317. package/dist/snapshot/node-version.d.ts +0 -34
  318. package/dist/snapshot/node-version.d.ts.map +0 -1
  319. package/dist/snapshot/node-version.js +0 -44
  320. package/dist/snapshot/node-version.js.map +0 -1
  321. package/dist/snapshot/select-adapter.cjs +0 -170
  322. package/dist/snapshot/select-adapter.cjs.map +0 -1
  323. package/dist/snapshot/select-adapter.d.cts +0 -128
  324. package/dist/snapshot/select-adapter.d.cts.map +0 -1
  325. package/dist/snapshot/select-adapter.d.ts +0 -128
  326. package/dist/snapshot/select-adapter.d.ts.map +0 -1
  327. package/dist/snapshot/select-adapter.js +0 -164
  328. package/dist/snapshot/select-adapter.js.map +0 -1
  329. package/dist/snapshot/serializer.cjs +0 -246
  330. package/dist/snapshot/serializer.cjs.map +0 -1
  331. package/dist/snapshot/serializer.d.cts +0 -126
  332. package/dist/snapshot/serializer.d.cts.map +0 -1
  333. package/dist/snapshot/serializer.d.ts +0 -126
  334. package/dist/snapshot/serializer.d.ts.map +0 -1
  335. package/dist/snapshot/serializer.js +0 -238
  336. package/dist/snapshot/serializer.js.map +0 -1
  337. package/dist/standard-schema.cjs +0 -13
  338. package/dist/standard-schema.cjs.map +0 -1
  339. package/dist/standard-schema.d.cts +0 -192
  340. package/dist/standard-schema.d.cts.map +0 -1
  341. package/dist/standard-schema.d.ts +0 -192
  342. package/dist/standard-schema.d.ts.map +0 -1
  343. package/dist/standard-schema.js +0 -12
  344. package/dist/standard-schema.js.map +0 -1
  345. package/dist/types.cjs +0 -22
  346. package/dist/types.cjs.map +0 -1
  347. package/dist/types.d.cts +0 -905
  348. package/dist/types.d.cts.map +0 -1
  349. package/dist/types.d.ts +0 -905
  350. package/dist/types.d.ts.map +0 -1
  351. package/dist/types.js +0 -21
  352. package/dist/types.js.map +0 -1
  353. package/dist/use.cjs +0 -240
  354. package/dist/use.cjs.map +0 -1
  355. package/dist/use.d.cts +0 -8
  356. package/dist/use.d.cts.map +0 -1
  357. package/dist/use.d.ts +0 -8
  358. package/dist/use.d.ts.map +0 -1
  359. package/dist/use.js +0 -236
  360. package/dist/use.js.map +0 -1
  361. package/dist/util.cjs +0 -255
  362. package/dist/util.cjs.map +0 -1
  363. package/dist/util.d.cts +0 -141
  364. package/dist/util.d.cts.map +0 -1
  365. package/dist/util.d.ts +0 -141
  366. package/dist/util.d.ts.map +0 -1
  367. package/dist/util.js +0 -234
  368. package/dist/util.js.map +0 -1
  369. package/dist/value-to-schema.cjs +0 -537
  370. package/dist/value-to-schema.cjs.map +0 -1
  371. package/dist/value-to-schema.d.cts +0 -144
  372. package/dist/value-to-schema.d.cts.map +0 -1
  373. package/dist/value-to-schema.d.ts +0 -144
  374. package/dist/value-to-schema.d.ts.map +0 -1
  375. package/dist/value-to-schema.js +0 -533
  376. package/dist/value-to-schema.js.map +0 -1
package/dist/guards.d.ts DELETED
@@ -1,231 +0,0 @@
1
- /**
2
- * Type guard functions and runtime type checking utilities.
3
- *
4
- * This module provides various type guard functions for runtime type checking,
5
- * including guards for Zod schemas, constructors, {@link PromiseLike} objects,
6
- * and assertion parts. These are used throughout the library for safe type
7
- * narrowing and validation.
8
- *
9
- * @module guards
10
- * @category API
11
- * @example
12
- *
13
- * ```ts
14
- * import * as guards from 'bupkis/guards';
15
- * ```
16
- */
17
- import { type z } from 'zod';
18
- import type { PhraseLiteralChoice } from "./assertion/assertion-types.js";
19
- import type { StandardSchemaV1 } from "./standard-schema.js";
20
- import type { Constructor, ExpectItExecutor, PhraseLiteral, ZodTypeMap } from "./types.js";
21
- /**
22
- * Returns `true` if the given value looks like a Zod v4 schema, determined by
23
- * the presence of an internal {@link z.core.$ZodTypeDef} field.
24
- *
25
- * Note: This relies on Zod's internal shape and is intended for runtime
26
- * discrimination within this library.
27
- *
28
- * @template T - The specific ZodType to check for (based on def.type)
29
- * @param value - Value to test
30
- * @returns Whether the value is `ZodType`-like
31
- */
32
- export declare function isZodType<T extends keyof ZodTypeMap>(value: unknown, type: T): value is ZodTypeMap[T];
33
- /**
34
- * Returns `true` if the given value looks like a Zod v4 schema, determined by
35
- * the presence of an internal {@link z.core.$ZodTypeDef} field.
36
- *
37
- * Note: This relies on Zod's internal shape and is intended for runtime
38
- * discrimination within this library.
39
- *
40
- * @param value - Value to test
41
- * @returns Whether the value is `ZodType`-like
42
- */
43
- export declare function isZodType(value: unknown): value is z.ZodType;
44
- /**
45
- * Returns `true` if the given value implements the Standard Schema v1
46
- * interface.
47
- *
48
- * This guard checks for the presence of the `~standard` property with the
49
- * required shape (version 1, vendor, validate function). It can detect any
50
- * Standard Schema compliant library including Zod v4 (which implements the
51
- * spec).
52
- *
53
- * @function
54
- * @param value - Value to test
55
- * @returns Whether the value is a Standard Schema v1 instance
56
- * @see {@link https://standardschema.dev | Standard Schema Specification}
57
- */
58
- export declare const isStandardSchema: (value: unknown) => value is StandardSchemaV1;
59
- /**
60
- * Type guard for a plain object.
61
- *
62
- * @function
63
- * @param value Value to test
64
- * @returns `true` if the value is a plain object, `false` otherwise
65
- */
66
- export declare const isObject: (value: unknown) => value is NonNullable<object>;
67
- /**
68
- * Returns `true` if the given value is a {@link z.ZodPromise} schema.
69
- *
70
- * @function
71
- * @param value - Value to test
72
- * @returns `true` if the value is a `ZodPromise` schema; `false` otherwise
73
- */
74
- export declare const isZodPromise: (value: unknown) => value is z.ZodPromise;
75
- /**
76
- * Checks if a value is "promise-like", meaning it is a "thenable" object.
77
- *
78
- * @function
79
- * @param value - Value to test
80
- * @returns `true` if the value is promise-like, `false` otherwise
81
- */
82
- export declare const isPromiseLike: (value: unknown) => value is PromiseLike<unknown>;
83
- /**
84
- * Returns `true` if the given value is a constructable function (i.e., a
85
- * class).
86
- *
87
- * This works by wrapping `fn` in a {@link Proxy}, attaching a no-op
88
- * {@link ProxyHandler.construct} trap to it, then attempting to construct the
89
- * proxy via `new`.
90
- *
91
- * @privateRemarks
92
- * This may be the only way we can determine, at runtime, if a function is a
93
- * constructor without actually calling it. I am unsure if this only works for
94
- * classes.
95
- * @function
96
- * @param fn - Function to test
97
- * @returns Whether the function is constructable
98
- */
99
- export declare const isConstructible: (fn: unknown) => fn is Constructor;
100
- /**
101
- * Type guard for a boolean value
102
- *
103
- * @function
104
- * @param value Value to check
105
- * @returns `true` if the value is a boolean, `false` otherwise
106
- */
107
- export declare const isBoolean: (value: unknown) => value is boolean;
108
- /**
109
- * Type guard for a function value
110
- *
111
- * @function
112
- * @param value Value to check
113
- * @returns `true` if the value is a function, `false` otherwise
114
- */
115
- export declare const isFunction: (value: unknown) => value is (...args: any[]) => any;
116
- /**
117
- * Type guard for a string value
118
- *
119
- * @function
120
- * @param value Value to check
121
- * @returns `true` if the value is a string, `false` otherwise
122
- */
123
- export declare const isString: (value: unknown) => value is string;
124
- /**
125
- * Type guard for a non-null object value
126
- *
127
- * @function
128
- * @param value Value to check
129
- * @returns `true` if the value is an object and not null, `false` otherwise
130
- */
131
- export declare const isNonNullObject: (value: unknown) => value is object;
132
- /**
133
- * Type guard for a valid WeakKey (object, function, or symbol).
134
- *
135
- * WeakMaps and WeakSets can only use objects (including functions) or symbols
136
- * as keys, not primitives like strings, numbers, booleans, null, or undefined.
137
- *
138
- * @function
139
- * @param value Value to check
140
- * @returns `true` if the value is a valid WeakKey (object, function, or
141
- * symbol), `false` otherwise
142
- */
143
- export declare const isWeakKey: (value: unknown) => value is WeakKey;
144
- /**
145
- * Type guard for a {@link PhraseLiteral} or {@link PhraseLiteralChoice}.
146
- *
147
- * @function
148
- * @param value Value to check
149
- * @returns `true` if the value is a `PhraseLiteral` or `PhraseLiteralChoice`,
150
- * `false` otherwise
151
- */
152
- export declare const isPhrase: (value: unknown) => value is PhraseLiteral | PhraseLiteralChoice;
153
- /**
154
- * Generic type guard for instanceof checks.
155
- *
156
- * This function provides a type-safe way to check if a value is an instance of
157
- * a given constructor, with proper type narrowing for TypeScript. It combines
158
- * the null/object check with instanceof to ensure the value is a valid object
159
- * before performing the instance check.
160
- *
161
- * @example
162
- *
163
- * ```typescript
164
- * const obj = new Date();
165
- * if (isA(obj, Date)) {
166
- * // obj is now typed as Date
167
- * console.log(obj.getTime());
168
- * }
169
- * ```
170
- *
171
- * @template T - The constructor type to check against
172
- * @function
173
- * @param value - Value to test
174
- * @param ctor - Constructor function to check instanceof
175
- * @returns `true` if the value is an instance of the constructor, `false`
176
- * otherwise
177
- */
178
- export declare const isA: <T extends Constructor>(value: unknown, ctor: T) => value is InstanceType<T>;
179
- /**
180
- * Type guard for Error instances.
181
- *
182
- * This function checks if a value is an instance of the Error class or any of
183
- * its subclasses. It's useful for error handling and type narrowing when
184
- * working with unknown values that might be errors.
185
- *
186
- * @example
187
- *
188
- * ```typescript
189
- * try {
190
- * throw new TypeError('Something went wrong');
191
- * } catch (err) {
192
- * if (isError(err)) {
193
- * // err is now typed as Error
194
- * console.log(err.message);
195
- * }
196
- * }
197
- * ```
198
- *
199
- * @function
200
- * @param value - Value to test
201
- * @returns `true` if the value is an Error instance, `false` otherwise
202
- */
203
- export declare const isError: (value: unknown) => value is Error;
204
- /**
205
- * Type guard for {@link ExpectItExecutor} functions.
206
- *
207
- * This function checks if a value is an {@link ExpectItExecutor} function
208
- * created by {@link bupkis!expect.it | expect.it()}. {@link ExpectItExecutor}
209
- * functions are special functions that contain assertion logic and are marked
210
- * with an internal symbol for identification. They are used in nested
211
- * assertions within "to satisfy" patterns and other complex assertion
212
- * scenarios.
213
- *
214
- * @example
215
- *
216
- * ```typescript
217
- * const executor = expect.it('to be a string');
218
- * if (isExpectItExecutor(executor)) {
219
- * // executor is now typed as ExpectItExecutor
220
- * // Can be used in satisfaction patterns
221
- * }
222
- * ```
223
- *
224
- * @template Subject - The subject type that the executor function operates on
225
- * @function
226
- * @param value - Value to test
227
- * @returns `true` if the value is an ExpectItExecutor function, `false`
228
- * otherwise
229
- */
230
- export declare const isExpectItExecutor: <Subject extends z.ZodType = z.ZodUnknown>(value: unknown) => value is ExpectItExecutor<Subject>;
231
- //# sourceMappingURL=guards.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,uCAAuC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,6BAA6B;AAC7D,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,UAAU,EACX,mBAAmB;AAMpB;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,UAAU,EAClD,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,CAAC,GACN,KAAK,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;AAE1B;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC,OAAO,CAAC;AAsB9D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,OA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AAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,KAA0B,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,SAAS,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,UAAU,EACzE,OAAO,OAAO,KACb,KAAK,IAAI,gBAAgB,CAAC,OAAO,CAMnC,CAAC"}
package/dist/guards.js DELETED
@@ -1,277 +0,0 @@
1
- /**
2
- * Type guard functions and runtime type checking utilities.
3
- *
4
- * This module provides various type guard functions for runtime type checking,
5
- * including guards for Zod schemas, constructors, {@link PromiseLike} objects,
6
- * and assertion parts. These are used throughout the library for safe type
7
- * narrowing and validation.
8
- *
9
- * @module guards
10
- * @category API
11
- * @example
12
- *
13
- * ```ts
14
- * import * as guards from 'bupkis/guards';
15
- * ```
16
- */
17
- import { kExpectIt } from "./constant.js";
18
- const { isArray } = Array;
19
- export function isZodType(value, type) {
20
- const isValid = isObject(value) &&
21
- 'def' in value &&
22
- !!value.def &&
23
- typeof value.def === 'object' &&
24
- 'type' in value.def;
25
- if (!isValid) {
26
- return false;
27
- }
28
- if (type === undefined) {
29
- return true;
30
- }
31
- return value.def.type === type;
32
- }
33
- /**
34
- * Returns `true` if the given value implements the Standard Schema v1
35
- * interface.
36
- *
37
- * This guard checks for the presence of the `~standard` property with the
38
- * required shape (version 1, vendor, validate function). It can detect any
39
- * Standard Schema compliant library including Zod v4 (which implements the
40
- * spec).
41
- *
42
- * @function
43
- * @param value - Value to test
44
- * @returns Whether the value is a Standard Schema v1 instance
45
- * @see {@link https://standardschema.dev | Standard Schema Specification}
46
- */
47
- export const isStandardSchema = (value) => {
48
- return (isObject(value) &&
49
- '~standard' in value &&
50
- isObject(value['~standard']) &&
51
- 'version' in value['~standard'] &&
52
- value['~standard'].version === 1 &&
53
- 'vendor' in value['~standard'] &&
54
- typeof value['~standard'].vendor === 'string' &&
55
- 'validate' in value['~standard'] &&
56
- typeof value['~standard'].validate === 'function');
57
- };
58
- /**
59
- * Type guard for a plain object.
60
- *
61
- * @function
62
- * @param value Value to test
63
- * @returns `true` if the value is a plain object, `false` otherwise
64
- */
65
- export const isObject = (value) => {
66
- return typeof value === 'object' && value !== null && !isArray(value);
67
- };
68
- /**
69
- * Returns `true` if the given value is a {@link z.ZodPromise} schema.
70
- *
71
- * @function
72
- * @param value - Value to test
73
- * @returns `true` if the value is a `ZodPromise` schema; `false` otherwise
74
- */
75
- export const isZodPromise = (value) => isZodType(value, 'promise');
76
- /**
77
- * Checks if a value is "promise-like", meaning it is a "thenable" object.
78
- *
79
- * @function
80
- * @param value - Value to test
81
- * @returns `true` if the value is promise-like, `false` otherwise
82
- */
83
- export const isPromiseLike = (value) => isObject(value) &&
84
- 'then' in value &&
85
- isFunction(value.then) &&
86
- value.then.length > 0;
87
- /**
88
- * Returns `true` if the given value is a constructable function (i.e., a
89
- * class).
90
- *
91
- * This works by wrapping `fn` in a {@link Proxy}, attaching a no-op
92
- * {@link ProxyHandler.construct} trap to it, then attempting to construct the
93
- * proxy via `new`.
94
- *
95
- * @privateRemarks
96
- * This may be the only way we can determine, at runtime, if a function is a
97
- * constructor without actually calling it. I am unsure if this only works for
98
- * classes.
99
- * @function
100
- * @param fn - Function to test
101
- * @returns Whether the function is constructable
102
- */
103
- export const isConstructible = (fn) => {
104
- if (fn === Symbol || fn === BigInt) {
105
- return false;
106
- }
107
- try {
108
- // this will throw if there is no `[[construct]]` slot.. or so I've heard.
109
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call, custom/require-function-tag-in-arrow-functions
110
- new new Proxy(fn, { construct: () => ({}) })();
111
- return true;
112
- }
113
- catch {
114
- return false;
115
- }
116
- };
117
- /**
118
- * Type guard for a boolean value
119
- *
120
- * @function
121
- * @param value Value to check
122
- * @returns `true` if the value is a boolean, `false` otherwise
123
- */
124
- export const isBoolean = (value) => typeof value === 'boolean';
125
- /**
126
- * Type guard for a function value
127
- *
128
- * @function
129
- * @param value Value to check
130
- * @returns `true` if the value is a function, `false` otherwise
131
- */
132
- export const isFunction = (value) => typeof value === 'function';
133
- /**
134
- * Type guard for a string value
135
- *
136
- * @function
137
- * @param value Value to check
138
- * @returns `true` if the value is a string, `false` otherwise
139
- */
140
- export const isString = (value) => typeof value === 'string';
141
- /**
142
- * Type guard for a non-null object value
143
- *
144
- * @function
145
- * @param value Value to check
146
- * @returns `true` if the value is an object and not null, `false` otherwise
147
- */
148
- export const isNonNullObject = (value) => typeof value === 'object' && value !== null;
149
- /**
150
- * Type guard for a valid WeakKey (object, function, or symbol).
151
- *
152
- * WeakMaps and WeakSets can only use objects (including functions) or symbols
153
- * as keys, not primitives like strings, numbers, booleans, null, or undefined.
154
- *
155
- * @function
156
- * @param value Value to check
157
- * @returns `true` if the value is a valid WeakKey (object, function, or
158
- * symbol), `false` otherwise
159
- */
160
- export const isWeakKey = (value) => (typeof value === 'object' && value !== null) ||
161
- typeof value === 'function' ||
162
- typeof value === 'symbol';
163
- /**
164
- * Type guard for a {@link PhraseLiteral}, which is just a string that does not
165
- * begin with `not `.
166
- *
167
- * @function
168
- * @param value Value to check
169
- * @returns `true` if the value is a `PhraseLiteral`, `false` otherwise
170
- * @internal
171
- */
172
- export const isPhraseLiteral = (value) => isString(value) && value !== 'and';
173
- /**
174
- * Type guard for a {@link PhraseLiteralChoice}, which is a tuple of strings.
175
- *
176
- * @function
177
- * @param value Value to check
178
- * @returns `true` if the value is a `PhraseLiteralChoice`, `false` otherwise
179
- * @internal
180
- */
181
- export const isPhraseLiteralChoice = (value) => isArray(value) &&
182
- value.length >= 1 &&
183
- value.every((item) => isPhraseLiteral(item));
184
- /**
185
- * Type guard for a {@link PhraseLiteral} or {@link PhraseLiteralChoice}.
186
- *
187
- * @function
188
- * @param value Value to check
189
- * @returns `true` if the value is a `PhraseLiteral` or `PhraseLiteralChoice`,
190
- * `false` otherwise
191
- */
192
- export const isPhrase = (value) => isPhraseLiteral(value) || isPhraseLiteralChoice(value);
193
- /**
194
- * Generic type guard for instanceof checks.
195
- *
196
- * This function provides a type-safe way to check if a value is an instance of
197
- * a given constructor, with proper type narrowing for TypeScript. It combines
198
- * the null/object check with instanceof to ensure the value is a valid object
199
- * before performing the instance check.
200
- *
201
- * @example
202
- *
203
- * ```typescript
204
- * const obj = new Date();
205
- * if (isA(obj, Date)) {
206
- * // obj is now typed as Date
207
- * console.log(obj.getTime());
208
- * }
209
- * ```
210
- *
211
- * @template T - The constructor type to check against
212
- * @function
213
- * @param value - Value to test
214
- * @param ctor - Constructor function to check instanceof
215
- * @returns `true` if the value is an instance of the constructor, `false`
216
- * otherwise
217
- */
218
- export const isA = (value, ctor) => {
219
- return isNonNullObject(value) && value instanceof ctor;
220
- };
221
- /**
222
- * Type guard for Error instances.
223
- *
224
- * This function checks if a value is an instance of the Error class or any of
225
- * its subclasses. It's useful for error handling and type narrowing when
226
- * working with unknown values that might be errors.
227
- *
228
- * @example
229
- *
230
- * ```typescript
231
- * try {
232
- * throw new TypeError('Something went wrong');
233
- * } catch (err) {
234
- * if (isError(err)) {
235
- * // err is now typed as Error
236
- * console.log(err.message);
237
- * }
238
- * }
239
- * ```
240
- *
241
- * @function
242
- * @param value - Value to test
243
- * @returns `true` if the value is an Error instance, `false` otherwise
244
- */
245
- export const isError = (value) => isA(value, Error);
246
- /**
247
- * Type guard for {@link ExpectItExecutor} functions.
248
- *
249
- * This function checks if a value is an {@link ExpectItExecutor} function
250
- * created by {@link bupkis!expect.it | expect.it()}. {@link ExpectItExecutor}
251
- * functions are special functions that contain assertion logic and are marked
252
- * with an internal symbol for identification. They are used in nested
253
- * assertions within "to satisfy" patterns and other complex assertion
254
- * scenarios.
255
- *
256
- * @example
257
- *
258
- * ```typescript
259
- * const executor = expect.it('to be a string');
260
- * if (isExpectItExecutor(executor)) {
261
- * // executor is now typed as ExpectItExecutor
262
- * // Can be used in satisfaction patterns
263
- * }
264
- * ```
265
- *
266
- * @template Subject - The subject type that the executor function operates on
267
- * @function
268
- * @param value - Value to test
269
- * @returns `true` if the value is an ExpectItExecutor function, `false`
270
- * otherwise
271
- */
272
- export const isExpectItExecutor = (value) => {
273
- return (isFunction(value) &&
274
- kExpectIt in value &&
275
- value[kExpectIt] === true);
276
- };
277
- //# sourceMappingURL=guards.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"guards.js","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAaH,OAAO,EAAE,SAAS,EAAE,sBAAsB;AAE1C,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AA6B1B,MAAM,UAAU,SAAS,CACvB,KAAc,EACd,IAAQ;IAER,MAAM,OAAO,GACX,QAAQ,CAAC,KAAK,CAAC;QACf,KAAK,IAAI,KAAK;QACd,CAAC,CAAC,KAAK,CAAC,GAAG;QACX,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ;QAC7B,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC;IAEtB,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAQ,KAAmB,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC;AAChD,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAA6B,EAAE;IAC5E,OAAO,CACL,QAAQ,CAAC,KAAK,CAAC;QACf,WAAW,IAAI,KAAK;QACpB,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAC5B,SAAS,IAAI,KAAK,CAAC,WAAW,CAAC;QAC/B,KAAK,CAAC,WAAW,CAAC,CAAC,OAAO,KAAK,CAAC;QAChC,QAAQ,IAAI,KAAK,CAAC,WAAW,CAAC;QAC9B,OAAO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;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CACjB,KAAc,EACd,IAAO,EACmB,EAAE;IAC5B,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,KAAK,YAAY,IAAI,CAAC;AACzD,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAc,EAAkB,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,KAAc,EACsB,EAAE;IACtC,OAAO,CACL,UAAU,CAAC,KAAK,CAAC;QACjB,SAAS,IAAI,KAAK;QACjB,KAA4C,CAAC,SAAS,CAAC,KAAK,IAAI,CAClE,CAAC;AACJ,CAAC,CAAC"}
package/dist/index.cjs DELETED
@@ -1,111 +0,0 @@
1
- "use strict";
2
- /**
3
- * Main entry point for the Bupkis assertion library.
4
- *
5
- * This module exports all public APIs including the main `expect` function,
6
- * asynchronous `expectAsync` function, assertion creation utilities, type
7
- * guards, schema definitions, utility functions, and error types.
8
- *
9
- * @module bupkis
10
- * @category API
11
- * @example
12
- *
13
- * ```ts
14
- * import { expect, expectAsync, z, createAssertion } from 'bupkis';
15
- * ```
16
- *
17
- * {@link https://zod.dev | Zod v4} is exported as `z` if you aren't already
18
- * using a {@link https://standardschema.dev | Standard Schema V1}-compatible
19
- * validation library.
20
- */
21
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
22
- if (k2 === undefined) k2 = k;
23
- var desc = Object.getOwnPropertyDescriptor(m, k);
24
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
25
- desc = { enumerable: true, get: function() { return m[k]; } };
26
- }
27
- Object.defineProperty(o, k2, desc);
28
- }) : (function(o, m, k, k2) {
29
- if (k2 === undefined) k2 = k;
30
- o[k2] = m[k];
31
- }));
32
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
33
- Object.defineProperty(o, "default", { enumerable: true, value: v });
34
- }) : function(o, v) {
35
- o["default"] = v;
36
- });
37
- var __importStar = (this && this.__importStar) || (function () {
38
- var ownKeys = function(o) {
39
- ownKeys = Object.getOwnPropertyNames || function (o) {
40
- var ar = [];
41
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
42
- return ar;
43
- };
44
- return ownKeys(o);
45
- };
46
- return function (mod) {
47
- if (mod && mod.__esModule) return mod;
48
- var result = {};
49
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
50
- __setModuleDefault(result, mod);
51
- return result;
52
- };
53
- })();
54
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
55
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
56
- };
57
- Object.defineProperty(exports, "__esModule", { value: true });
58
- exports.use = exports.fail = exports.createAsyncAssertion = exports.createAssertion = exports.z = exports.schema = exports.expectAsync = exports.expect = exports.assertions = void 0;
59
- const zod_1 = require("zod");
60
- Object.defineProperty(exports, "z", { enumerable: true, get: function () { return zod_1.z; } });
61
- const bootstrap_js_1 = require("./bootstrap.cjs");
62
- exports.assertions = __importStar(require("./assertion/impl/index.cjs"));
63
- var bootstrap_js_2 = require("./bootstrap.cjs");
64
- Object.defineProperty(exports, "expect", { enumerable: true, get: function () { return bootstrap_js_2.expect; } });
65
- Object.defineProperty(exports, "expectAsync", { enumerable: true, get: function () { return bootstrap_js_2.expectAsync; } });
66
- __exportStar(require("./error.cjs"), exports);
67
- exports.schema = __importStar(require("./schema.cjs"));
68
- const {
69
- /**
70
- * The main factory function for creating asynchronous assertions.
71
- *
72
- * Exported from the entry point; is also a property of {@link Expect} and
73
- * {@link ExpectAsync}.
74
- *
75
- * @function
76
- * @primaryExport
77
- * @group Core API
78
- */
79
- createAssertion,
80
- /**
81
- * The main factory function for creating asynchronous assertions.
82
- *
83
- * Exported from the entry point; is also a property of {@link Expect} and
84
- * {@link ExpectAsync}.
85
- *
86
- * @function
87
- * @primaryExport
88
- * @group Core API
89
- */
90
- createAsyncAssertion,
91
- /**
92
- * {@inheritDoc FailFn}
93
- *
94
- * @function
95
- * @primaryExport
96
- * @group Core API
97
- */
98
- fail,
99
- /**
100
- * {@inheritDoc UseFn}
101
- *
102
- * @function
103
- * @primaryExport
104
- * @group Core API
105
- */
106
- use, ..._rest } = bootstrap_js_1.expect;
107
- exports.createAssertion = createAssertion;
108
- exports.createAsyncAssertion = createAsyncAssertion;
109
- exports.fail = fail;
110
- exports.use = use;
111
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6BAAwB;AAgCf,kFAhCA,OAAC,OAgCA;AA9BV,kDAA6D;AAC7D,yEAAwD;AACxD,gDAAqD;AAA5C,sGAAA,MAAM,OAAA;AAAE,2GAAA,WAAW,OAAA;AAQ5B,8CAA2B;AAE3B,uDAAsC;AA2DtC,MAAM;AACJ;;;;;;;;;GASG;AACH,eAAe;AACf;;;;;;;;;GASG;AACH,oBAAoB;AACpB;;;;;;GAMG;AACH,IAAI;AACJ;;;;;;GAMG;AACH,GAAG,EACH,GAAG,KAAK,EACT,GAAG,qBAAiB,CAAC;AAzCb,0CAAe;AAAE,oDAAoB;AAAE,oBAAI;AAAE,kBAAG"}