@zeruxjs/validator 0.0.0-stage → 0.0.1

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 (999) hide show
  1. package/LICENSE-APACHE +201 -0
  2. package/LICENSE-MIT +9 -0
  3. package/README.md +13 -2
  4. package/dist/actions/_isIsbn10.d.ts +10 -0
  5. package/dist/actions/_isIsbn10.js +18 -0
  6. package/dist/actions/_isIsbn10.js.map +1 -0
  7. package/dist/actions/_isIsbn13.d.ts +10 -0
  8. package/dist/actions/_isIsbn13.js +18 -0
  9. package/dist/actions/_isIsbn13.js.map +1 -0
  10. package/dist/actions/_isPartiallyTyped.d.ts +13 -0
  11. package/dist/actions/_isPartiallyTyped.js +45 -0
  12. package/dist/actions/_isPartiallyTyped.js.map +1 -0
  13. package/dist/actions/args.d.ts +32 -0
  14. package/dist/actions/args.js +23 -0
  15. package/dist/actions/args.js.map +1 -0
  16. package/dist/actions/argsAsync.d.ts +32 -0
  17. package/dist/actions/argsAsync.js +23 -0
  18. package/dist/actions/argsAsync.js.map +1 -0
  19. package/dist/actions/awaitAsync.d.ts +20 -0
  20. package/dist/actions/awaitAsync.js +19 -0
  21. package/dist/actions/awaitAsync.js.map +1 -0
  22. package/dist/actions/base64.d.ts +65 -0
  23. package/dist/actions/base64.js +21 -0
  24. package/dist/actions/base64.js.map +1 -0
  25. package/dist/actions/bic.d.ts +65 -0
  26. package/dist/actions/bic.js +21 -0
  27. package/dist/actions/bic.js.map +1 -0
  28. package/dist/actions/brand.d.ts +42 -0
  29. package/dist/actions/brand.js +21 -0
  30. package/dist/actions/brand.js.map +1 -0
  31. package/dist/actions/bytes.d.ts +68 -0
  32. package/dist/actions/bytes.js +25 -0
  33. package/dist/actions/bytes.js.map +1 -0
  34. package/dist/actions/check.d.ts +44 -0
  35. package/dist/actions/check.js +20 -0
  36. package/dist/actions/check.js.map +1 -0
  37. package/dist/actions/checkAsync.d.ts +44 -0
  38. package/dist/actions/checkAsync.js +20 -0
  39. package/dist/actions/checkAsync.js.map +1 -0
  40. package/dist/actions/checkItems.d.ts +45 -0
  41. package/dist/actions/checkItems.js +36 -0
  42. package/dist/actions/checkItems.js.map +1 -0
  43. package/dist/actions/checkItemsAsync.d.ts +45 -0
  44. package/dist/actions/checkItemsAsync.js +37 -0
  45. package/dist/actions/checkItemsAsync.js.map +1 -0
  46. package/dist/actions/creditCard.d.ts +65 -0
  47. package/dist/actions/creditCard.js +57 -0
  48. package/dist/actions/creditCard.js.map +1 -0
  49. package/dist/actions/cuid2.d.ts +65 -0
  50. package/dist/actions/cuid2.js +21 -0
  51. package/dist/actions/cuid2.js.map +1 -0
  52. package/dist/actions/decimal.d.ts +73 -0
  53. package/dist/actions/decimal.js +21 -0
  54. package/dist/actions/decimal.js.map +1 -0
  55. package/dist/actions/description.d.ts +26 -0
  56. package/dist/actions/description.js +17 -0
  57. package/dist/actions/description.js.map +1 -0
  58. package/dist/actions/digits.d.ts +73 -0
  59. package/dist/actions/digits.js +21 -0
  60. package/dist/actions/digits.js.map +1 -0
  61. package/dist/actions/domain.d.ts +81 -0
  62. package/dist/actions/domain.js +21 -0
  63. package/dist/actions/domain.js.map +1 -0
  64. package/dist/actions/email.d.ts +75 -0
  65. package/dist/actions/email.js +21 -0
  66. package/dist/actions/email.js.map +1 -0
  67. package/dist/actions/emoji.d.ts +65 -0
  68. package/dist/actions/emoji.js +21 -0
  69. package/dist/actions/emoji.js.map +1 -0
  70. package/dist/actions/empty.d.ts +58 -0
  71. package/dist/actions/empty.js +21 -0
  72. package/dist/actions/empty.js.map +1 -0
  73. package/dist/actions/endsWith.d.ts +68 -0
  74. package/dist/actions/endsWith.js +22 -0
  75. package/dist/actions/endsWith.js.map +1 -0
  76. package/dist/actions/entries.d.ts +77 -0
  77. package/dist/actions/entries.js +25 -0
  78. package/dist/actions/entries.js.map +1 -0
  79. package/dist/actions/everyItem.d.ts +65 -0
  80. package/dist/actions/everyItem.js +20 -0
  81. package/dist/actions/everyItem.js.map +1 -0
  82. package/dist/actions/examples.d.ts +28 -0
  83. package/dist/actions/examples.js +19 -0
  84. package/dist/actions/examples.js.map +1 -0
  85. package/dist/actions/excludes.d.ts +65 -0
  86. package/dist/actions/excludes.js +22 -0
  87. package/dist/actions/excludes.js.map +1 -0
  88. package/dist/actions/filterItems.d.ts +27 -0
  89. package/dist/actions/filterItems.js +15 -0
  90. package/dist/actions/filterItems.js.map +1 -0
  91. package/dist/actions/findItem.d.ts +32 -0
  92. package/dist/actions/findItem.js +16 -0
  93. package/dist/actions/findItem.js.map +1 -0
  94. package/dist/actions/finite.d.ts +65 -0
  95. package/dist/actions/finite.js +20 -0
  96. package/dist/actions/finite.js.map +1 -0
  97. package/dist/actions/flavor.d.ts +52 -0
  98. package/dist/actions/flavor.js +23 -0
  99. package/dist/actions/flavor.js.map +1 -0
  100. package/dist/actions/graphemes.d.ts +68 -0
  101. package/dist/actions/graphemes.js +25 -0
  102. package/dist/actions/graphemes.js.map +1 -0
  103. package/dist/actions/gtValue.d.ts +65 -0
  104. package/dist/actions/gtValue.js +26 -0
  105. package/dist/actions/gtValue.js.map +1 -0
  106. package/dist/actions/guard.d.ts +97 -0
  107. package/dist/actions/guard.js +21 -0
  108. package/dist/actions/guard.js.map +1 -0
  109. package/dist/actions/hash.d.ts +92 -0
  110. package/dist/actions/hash.js +39 -0
  111. package/dist/actions/hash.js.map +1 -0
  112. package/dist/actions/hexColor.d.ts +65 -0
  113. package/dist/actions/hexColor.js +21 -0
  114. package/dist/actions/hexColor.js.map +1 -0
  115. package/dist/actions/hexadecimal.d.ts +65 -0
  116. package/dist/actions/hexadecimal.js +21 -0
  117. package/dist/actions/hexadecimal.js.map +1 -0
  118. package/dist/actions/imei.d.ts +73 -0
  119. package/dist/actions/imei.js +23 -0
  120. package/dist/actions/imei.js.map +1 -0
  121. package/dist/actions/includes.d.ts +65 -0
  122. package/dist/actions/includes.js +24 -0
  123. package/dist/actions/includes.js.map +1 -0
  124. package/dist/actions/index.d.ts +129 -0
  125. package/dist/actions/index.js +130 -0
  126. package/dist/actions/index.js.map +1 -0
  127. package/dist/actions/integer.d.ts +65 -0
  128. package/dist/actions/integer.js +20 -0
  129. package/dist/actions/integer.js.map +1 -0
  130. package/dist/actions/ip.d.ts +65 -0
  131. package/dist/actions/ip.js +21 -0
  132. package/dist/actions/ip.js.map +1 -0
  133. package/dist/actions/ipv4.d.ts +65 -0
  134. package/dist/actions/ipv4.js +21 -0
  135. package/dist/actions/ipv4.js.map +1 -0
  136. package/dist/actions/ipv6.d.ts +65 -0
  137. package/dist/actions/ipv6.js +21 -0
  138. package/dist/actions/ipv6.js.map +1 -0
  139. package/dist/actions/isbn.d.ts +69 -0
  140. package/dist/actions/isbn.js +43 -0
  141. package/dist/actions/isbn.js.map +1 -0
  142. package/dist/actions/isoDate.d.ts +77 -0
  143. package/dist/actions/isoDate.js +21 -0
  144. package/dist/actions/isoDate.js.map +1 -0
  145. package/dist/actions/isoDateTime.d.ts +83 -0
  146. package/dist/actions/isoDateTime.js +21 -0
  147. package/dist/actions/isoDateTime.js.map +1 -0
  148. package/dist/actions/isoTime.d.ts +69 -0
  149. package/dist/actions/isoTime.js +21 -0
  150. package/dist/actions/isoTime.js.map +1 -0
  151. package/dist/actions/isoTimeSecond.d.ts +69 -0
  152. package/dist/actions/isoTimeSecond.js +21 -0
  153. package/dist/actions/isoTimeSecond.js.map +1 -0
  154. package/dist/actions/isoTimestamp.d.ts +104 -0
  155. package/dist/actions/isoTimestamp.js +21 -0
  156. package/dist/actions/isoTimestamp.js.map +1 -0
  157. package/dist/actions/isoWeek.d.ts +75 -0
  158. package/dist/actions/isoWeek.js +21 -0
  159. package/dist/actions/isoWeek.js.map +1 -0
  160. package/dist/actions/isrc.d.ts +73 -0
  161. package/dist/actions/isrc.js +21 -0
  162. package/dist/actions/isrc.js.map +1 -0
  163. package/dist/actions/jwsCompact.d.ts +83 -0
  164. package/dist/actions/jwsCompact.js +21 -0
  165. package/dist/actions/jwsCompact.js.map +1 -0
  166. package/dist/actions/length.d.ts +69 -0
  167. package/dist/actions/length.js +22 -0
  168. package/dist/actions/length.js.map +1 -0
  169. package/dist/actions/ltValue.d.ts +65 -0
  170. package/dist/actions/ltValue.js +26 -0
  171. package/dist/actions/ltValue.js.map +1 -0
  172. package/dist/actions/mac.d.ts +65 -0
  173. package/dist/actions/mac.js +21 -0
  174. package/dist/actions/mac.js.map +1 -0
  175. package/dist/actions/mac48.d.ts +65 -0
  176. package/dist/actions/mac48.js +21 -0
  177. package/dist/actions/mac48.js.map +1 -0
  178. package/dist/actions/mac64.d.ts +65 -0
  179. package/dist/actions/mac64.js +21 -0
  180. package/dist/actions/mac64.js.map +1 -0
  181. package/dist/actions/mapItems.d.ts +32 -0
  182. package/dist/actions/mapItems.js +15 -0
  183. package/dist/actions/mapItems.js.map +1 -0
  184. package/dist/actions/maxBytes.d.ts +68 -0
  185. package/dist/actions/maxBytes.js +25 -0
  186. package/dist/actions/maxBytes.js.map +1 -0
  187. package/dist/actions/maxEntries.d.ts +77 -0
  188. package/dist/actions/maxEntries.js +25 -0
  189. package/dist/actions/maxEntries.js.map +1 -0
  190. package/dist/actions/maxGraphemes.d.ts +68 -0
  191. package/dist/actions/maxGraphemes.js +25 -0
  192. package/dist/actions/maxGraphemes.js.map +1 -0
  193. package/dist/actions/maxLength.d.ts +69 -0
  194. package/dist/actions/maxLength.js +22 -0
  195. package/dist/actions/maxLength.js.map +1 -0
  196. package/dist/actions/maxSize.d.ts +69 -0
  197. package/dist/actions/maxSize.js +22 -0
  198. package/dist/actions/maxSize.js.map +1 -0
  199. package/dist/actions/maxValue.d.ts +65 -0
  200. package/dist/actions/maxValue.js +26 -0
  201. package/dist/actions/maxValue.js.map +1 -0
  202. package/dist/actions/maxWords.d.ts +74 -0
  203. package/dist/actions/maxWords.js +26 -0
  204. package/dist/actions/maxWords.js.map +1 -0
  205. package/dist/actions/metadata.d.ts +26 -0
  206. package/dist/actions/metadata.js +17 -0
  207. package/dist/actions/metadata.js.map +1 -0
  208. package/dist/actions/mimeType.d.ts +73 -0
  209. package/dist/actions/mimeType.js +23 -0
  210. package/dist/actions/mimeType.js.map +1 -0
  211. package/dist/actions/minBytes.d.ts +68 -0
  212. package/dist/actions/minBytes.js +25 -0
  213. package/dist/actions/minBytes.js.map +1 -0
  214. package/dist/actions/minEntries.d.ts +77 -0
  215. package/dist/actions/minEntries.js +25 -0
  216. package/dist/actions/minEntries.js.map +1 -0
  217. package/dist/actions/minGraphemes.d.ts +68 -0
  218. package/dist/actions/minGraphemes.js +25 -0
  219. package/dist/actions/minGraphemes.js.map +1 -0
  220. package/dist/actions/minLength.d.ts +69 -0
  221. package/dist/actions/minLength.js +22 -0
  222. package/dist/actions/minLength.js.map +1 -0
  223. package/dist/actions/minSize.d.ts +69 -0
  224. package/dist/actions/minSize.js +22 -0
  225. package/dist/actions/minSize.js.map +1 -0
  226. package/dist/actions/minValue.d.ts +65 -0
  227. package/dist/actions/minValue.js +26 -0
  228. package/dist/actions/minValue.js.map +1 -0
  229. package/dist/actions/minWords.d.ts +74 -0
  230. package/dist/actions/minWords.js +26 -0
  231. package/dist/actions/minWords.js.map +1 -0
  232. package/dist/actions/multipleOf.d.ts +90 -0
  233. package/dist/actions/multipleOf.js +21 -0
  234. package/dist/actions/multipleOf.js.map +1 -0
  235. package/dist/actions/nanoid.d.ts +77 -0
  236. package/dist/actions/nanoid.js +21 -0
  237. package/dist/actions/nanoid.js.map +1 -0
  238. package/dist/actions/nonEmpty.d.ts +58 -0
  239. package/dist/actions/nonEmpty.js +21 -0
  240. package/dist/actions/nonEmpty.js.map +1 -0
  241. package/dist/actions/normalize.d.ts +36 -0
  242. package/dist/actions/normalize.js +15 -0
  243. package/dist/actions/normalize.js.map +1 -0
  244. package/dist/actions/notBytes.d.ts +68 -0
  245. package/dist/actions/notBytes.js +25 -0
  246. package/dist/actions/notBytes.js.map +1 -0
  247. package/dist/actions/notEntries.d.ts +77 -0
  248. package/dist/actions/notEntries.js +25 -0
  249. package/dist/actions/notEntries.js.map +1 -0
  250. package/dist/actions/notGraphemes.d.ts +68 -0
  251. package/dist/actions/notGraphemes.js +25 -0
  252. package/dist/actions/notGraphemes.js.map +1 -0
  253. package/dist/actions/notLength.d.ts +69 -0
  254. package/dist/actions/notLength.js +22 -0
  255. package/dist/actions/notLength.js.map +1 -0
  256. package/dist/actions/notSize.d.ts +69 -0
  257. package/dist/actions/notSize.js +22 -0
  258. package/dist/actions/notSize.js.map +1 -0
  259. package/dist/actions/notValue.d.ts +65 -0
  260. package/dist/actions/notValue.js +28 -0
  261. package/dist/actions/notValue.js.map +1 -0
  262. package/dist/actions/notValues.d.ts +65 -0
  263. package/dist/actions/notValues.js +25 -0
  264. package/dist/actions/notValues.js.map +1 -0
  265. package/dist/actions/notWords.d.ts +74 -0
  266. package/dist/actions/notWords.js +26 -0
  267. package/dist/actions/notWords.js.map +1 -0
  268. package/dist/actions/octal.d.ts +65 -0
  269. package/dist/actions/octal.js +21 -0
  270. package/dist/actions/octal.js.map +1 -0
  271. package/dist/actions/parseBoolean.d.ts +91 -0
  272. package/dist/actions/parseBoolean.js +36 -0
  273. package/dist/actions/parseBoolean.js.map +1 -0
  274. package/dist/actions/parseJson.d.ts +87 -0
  275. package/dist/actions/parseJson.js +31 -0
  276. package/dist/actions/parseJson.js.map +1 -0
  277. package/dist/actions/partialCheck.d.ts +50 -0
  278. package/dist/actions/partialCheck.js +24 -0
  279. package/dist/actions/partialCheck.js.map +1 -0
  280. package/dist/actions/partialCheckAsync.d.ts +50 -0
  281. package/dist/actions/partialCheckAsync.js +24 -0
  282. package/dist/actions/partialCheckAsync.js.map +1 -0
  283. package/dist/actions/rawCheck.d.ts +27 -0
  284. package/dist/actions/rawCheck.js +27 -0
  285. package/dist/actions/rawCheck.js.map +1 -0
  286. package/dist/actions/rawCheckAsync.d.ts +27 -0
  287. package/dist/actions/rawCheckAsync.js +27 -0
  288. package/dist/actions/rawCheckAsync.js.map +1 -0
  289. package/dist/actions/rawTransform.d.ts +23 -0
  290. package/dist/actions/rawTransform.js +39 -0
  291. package/dist/actions/rawTransform.js.map +1 -0
  292. package/dist/actions/rawTransformAsync.d.ts +23 -0
  293. package/dist/actions/rawTransformAsync.js +39 -0
  294. package/dist/actions/rawTransformAsync.js.map +1 -0
  295. package/dist/actions/readonly.d.ts +25 -0
  296. package/dist/actions/readonly.js +13 -0
  297. package/dist/actions/readonly.js.map +1 -0
  298. package/dist/actions/reduceItems.d.ts +37 -0
  299. package/dist/actions/reduceItems.js +17 -0
  300. package/dist/actions/reduceItems.js.map +1 -0
  301. package/dist/actions/regex.d.ts +72 -0
  302. package/dist/actions/regex.js +20 -0
  303. package/dist/actions/regex.js.map +1 -0
  304. package/dist/actions/returns.d.ts +26 -0
  305. package/dist/actions/returns.js +23 -0
  306. package/dist/actions/returns.js.map +1 -0
  307. package/dist/actions/returnsAsync.d.ts +26 -0
  308. package/dist/actions/returnsAsync.js +23 -0
  309. package/dist/actions/returnsAsync.js.map +1 -0
  310. package/dist/actions/rfcEmail.d.ts +75 -0
  311. package/dist/actions/rfcEmail.js +21 -0
  312. package/dist/actions/rfcEmail.js.map +1 -0
  313. package/dist/actions/safeInteger.d.ts +65 -0
  314. package/dist/actions/safeInteger.js +20 -0
  315. package/dist/actions/safeInteger.js.map +1 -0
  316. package/dist/actions/size.d.ts +69 -0
  317. package/dist/actions/size.js +22 -0
  318. package/dist/actions/size.js.map +1 -0
  319. package/dist/actions/slug.d.ts +65 -0
  320. package/dist/actions/slug.js +21 -0
  321. package/dist/actions/slug.js.map +1 -0
  322. package/dist/actions/someItem.d.ts +65 -0
  323. package/dist/actions/someItem.js +20 -0
  324. package/dist/actions/someItem.js.map +1 -0
  325. package/dist/actions/sortItems.d.ts +32 -0
  326. package/dist/actions/sortItems.js +15 -0
  327. package/dist/actions/sortItems.js.map +1 -0
  328. package/dist/actions/startsWith.d.ts +68 -0
  329. package/dist/actions/startsWith.js +22 -0
  330. package/dist/actions/startsWith.js.map +1 -0
  331. package/dist/actions/stringifyJson.d.ts +92 -0
  332. package/dist/actions/stringifyJson.js +39 -0
  333. package/dist/actions/stringifyJson.js.map +1 -0
  334. package/dist/actions/title.d.ts +26 -0
  335. package/dist/actions/title.js +17 -0
  336. package/dist/actions/title.js.map +1 -0
  337. package/dist/actions/toBigint.d.ts +53 -0
  338. package/dist/actions/toBigint.js +24 -0
  339. package/dist/actions/toBigint.js.map +1 -0
  340. package/dist/actions/toBoolean.d.ts +22 -0
  341. package/dist/actions/toBoolean.js +22 -0
  342. package/dist/actions/toBoolean.js.map +1 -0
  343. package/dist/actions/toDate.d.ts +53 -0
  344. package/dist/actions/toDate.js +32 -0
  345. package/dist/actions/toDate.js.map +1 -0
  346. package/dist/actions/toLowerCase.d.ts +20 -0
  347. package/dist/actions/toLowerCase.js +19 -0
  348. package/dist/actions/toLowerCase.js.map +1 -0
  349. package/dist/actions/toMaxValue.d.ts +27 -0
  350. package/dist/actions/toMaxValue.js +23 -0
  351. package/dist/actions/toMaxValue.js.map +1 -0
  352. package/dist/actions/toMinValue.d.ts +27 -0
  353. package/dist/actions/toMinValue.js +23 -0
  354. package/dist/actions/toMinValue.js.map +1 -0
  355. package/dist/actions/toNumber.d.ts +53 -0
  356. package/dist/actions/toNumber.js +29 -0
  357. package/dist/actions/toNumber.js.map +1 -0
  358. package/dist/actions/toString.d.ts +53 -0
  359. package/dist/actions/toString.js +23 -0
  360. package/dist/actions/toString.js.map +1 -0
  361. package/dist/actions/toUpperCase.d.ts +20 -0
  362. package/dist/actions/toUpperCase.js +19 -0
  363. package/dist/actions/toUpperCase.js.map +1 -0
  364. package/dist/actions/transform.d.ts +26 -0
  365. package/dist/actions/transform.js +24 -0
  366. package/dist/actions/transform.js.map +1 -0
  367. package/dist/actions/transformAsync.d.ts +26 -0
  368. package/dist/actions/transformAsync.js +24 -0
  369. package/dist/actions/transformAsync.js.map +1 -0
  370. package/dist/actions/trim.d.ts +20 -0
  371. package/dist/actions/trim.js +19 -0
  372. package/dist/actions/trim.js.map +1 -0
  373. package/dist/actions/trimEnd.d.ts +20 -0
  374. package/dist/actions/trimEnd.js +19 -0
  375. package/dist/actions/trimEnd.js.map +1 -0
  376. package/dist/actions/trimStart.d.ts +20 -0
  377. package/dist/actions/trimStart.js +19 -0
  378. package/dist/actions/trimStart.js.map +1 -0
  379. package/dist/actions/types/check.d.ts +22 -0
  380. package/dist/actions/types/check.js +2 -0
  381. package/dist/actions/types/check.js.map +1 -0
  382. package/dist/actions/types/checkItems.d.ts +23 -0
  383. package/dist/actions/types/checkItems.js +2 -0
  384. package/dist/actions/types/checkItems.js.map +1 -0
  385. package/dist/actions/types/index.d.ts +5 -0
  386. package/dist/actions/types/index.js +6 -0
  387. package/dist/actions/types/index.js.map +1 -0
  388. package/dist/actions/types/partialCheck.d.ts +96 -0
  389. package/dist/actions/types/partialCheck.js +2 -0
  390. package/dist/actions/types/partialCheck.js.map +1 -0
  391. package/dist/actions/types/rawCheck.d.ts +37 -0
  392. package/dist/actions/types/rawCheck.js +2 -0
  393. package/dist/actions/types/rawCheck.js.map +1 -0
  394. package/dist/actions/types/rawTransform.d.ts +38 -0
  395. package/dist/actions/types/rawTransform.js +2 -0
  396. package/dist/actions/types/rawTransform.js.map +1 -0
  397. package/dist/actions/types.d.ts +37 -0
  398. package/dist/actions/types.js +2 -0
  399. package/dist/actions/types.js.map +1 -0
  400. package/dist/actions/ulid.d.ts +65 -0
  401. package/dist/actions/ulid.js +21 -0
  402. package/dist/actions/ulid.js.map +1 -0
  403. package/dist/actions/url.d.ts +71 -0
  404. package/dist/actions/url.js +28 -0
  405. package/dist/actions/url.js.map +1 -0
  406. package/dist/actions/uuid.d.ts +65 -0
  407. package/dist/actions/uuid.js +21 -0
  408. package/dist/actions/uuid.js.map +1 -0
  409. package/dist/actions/value.d.ts +65 -0
  410. package/dist/actions/value.js +27 -0
  411. package/dist/actions/value.js.map +1 -0
  412. package/dist/actions/values.d.ts +65 -0
  413. package/dist/actions/values.js +25 -0
  414. package/dist/actions/values.js.map +1 -0
  415. package/dist/actions/words.d.ts +74 -0
  416. package/dist/actions/words.js +26 -0
  417. package/dist/actions/words.js.map +1 -0
  418. package/dist/index.d.ts +10 -0
  419. package/dist/index.js +9 -0
  420. package/dist/index.js.map +1 -0
  421. package/dist/index.min.js +4 -0
  422. package/dist/index.min.js.map +1 -0
  423. package/dist/integrations/http.d.ts +27 -0
  424. package/dist/integrations/http.js +124 -0
  425. package/dist/integrations/http.js.map +1 -0
  426. package/dist/methods/_LruCache.d.ts +44 -0
  427. package/dist/methods/_LruCache.js +115 -0
  428. package/dist/methods/_LruCache.js.map +1 -0
  429. package/dist/methods/assert.d.ts +9 -0
  430. package/dist/methods/assert.js +15 -0
  431. package/dist/methods/assert.js.map +1 -0
  432. package/dist/methods/cache.d.ts +49 -0
  433. package/dist/methods/cache.js +24 -0
  434. package/dist/methods/cache.js.map +1 -0
  435. package/dist/methods/cacheAsync.d.ts +69 -0
  436. package/dist/methods/cacheAsync.js +46 -0
  437. package/dist/methods/cacheAsync.js.map +1 -0
  438. package/dist/methods/config.d.ts +10 -0
  439. package/dist/methods/config.js +22 -0
  440. package/dist/methods/config.js.map +1 -0
  441. package/dist/methods/fallback.d.ts +23 -0
  442. package/dist/methods/fallback.js +27 -0
  443. package/dist/methods/fallback.js.map +1 -0
  444. package/dist/methods/fallbackAsync.d.ts +44 -0
  445. package/dist/methods/fallbackAsync.js +31 -0
  446. package/dist/methods/fallbackAsync.js.map +1 -0
  447. package/dist/methods/flatten.d.ts +48 -0
  448. package/dist/methods/flatten.js +51 -0
  449. package/dist/methods/flatten.js.map +1 -0
  450. package/dist/methods/forward.d.ts +11 -0
  451. package/dist/methods/forward.js +66 -0
  452. package/dist/methods/forward.js.map +1 -0
  453. package/dist/methods/forwardAsync.d.ts +11 -0
  454. package/dist/methods/forwardAsync.js +67 -0
  455. package/dist/methods/forwardAsync.js.map +1 -0
  456. package/dist/methods/getDefault.d.ts +25 -0
  457. package/dist/methods/getDefault.js +19 -0
  458. package/dist/methods/getDefault.js.map +1 -0
  459. package/dist/methods/getDefaults.d.ts +15 -0
  460. package/dist/methods/getDefaults.js +31 -0
  461. package/dist/methods/getDefaults.js.map +1 -0
  462. package/dist/methods/getDefaultsAsync.d.ts +15 -0
  463. package/dist/methods/getDefaultsAsync.js +30 -0
  464. package/dist/methods/getDefaultsAsync.js.map +1 -0
  465. package/dist/methods/getDescription.d.ts +27 -0
  466. package/dist/methods/getDescription.js +19 -0
  467. package/dist/methods/getDescription.js.map +1 -0
  468. package/dist/methods/getExamples.d.ts +38 -0
  469. package/dist/methods/getExamples.js +33 -0
  470. package/dist/methods/getExamples.js.map +1 -0
  471. package/dist/methods/getFallback.d.ts +17 -0
  472. package/dist/methods/getFallback.js +19 -0
  473. package/dist/methods/getFallback.js.map +1 -0
  474. package/dist/methods/getFallbacks.d.ts +15 -0
  475. package/dist/methods/getFallbacks.js +31 -0
  476. package/dist/methods/getFallbacks.js.map +1 -0
  477. package/dist/methods/getFallbacksAsync.d.ts +15 -0
  478. package/dist/methods/getFallbacksAsync.js +30 -0
  479. package/dist/methods/getFallbacksAsync.js.map +1 -0
  480. package/dist/methods/getMetadata.d.ts +45 -0
  481. package/dist/methods/getMetadata.js +33 -0
  482. package/dist/methods/getMetadata.js.map +1 -0
  483. package/dist/methods/getTitle.d.ts +27 -0
  484. package/dist/methods/getTitle.js +19 -0
  485. package/dist/methods/getTitle.js.map +1 -0
  486. package/dist/methods/index.d.ts +41 -0
  487. package/dist/methods/index.js +42 -0
  488. package/dist/methods/index.js.map +1 -0
  489. package/dist/methods/is.d.ts +11 -0
  490. package/dist/methods/is.js +14 -0
  491. package/dist/methods/is.js.map +1 -0
  492. package/dist/methods/keyof.d.ts +32 -0
  493. package/dist/methods/keyof.js +6 -0
  494. package/dist/methods/keyof.js.map +1 -0
  495. package/dist/methods/message.d.ts +10 -0
  496. package/dist/methods/message.js +22 -0
  497. package/dist/methods/message.js.map +1 -0
  498. package/dist/methods/omit.d.ts +277 -0
  499. package/dist/methods/omit.js +33 -0
  500. package/dist/methods/omit.js.map +1 -0
  501. package/dist/methods/parse.d.ts +11 -0
  502. package/dist/methods/parse.js +19 -0
  503. package/dist/methods/parse.js.map +1 -0
  504. package/dist/methods/parseAsync.d.ts +11 -0
  505. package/dist/methods/parseAsync.js +19 -0
  506. package/dist/methods/parseAsync.js.map +1 -0
  507. package/dist/methods/parser.d.ts +35 -0
  508. package/dist/methods/parser.js +11 -0
  509. package/dist/methods/parser.js.map +1 -0
  510. package/dist/methods/parserAsync.d.ts +35 -0
  511. package/dist/methods/parserAsync.js +11 -0
  512. package/dist/methods/parserAsync.js.map +1 -0
  513. package/dist/methods/partial.d.ts +151 -0
  514. package/dist/methods/partial.js +23 -0
  515. package/dist/methods/partial.js.map +1 -0
  516. package/dist/methods/partialAsync.d.ts +151 -0
  517. package/dist/methods/partialAsync.js +23 -0
  518. package/dist/methods/partialAsync.js.map +1 -0
  519. package/dist/methods/pick.d.ts +277 -0
  520. package/dist/methods/pick.js +30 -0
  521. package/dist/methods/pick.js.map +1 -0
  522. package/dist/methods/pipe.d.ts +619 -0
  523. package/dist/methods/pipe.js +36 -0
  524. package/dist/methods/pipe.js.map +1 -0
  525. package/dist/methods/pipeAsync.d.ts +581 -0
  526. package/dist/methods/pipeAsync.js +37 -0
  527. package/dist/methods/pipeAsync.js.map +1 -0
  528. package/dist/methods/required.d.ts +171 -0
  529. package/dist/methods/required.js +26 -0
  530. package/dist/methods/required.js.map +1 -0
  531. package/dist/methods/requiredAsync.d.ts +171 -0
  532. package/dist/methods/requiredAsync.js +26 -0
  533. package/dist/methods/requiredAsync.js.map +1 -0
  534. package/dist/methods/safeParse.d.ts +12 -0
  535. package/dist/methods/safeParse.js +21 -0
  536. package/dist/methods/safeParse.js.map +1 -0
  537. package/dist/methods/safeParseAsync.d.ts +12 -0
  538. package/dist/methods/safeParseAsync.js +21 -0
  539. package/dist/methods/safeParseAsync.js.map +1 -0
  540. package/dist/methods/safeParser.d.ts +36 -0
  541. package/dist/methods/safeParser.js +11 -0
  542. package/dist/methods/safeParser.js.map +1 -0
  543. package/dist/methods/safeParserAsync.d.ts +36 -0
  544. package/dist/methods/safeParserAsync.js +11 -0
  545. package/dist/methods/safeParserAsync.js.map +1 -0
  546. package/dist/methods/summarize.d.ts +11 -0
  547. package/dist/methods/summarize.js +33 -0
  548. package/dist/methods/summarize.js.map +1 -0
  549. package/dist/methods/types/cache.d.ts +46 -0
  550. package/dist/methods/types/cache.js +2 -0
  551. package/dist/methods/types/cache.js.map +1 -0
  552. package/dist/methods/types/forward.d.ts +28 -0
  553. package/dist/methods/types/forward.js +2 -0
  554. package/dist/methods/types/forward.js.map +1 -0
  555. package/dist/methods/types/getDefaults.d.ts +15 -0
  556. package/dist/methods/types/getDefaults.js +2 -0
  557. package/dist/methods/types/getDefaults.js.map +1 -0
  558. package/dist/methods/types/getFallbacks.d.ts +15 -0
  559. package/dist/methods/types/getFallbacks.js +2 -0
  560. package/dist/methods/types/getFallbacks.js.map +1 -0
  561. package/dist/methods/types/index.d.ts +5 -0
  562. package/dist/methods/types/index.js +6 -0
  563. package/dist/methods/types/index.js.map +1 -0
  564. package/dist/methods/types/safeParse.d.ts +32 -0
  565. package/dist/methods/types/safeParse.js +2 -0
  566. package/dist/methods/types/safeParse.js.map +1 -0
  567. package/dist/methods/unwrap.d.ts +10 -0
  568. package/dist/methods/unwrap.js +12 -0
  569. package/dist/methods/unwrap.js.map +1 -0
  570. package/dist/regex.d.ts +151 -0
  571. package/dist/regex.js +159 -0
  572. package/dist/regex.js.map +1 -0
  573. package/dist/schemas/_merge.d.ts +22 -0
  574. package/dist/schemas/_merge.js +70 -0
  575. package/dist/schemas/_merge.js.map +1 -0
  576. package/dist/schemas/_subIssues.d.ts +11 -0
  577. package/dist/schemas/_subIssues.js +27 -0
  578. package/dist/schemas/_subIssues.js.map +1 -0
  579. package/dist/schemas/any.d.ts +28 -0
  580. package/dist/schemas/any.js +30 -0
  581. package/dist/schemas/any.js.map +1 -0
  582. package/dist/schemas/array.d.ts +44 -0
  583. package/dist/schemas/array.js +79 -0
  584. package/dist/schemas/array.js.map +1 -0
  585. package/dist/schemas/arrayAsync.d.ts +45 -0
  586. package/dist/schemas/arrayAsync.js +81 -0
  587. package/dist/schemas/arrayAsync.js.map +1 -0
  588. package/dist/schemas/bigint.d.ts +53 -0
  589. package/dist/schemas/bigint.js +27 -0
  590. package/dist/schemas/bigint.js.map +1 -0
  591. package/dist/schemas/blob.d.ts +53 -0
  592. package/dist/schemas/blob.js +27 -0
  593. package/dist/schemas/blob.js.map +1 -0
  594. package/dist/schemas/boolean.d.ts +53 -0
  595. package/dist/schemas/boolean.js +27 -0
  596. package/dist/schemas/boolean.js.map +1 -0
  597. package/dist/schemas/custom.d.ts +49 -0
  598. package/dist/schemas/custom.js +28 -0
  599. package/dist/schemas/custom.js.map +1 -0
  600. package/dist/schemas/customAsync.d.ts +50 -0
  601. package/dist/schemas/customAsync.js +28 -0
  602. package/dist/schemas/customAsync.js.map +1 -0
  603. package/dist/schemas/date.d.ts +53 -0
  604. package/dist/schemas/date.js +35 -0
  605. package/dist/schemas/date.js.map +1 -0
  606. package/dist/schemas/enum.d.ts +73 -0
  607. package/dist/schemas/enum.js +39 -0
  608. package/dist/schemas/enum.js.map +1 -0
  609. package/dist/schemas/exactOptional.d.ts +43 -0
  610. package/dist/schemas/exactOptional.js +20 -0
  611. package/dist/schemas/exactOptional.js.map +1 -0
  612. package/dist/schemas/exactOptionalAsync.d.ts +44 -0
  613. package/dist/schemas/exactOptionalAsync.js +20 -0
  614. package/dist/schemas/exactOptionalAsync.js.map +1 -0
  615. package/dist/schemas/file.d.ts +53 -0
  616. package/dist/schemas/file.js +27 -0
  617. package/dist/schemas/file.js.map +1 -0
  618. package/dist/schemas/function.d.ts +54 -0
  619. package/dist/schemas/function.js +28 -0
  620. package/dist/schemas/function.js.map +1 -0
  621. package/dist/schemas/index.d.ts +72 -0
  622. package/dist/schemas/index.js +73 -0
  623. package/dist/schemas/index.js.map +1 -0
  624. package/dist/schemas/instance.d.ts +60 -0
  625. package/dist/schemas/instance.js +28 -0
  626. package/dist/schemas/instance.js.map +1 -0
  627. package/dist/schemas/intersect.d.ts +40 -0
  628. package/dist/schemas/intersect.js +88 -0
  629. package/dist/schemas/intersect.js.map +1 -0
  630. package/dist/schemas/intersectAsync.d.ts +41 -0
  631. package/dist/schemas/intersectAsync.js +89 -0
  632. package/dist/schemas/intersectAsync.js.map +1 -0
  633. package/dist/schemas/lazy.d.ts +30 -0
  634. package/dist/schemas/lazy.js +26 -0
  635. package/dist/schemas/lazy.js.map +1 -0
  636. package/dist/schemas/lazyAsync.d.ts +31 -0
  637. package/dist/schemas/lazyAsync.js +26 -0
  638. package/dist/schemas/lazyAsync.js.map +1 -0
  639. package/dist/schemas/literal.d.ts +60 -0
  640. package/dist/schemas/literal.js +28 -0
  641. package/dist/schemas/literal.js.map +1 -0
  642. package/dist/schemas/looseObject.d.ts +48 -0
  643. package/dist/schemas/looseObject.js +132 -0
  644. package/dist/schemas/looseObject.js.map +1 -0
  645. package/dist/schemas/looseObjectAsync.d.ts +49 -0
  646. package/dist/schemas/looseObjectAsync.js +148 -0
  647. package/dist/schemas/looseObjectAsync.js.map +1 -0
  648. package/dist/schemas/looseTuple.d.ts +50 -0
  649. package/dist/schemas/looseTuple.js +86 -0
  650. package/dist/schemas/looseTuple.js.map +1 -0
  651. package/dist/schemas/looseTupleAsync.d.ts +51 -0
  652. package/dist/schemas/looseTupleAsync.js +89 -0
  653. package/dist/schemas/looseTupleAsync.js.map +1 -0
  654. package/dist/schemas/map.d.ts +50 -0
  655. package/dist/schemas/map.js +114 -0
  656. package/dist/schemas/map.js.map +1 -0
  657. package/dist/schemas/mapAsync.d.ts +51 -0
  658. package/dist/schemas/mapAsync.js +117 -0
  659. package/dist/schemas/mapAsync.js.map +1 -0
  660. package/dist/schemas/nan.d.ts +53 -0
  661. package/dist/schemas/nan.js +27 -0
  662. package/dist/schemas/nan.js.map +1 -0
  663. package/dist/schemas/never.d.ts +53 -0
  664. package/dist/schemas/never.js +21 -0
  665. package/dist/schemas/never.js.map +1 -0
  666. package/dist/schemas/nonNullable.d.ts +44 -0
  667. package/dist/schemas/nonNullable.js +31 -0
  668. package/dist/schemas/nonNullable.js.map +1 -0
  669. package/dist/schemas/nonNullableAsync.d.ts +45 -0
  670. package/dist/schemas/nonNullableAsync.js +31 -0
  671. package/dist/schemas/nonNullableAsync.js.map +1 -0
  672. package/dist/schemas/nonNullish.d.ts +44 -0
  673. package/dist/schemas/nonNullish.js +31 -0
  674. package/dist/schemas/nonNullish.js.map +1 -0
  675. package/dist/schemas/nonNullishAsync.d.ts +45 -0
  676. package/dist/schemas/nonNullishAsync.js +31 -0
  677. package/dist/schemas/nonNullishAsync.js.map +1 -0
  678. package/dist/schemas/nonOptional.d.ts +44 -0
  679. package/dist/schemas/nonOptional.js +31 -0
  680. package/dist/schemas/nonOptional.js.map +1 -0
  681. package/dist/schemas/nonOptionalAsync.d.ts +45 -0
  682. package/dist/schemas/nonOptionalAsync.js +31 -0
  683. package/dist/schemas/nonOptionalAsync.js.map +1 -0
  684. package/dist/schemas/null.d.ts +54 -0
  685. package/dist/schemas/null.js +28 -0
  686. package/dist/schemas/null.js.map +1 -0
  687. package/dist/schemas/nullable.d.ts +44 -0
  688. package/dist/schemas/nullable.js +36 -0
  689. package/dist/schemas/nullable.js.map +1 -0
  690. package/dist/schemas/nullableAsync.d.ts +45 -0
  691. package/dist/schemas/nullableAsync.js +36 -0
  692. package/dist/schemas/nullableAsync.js.map +1 -0
  693. package/dist/schemas/nullish.d.ts +44 -0
  694. package/dist/schemas/nullish.js +37 -0
  695. package/dist/schemas/nullish.js.map +1 -0
  696. package/dist/schemas/nullishAsync.d.ts +45 -0
  697. package/dist/schemas/nullishAsync.js +37 -0
  698. package/dist/schemas/nullishAsync.js.map +1 -0
  699. package/dist/schemas/number.d.ts +53 -0
  700. package/dist/schemas/number.js +27 -0
  701. package/dist/schemas/number.js.map +1 -0
  702. package/dist/schemas/object.d.ts +54 -0
  703. package/dist/schemas/object.js +122 -0
  704. package/dist/schemas/object.js.map +1 -0
  705. package/dist/schemas/objectAsync.d.ts +55 -0
  706. package/dist/schemas/objectAsync.js +138 -0
  707. package/dist/schemas/objectAsync.js.map +1 -0
  708. package/dist/schemas/objectWithRest.d.ts +54 -0
  709. package/dist/schemas/objectWithRest.js +174 -0
  710. package/dist/schemas/objectWithRest.js.map +1 -0
  711. package/dist/schemas/objectWithRestAsync.d.ts +55 -0
  712. package/dist/schemas/objectWithRestAsync.js +195 -0
  713. package/dist/schemas/objectWithRestAsync.js.map +1 -0
  714. package/dist/schemas/optional.d.ts +44 -0
  715. package/dist/schemas/optional.js +36 -0
  716. package/dist/schemas/optional.js.map +1 -0
  717. package/dist/schemas/optionalAsync.d.ts +45 -0
  718. package/dist/schemas/optionalAsync.js +36 -0
  719. package/dist/schemas/optionalAsync.js.map +1 -0
  720. package/dist/schemas/picklist.d.ts +60 -0
  721. package/dist/schemas/picklist.js +29 -0
  722. package/dist/schemas/picklist.js.map +1 -0
  723. package/dist/schemas/promise.d.ts +53 -0
  724. package/dist/schemas/promise.js +27 -0
  725. package/dist/schemas/promise.js.map +1 -0
  726. package/dist/schemas/record.d.ts +50 -0
  727. package/dist/schemas/record.js +117 -0
  728. package/dist/schemas/record.js.map +1 -0
  729. package/dist/schemas/recordAsync.d.ts +51 -0
  730. package/dist/schemas/recordAsync.js +118 -0
  731. package/dist/schemas/recordAsync.js.map +1 -0
  732. package/dist/schemas/set.d.ts +44 -0
  733. package/dist/schemas/set.js +78 -0
  734. package/dist/schemas/set.js.map +1 -0
  735. package/dist/schemas/setAsync.d.ts +45 -0
  736. package/dist/schemas/setAsync.js +82 -0
  737. package/dist/schemas/setAsync.js.map +1 -0
  738. package/dist/schemas/strictObject.d.ts +44 -0
  739. package/dist/schemas/strictObject.js +149 -0
  740. package/dist/schemas/strictObject.js.map +1 -0
  741. package/dist/schemas/strictObjectAsync.d.ts +45 -0
  742. package/dist/schemas/strictObjectAsync.js +165 -0
  743. package/dist/schemas/strictObjectAsync.js.map +1 -0
  744. package/dist/schemas/strictTuple.d.ts +44 -0
  745. package/dist/schemas/strictTuple.js +101 -0
  746. package/dist/schemas/strictTuple.js.map +1 -0
  747. package/dist/schemas/strictTupleAsync.d.ts +45 -0
  748. package/dist/schemas/strictTupleAsync.js +104 -0
  749. package/dist/schemas/strictTupleAsync.js.map +1 -0
  750. package/dist/schemas/string.d.ts +53 -0
  751. package/dist/schemas/string.js +27 -0
  752. package/dist/schemas/string.js.map +1 -0
  753. package/dist/schemas/symbol.d.ts +53 -0
  754. package/dist/schemas/symbol.js +27 -0
  755. package/dist/schemas/symbol.js.map +1 -0
  756. package/dist/schemas/tuple.d.ts +54 -0
  757. package/dist/schemas/tuple.js +79 -0
  758. package/dist/schemas/tuple.js.map +1 -0
  759. package/dist/schemas/tupleAsync.d.ts +55 -0
  760. package/dist/schemas/tupleAsync.js +82 -0
  761. package/dist/schemas/tupleAsync.js.map +1 -0
  762. package/dist/schemas/tupleWithRest.d.ts +56 -0
  763. package/dist/schemas/tupleWithRest.js +126 -0
  764. package/dist/schemas/tupleWithRest.js.map +1 -0
  765. package/dist/schemas/tupleWithRestAsync.d.ts +57 -0
  766. package/dist/schemas/tupleWithRestAsync.js +142 -0
  767. package/dist/schemas/tupleWithRestAsync.js.map +1 -0
  768. package/dist/schemas/types/array.d.ts +18 -0
  769. package/dist/schemas/types/array.js +2 -0
  770. package/dist/schemas/types/array.js.map +1 -0
  771. package/dist/schemas/types/custom.d.ts +18 -0
  772. package/dist/schemas/types/custom.js +2 -0
  773. package/dist/schemas/types/custom.js.map +1 -0
  774. package/dist/schemas/types/index.d.ts +23 -0
  775. package/dist/schemas/types/index.js +24 -0
  776. package/dist/schemas/types/index.js.map +1 -0
  777. package/dist/schemas/types/intersect.d.ts +51 -0
  778. package/dist/schemas/types/intersect.js +2 -0
  779. package/dist/schemas/types/intersect.js.map +1 -0
  780. package/dist/schemas/types/looseObject.d.ts +18 -0
  781. package/dist/schemas/types/looseObject.js +2 -0
  782. package/dist/schemas/types/looseObject.js.map +1 -0
  783. package/dist/schemas/types/looseTuple.d.ts +18 -0
  784. package/dist/schemas/types/looseTuple.js +2 -0
  785. package/dist/schemas/types/looseTuple.js.map +1 -0
  786. package/dist/schemas/types/map.d.ts +26 -0
  787. package/dist/schemas/types/map.js +2 -0
  788. package/dist/schemas/types/map.js.map +1 -0
  789. package/dist/schemas/types/nonNullable.d.ts +37 -0
  790. package/dist/schemas/types/nonNullable.js +2 -0
  791. package/dist/schemas/types/nonNullable.js.map +1 -0
  792. package/dist/schemas/types/nonNullish.d.ts +37 -0
  793. package/dist/schemas/types/nonNullish.js +2 -0
  794. package/dist/schemas/types/nonNullish.js.map +1 -0
  795. package/dist/schemas/types/nonOptional.d.ts +37 -0
  796. package/dist/schemas/types/nonOptional.js +2 -0
  797. package/dist/schemas/types/nonOptional.js.map +1 -0
  798. package/dist/schemas/types/nullable.d.ts +5 -0
  799. package/dist/schemas/types/nullable.js +2 -0
  800. package/dist/schemas/types/nullable.js.map +1 -0
  801. package/dist/schemas/types/nullish.d.ts +5 -0
  802. package/dist/schemas/types/nullish.js +2 -0
  803. package/dist/schemas/types/nullish.js.map +1 -0
  804. package/dist/schemas/types/object.d.ts +18 -0
  805. package/dist/schemas/types/object.js +2 -0
  806. package/dist/schemas/types/object.js.map +1 -0
  807. package/dist/schemas/types/objectWithRest.d.ts +18 -0
  808. package/dist/schemas/types/objectWithRest.js +2 -0
  809. package/dist/schemas/types/objectWithRest.js.map +1 -0
  810. package/dist/schemas/types/optional.d.ts +5 -0
  811. package/dist/schemas/types/optional.js +2 -0
  812. package/dist/schemas/types/optional.js.map +1 -0
  813. package/dist/schemas/types/record.d.ts +56 -0
  814. package/dist/schemas/types/record.js +2 -0
  815. package/dist/schemas/types/record.js.map +1 -0
  816. package/dist/schemas/types/set.d.ts +26 -0
  817. package/dist/schemas/types/set.js +2 -0
  818. package/dist/schemas/types/set.js.map +1 -0
  819. package/dist/schemas/types/strictObject.d.ts +18 -0
  820. package/dist/schemas/types/strictObject.js +2 -0
  821. package/dist/schemas/types/strictObject.js.map +1 -0
  822. package/dist/schemas/types/strictTuple.d.ts +18 -0
  823. package/dist/schemas/types/strictTuple.js +2 -0
  824. package/dist/schemas/types/strictTuple.js.map +1 -0
  825. package/dist/schemas/types/tuple.d.ts +18 -0
  826. package/dist/schemas/types/tuple.js +2 -0
  827. package/dist/schemas/types/tuple.js.map +1 -0
  828. package/dist/schemas/types/tupleWithRest.d.ts +18 -0
  829. package/dist/schemas/types/tupleWithRest.js +2 -0
  830. package/dist/schemas/types/tupleWithRest.js.map +1 -0
  831. package/dist/schemas/types/undefinedable.d.ts +5 -0
  832. package/dist/schemas/types/undefinedable.js +2 -0
  833. package/dist/schemas/types/undefinedable.js.map +1 -0
  834. package/dist/schemas/types/union.d.ts +22 -0
  835. package/dist/schemas/types/union.js +2 -0
  836. package/dist/schemas/types/union.js.map +1 -0
  837. package/dist/schemas/types/variant.d.ts +83 -0
  838. package/dist/schemas/types/variant.js +2 -0
  839. package/dist/schemas/types/variant.js.map +1 -0
  840. package/dist/schemas/undefined.d.ts +54 -0
  841. package/dist/schemas/undefined.js +28 -0
  842. package/dist/schemas/undefined.js.map +1 -0
  843. package/dist/schemas/undefinedable.d.ts +44 -0
  844. package/dist/schemas/undefinedable.js +36 -0
  845. package/dist/schemas/undefinedable.js.map +1 -0
  846. package/dist/schemas/undefinedableAsync.d.ts +45 -0
  847. package/dist/schemas/undefinedableAsync.js +36 -0
  848. package/dist/schemas/undefinedableAsync.js.map +1 -0
  849. package/dist/schemas/union.d.ts +44 -0
  850. package/dist/schemas/union.js +91 -0
  851. package/dist/schemas/union.js.map +1 -0
  852. package/dist/schemas/unionAsync.d.ts +45 -0
  853. package/dist/schemas/unionAsync.js +91 -0
  854. package/dist/schemas/unionAsync.js.map +1 -0
  855. package/dist/schemas/unknown.d.ts +24 -0
  856. package/dist/schemas/unknown.js +26 -0
  857. package/dist/schemas/unknown.js.map +1 -0
  858. package/dist/schemas/variant.d.ts +50 -0
  859. package/dist/schemas/variant.js +129 -0
  860. package/dist/schemas/variant.js.map +1 -0
  861. package/dist/schemas/variantAsync.d.ts +51 -0
  862. package/dist/schemas/variantAsync.js +129 -0
  863. package/dist/schemas/variantAsync.js.map +1 -0
  864. package/dist/schemas/void.d.ts +54 -0
  865. package/dist/schemas/void.js +28 -0
  866. package/dist/schemas/void.js.map +1 -0
  867. package/dist/storages/globalConfig.d.ts +23 -0
  868. package/dist/storages/globalConfig.js +35 -0
  869. package/dist/storages/globalConfig.js.map +1 -0
  870. package/dist/storages/globalMessage.d.ts +22 -0
  871. package/dist/storages/globalMessage.js +33 -0
  872. package/dist/storages/globalMessage.js.map +1 -0
  873. package/dist/storages/index.d.ts +4 -0
  874. package/dist/storages/index.js +5 -0
  875. package/dist/storages/index.js.map +1 -0
  876. package/dist/storages/schemaMessage.d.ts +22 -0
  877. package/dist/storages/schemaMessage.js +33 -0
  878. package/dist/storages/schemaMessage.js.map +1 -0
  879. package/dist/storages/specificMessage.d.ts +30 -0
  880. package/dist/storages/specificMessage.js +38 -0
  881. package/dist/storages/specificMessage.js.map +1 -0
  882. package/dist/types/config.d.ts +23 -0
  883. package/dist/types/config.js +2 -0
  884. package/dist/types/config.js.map +1 -0
  885. package/dist/types/dataset.d.ts +73 -0
  886. package/dist/types/dataset.js +2 -0
  887. package/dist/types/dataset.js.map +1 -0
  888. package/dist/types/index.d.ts +14 -0
  889. package/dist/types/index.js +15 -0
  890. package/dist/types/index.js.map +1 -0
  891. package/dist/types/infer.d.ts +17 -0
  892. package/dist/types/infer.js +2 -0
  893. package/dist/types/infer.js.map +1 -0
  894. package/dist/types/issue.d.ts +208 -0
  895. package/dist/types/issue.js +2 -0
  896. package/dist/types/issue.js.map +1 -0
  897. package/dist/types/metadata.d.ts +31 -0
  898. package/dist/types/metadata.js +2 -0
  899. package/dist/types/metadata.js.map +1 -0
  900. package/dist/types/object.d.ts +87 -0
  901. package/dist/types/object.js +2 -0
  902. package/dist/types/object.js.map +1 -0
  903. package/dist/types/other.d.ts +22 -0
  904. package/dist/types/other.js +2 -0
  905. package/dist/types/other.js.map +1 -0
  906. package/dist/types/pipe.d.ts +43 -0
  907. package/dist/types/pipe.js +2 -0
  908. package/dist/types/pipe.js.map +1 -0
  909. package/dist/types/schema.d.ts +88 -0
  910. package/dist/types/schema.js +2 -0
  911. package/dist/types/schema.js.map +1 -0
  912. package/dist/types/standard.d.ts +82 -0
  913. package/dist/types/standard.js +2 -0
  914. package/dist/types/standard.js.map +1 -0
  915. package/dist/types/transformation.d.ts +77 -0
  916. package/dist/types/transformation.js +2 -0
  917. package/dist/types/transformation.js.map +1 -0
  918. package/dist/types/tuple.d.ts +28 -0
  919. package/dist/types/tuple.js +2 -0
  920. package/dist/types/tuple.js.map +1 -0
  921. package/dist/types/utils.d.ts +81 -0
  922. package/dist/types/utils.js +2 -0
  923. package/dist/types/utils.js.map +1 -0
  924. package/dist/types/validation.d.ts +81 -0
  925. package/dist/types/validation.js +2 -0
  926. package/dist/types/validation.js.map +1 -0
  927. package/dist/utils/ValidationError.d.ts +41 -0
  928. package/dist/utils/ValidationError.js +46 -0
  929. package/dist/utils/ValidationError.js.map +1 -0
  930. package/dist/utils/_addIssue.d.ts +35 -0
  931. package/dist/utils/_addIssue.js +67 -0
  932. package/dist/utils/_addIssue.js.map +1 -0
  933. package/dist/utils/_cloneDataset.d.ts +14 -0
  934. package/dist/utils/_cloneDataset.js +24 -0
  935. package/dist/utils/_cloneDataset.js.map +1 -0
  936. package/dist/utils/_getByteCount.d.ts +10 -0
  937. package/dist/utils/_getByteCount.js +18 -0
  938. package/dist/utils/_getByteCount.js.map +1 -0
  939. package/dist/utils/_getGraphemeCount.d.ts +10 -0
  940. package/dist/utils/_getGraphemeCount.js +24 -0
  941. package/dist/utils/_getGraphemeCount.js.map +1 -0
  942. package/dist/utils/_getLastMetadata.d.ts +30 -0
  943. package/dist/utils/_getLastMetadata.js +34 -0
  944. package/dist/utils/_getLastMetadata.js.map +1 -0
  945. package/dist/utils/_getStandardProps.d.ts +9 -0
  946. package/dist/utils/_getStandardProps.js +19 -0
  947. package/dist/utils/_getStandardProps.js.map +1 -0
  948. package/dist/utils/_getWordCount.d.ts +11 -0
  949. package/dist/utils/_getWordCount.js +29 -0
  950. package/dist/utils/_getWordCount.js.map +1 -0
  951. package/dist/utils/_isLuhnAlgo.d.ts +10 -0
  952. package/dist/utils/_isLuhnAlgo.js +31 -0
  953. package/dist/utils/_isLuhnAlgo.js.map +1 -0
  954. package/dist/utils/_isValidObjectKey.d.ts +12 -0
  955. package/dist/utils/_isValidObjectKey.js +19 -0
  956. package/dist/utils/_isValidObjectKey.js.map +1 -0
  957. package/dist/utils/_joinExpects.d.ts +11 -0
  958. package/dist/utils/_joinExpects.js +22 -0
  959. package/dist/utils/_joinExpects.js.map +1 -0
  960. package/dist/utils/_stringify.d.ts +10 -0
  961. package/dist/utils/_stringify.js +25 -0
  962. package/dist/utils/_stringify.js.map +1 -0
  963. package/dist/utils/ajv.d.ts +25 -0
  964. package/dist/utils/ajv.js +233 -0
  965. package/dist/utils/ajv.js.map +1 -0
  966. package/dist/utils/chainConstruct.d.ts +58 -0
  967. package/dist/utils/chainConstruct.js +136 -0
  968. package/dist/utils/chainConstruct.js.map +1 -0
  969. package/dist/utils/entriesFromList.d.ts +10 -0
  970. package/dist/utils/entriesFromList.js +18 -0
  971. package/dist/utils/entriesFromList.js.map +1 -0
  972. package/dist/utils/entriesFromObjects.d.ts +26 -0
  973. package/dist/utils/entriesFromObjects.js +10 -0
  974. package/dist/utils/entriesFromObjects.js.map +1 -0
  975. package/dist/utils/formatIssues.d.ts +13 -0
  976. package/dist/utils/formatIssues.js +35 -0
  977. package/dist/utils/formatIssues.js.map +1 -0
  978. package/dist/utils/getDotPath.d.ts +17 -0
  979. package/dist/utils/getDotPath.js +22 -0
  980. package/dist/utils/getDotPath.js.map +1 -0
  981. package/dist/utils/index.d.ts +23 -0
  982. package/dist/utils/index.js +24 -0
  983. package/dist/utils/index.js.map +1 -0
  984. package/dist/utils/isOfKind.d.ts +13 -0
  985. package/dist/utils/isOfKind.js +13 -0
  986. package/dist/utils/isOfKind.js.map +1 -0
  987. package/dist/utils/isOfType.d.ts +13 -0
  988. package/dist/utils/isOfType.js +13 -0
  989. package/dist/utils/isOfType.js.map +1 -0
  990. package/dist/utils/isValidationError.d.ts +10 -0
  991. package/dist/utils/isValidationError.js +13 -0
  992. package/dist/utils/isValidationError.js.map +1 -0
  993. package/dist/utils/jsonSchema.d.ts +10 -0
  994. package/dist/utils/jsonSchema.js +130 -0
  995. package/dist/utils/jsonSchema.js.map +1 -0
  996. package/dist/utils/schemaConstructors.d.ts +63 -0
  997. package/dist/utils/schemaConstructors.js +84 -0
  998. package/dist/utils/schemaConstructors.js.map +1 -0
  999. package/package.json +48 -4
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../src/types/pipe.ts"],"names":[],"mappings":""}
@@ -0,0 +1,88 @@
1
+ import type { Config } from './config.js';
2
+ import type { OutputDataset, UnknownDataset } from './dataset.js';
3
+ import type { BaseIssue } from './issue.js';
4
+ import type { StandardProps } from './standard.js';
5
+ /**
6
+ * Base schema interface.
7
+ */
8
+ export interface BaseSchema<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
9
+ /**
10
+ * The object kind.
11
+ */
12
+ readonly kind: 'schema';
13
+ /**
14
+ * The schema type.
15
+ */
16
+ readonly type: string;
17
+ /**
18
+ * The schema reference.
19
+ */
20
+ readonly reference: (...args: any[]) => BaseSchema<unknown, unknown, BaseIssue<unknown>>;
21
+ /**
22
+ * The expected property.
23
+ */
24
+ readonly expects: string;
25
+ /**
26
+ * Whether it's async.
27
+ */
28
+ readonly async: false;
29
+ /**
30
+ * The Standard Schema properties.
31
+ *
32
+ * @internal
33
+ */
34
+ readonly '~standard': StandardProps<TInput, TOutput>;
35
+ /**
36
+ * Parses unknown input values.
37
+ *
38
+ * @param dataset The input dataset.
39
+ * @param config The configuration.
40
+ *
41
+ * @returns The output dataset.
42
+ *
43
+ * @internal
44
+ */
45
+ readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, TIssue>;
46
+ /**
47
+ * The input, output and issue type.
48
+ *
49
+ * @internal
50
+ */
51
+ readonly '~types'?: {
52
+ readonly input: TInput;
53
+ readonly output: TOutput;
54
+ readonly issue: TIssue;
55
+ } | undefined;
56
+ }
57
+ /**
58
+ * Base schema async interface.
59
+ */
60
+ export interface BaseSchemaAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseSchema<TInput, TOutput, TIssue>, 'reference' | 'async' | '~run'> {
61
+ /**
62
+ * The schema reference.
63
+ */
64
+ readonly reference: (...args: any[]) => BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>;
65
+ /**
66
+ * Whether it's async.
67
+ */
68
+ readonly async: true;
69
+ /**
70
+ * Parses unknown input values.
71
+ *
72
+ * @param dataset The input dataset.
73
+ * @param config The configuration.
74
+ *
75
+ * @returns The output dataset.
76
+ *
77
+ * @internal
78
+ */
79
+ readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, TIssue>>;
80
+ }
81
+ /**
82
+ * Generic schema type.
83
+ */
84
+ export type GenericSchema<TInput = unknown, TOutput = TInput, TIssue extends BaseIssue<unknown> = BaseIssue<unknown>> = BaseSchema<TInput, TOutput, TIssue>;
85
+ /**
86
+ * Generic schema async type.
87
+ */
88
+ export type GenericSchemaAsync<TInput = unknown, TOutput = TInput, TIssue extends BaseIssue<unknown> = BaseIssue<unknown>> = BaseSchemaAsync<TInput, TOutput, TIssue>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/types/schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * The Standard Schema properties interface.
3
+ */
4
+ export interface StandardProps<TInput, TOutput> {
5
+ /**
6
+ * The version number of the standard.
7
+ */
8
+ readonly version: 1;
9
+ /**
10
+ * The vendor name of the schema library.
11
+ */
12
+ readonly vendor: '@zeruxjs/validator';
13
+ /**
14
+ * Validates unknown input values.
15
+ */
16
+ readonly validate: (value: unknown) => StandardResult<TOutput> | Promise<StandardResult<TOutput>>;
17
+ /**
18
+ * Inferred types associated with the schema.
19
+ */
20
+ readonly types?: StandardTypes<TInput, TOutput> | undefined;
21
+ }
22
+ /**
23
+ * The result interface of the validate function.
24
+ */
25
+ export type StandardResult<TOutput> = StandardSuccessResult<TOutput> | StandardFailureResult;
26
+ /**
27
+ * The result interface if validation succeeds.
28
+ */
29
+ export interface StandardSuccessResult<TOutput> {
30
+ /**
31
+ * The typed output value.
32
+ */
33
+ readonly value: TOutput;
34
+ /**
35
+ * The non-existent issues.
36
+ */
37
+ readonly issues?: undefined;
38
+ }
39
+ /**
40
+ * The result interface if validation fails.
41
+ */
42
+ export interface StandardFailureResult {
43
+ /**
44
+ * The issues of failed validation.
45
+ */
46
+ readonly issues: readonly StandardIssue[];
47
+ }
48
+ /**
49
+ * The issue interface of the failure output.
50
+ */
51
+ export interface StandardIssue {
52
+ /**
53
+ * The error message of the issue.
54
+ */
55
+ readonly message: string;
56
+ /**
57
+ * The path of the issue, if any.
58
+ */
59
+ readonly path?: readonly (PropertyKey | StandardPathItem)[] | undefined;
60
+ }
61
+ /**
62
+ * The path item interface of the issue.
63
+ */
64
+ export interface StandardPathItem {
65
+ /**
66
+ * The key of the path item.
67
+ */
68
+ readonly key: PropertyKey;
69
+ }
70
+ /**
71
+ * The Standard Schema types interface.
72
+ */
73
+ export interface StandardTypes<TInput, TOutput> {
74
+ /**
75
+ * The input type of the schema.
76
+ */
77
+ readonly input: TInput;
78
+ /**
79
+ * The output type of the schema.
80
+ */
81
+ readonly output: TOutput;
82
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=standard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standard.js","sourceRoot":"","sources":["../../src/types/standard.ts"],"names":[],"mappings":""}
@@ -0,0 +1,77 @@
1
+ import type { Config } from './config.js';
2
+ import type { OutputDataset, SuccessDataset } from './dataset.js';
3
+ import type { BaseIssue } from './issue.js';
4
+ /**
5
+ * Base transformation interface.
6
+ */
7
+ export interface BaseTransformation<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
8
+ /**
9
+ * The object kind.
10
+ */
11
+ readonly kind: 'transformation';
12
+ /**
13
+ * The transformation type.
14
+ */
15
+ readonly type: string;
16
+ /**
17
+ * The transformation reference.
18
+ */
19
+ readonly reference: (...args: any[]) => BaseTransformation<any, any, BaseIssue<unknown>>;
20
+ /**
21
+ * Whether it's async.
22
+ */
23
+ readonly async: false;
24
+ /**
25
+ * Transforms known input values.
26
+ *
27
+ * @param dataset The input dataset.
28
+ * @param config The configuration.
29
+ *
30
+ * @returns The output dataset.
31
+ *
32
+ * @internal
33
+ */
34
+ readonly '~run': (dataset: SuccessDataset<TInput>, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, BaseIssue<unknown> | TIssue>;
35
+ /**
36
+ * The input, output and issue type.
37
+ *
38
+ * @internal
39
+ */
40
+ readonly '~types'?: {
41
+ readonly input: TInput;
42
+ readonly output: TOutput;
43
+ readonly issue: TIssue;
44
+ } | undefined;
45
+ }
46
+ /**
47
+ * Base transformation async interface.
48
+ */
49
+ export interface BaseTransformationAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseTransformation<TInput, TOutput, TIssue>, 'reference' | 'async' | '~run'> {
50
+ /**
51
+ * The transformation reference.
52
+ */
53
+ readonly reference: (...args: any[]) => BaseTransformation<any, any, BaseIssue<unknown>> | BaseTransformationAsync<any, any, BaseIssue<unknown>>;
54
+ /**
55
+ * Whether it's async.
56
+ */
57
+ readonly async: true;
58
+ /**
59
+ * Transforms known input values.
60
+ *
61
+ * @param dataset The input dataset.
62
+ * @param config The configuration.
63
+ *
64
+ * @returns The output dataset.
65
+ *
66
+ * @internal
67
+ */
68
+ readonly '~run': (dataset: SuccessDataset<TInput>, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, BaseIssue<unknown> | TIssue>>;
69
+ }
70
+ /**
71
+ * Generic transformation type.
72
+ */
73
+ export type GenericTransformation<TInput = any, TOutput = TInput, TIssue extends BaseIssue<unknown> = BaseIssue<unknown>> = BaseTransformation<TInput, TOutput, TIssue>;
74
+ /**
75
+ * Generic transformation async type.
76
+ */
77
+ export type GenericTransformationAsync<TInput = any, TOutput = TInput, TIssue extends BaseIssue<unknown> = BaseIssue<unknown>> = BaseTransformationAsync<TInput, TOutput, TIssue>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=transformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformation.js","sourceRoot":"","sources":["../../src/types/transformation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ import type { InferInput, InferIssue, InferOutput } from './infer.js';
2
+ import type { BaseIssue } from './issue.js';
3
+ import type { BaseSchema, BaseSchemaAsync } from './schema.js';
4
+ import type { MaybeReadonly } from './utils.js';
5
+ /**
6
+ * Tuple items type.
7
+ */
8
+ export type TupleItems = MaybeReadonly<BaseSchema<unknown, unknown, BaseIssue<unknown>>[]>;
9
+ /**
10
+ * Tuple items async type.
11
+ */
12
+ export type TupleItemsAsync = MaybeReadonly<(BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>)[]>;
13
+ /**
14
+ * Infer tuple input type.
15
+ */
16
+ export type InferTupleInput<TItems extends TupleItems | TupleItemsAsync> = {
17
+ -readonly [TKey in keyof TItems]: InferInput<TItems[TKey]>;
18
+ };
19
+ /**
20
+ * Infer tuple output type.
21
+ */
22
+ export type InferTupleOutput<TItems extends TupleItems | TupleItemsAsync> = {
23
+ -readonly [TKey in keyof TItems]: InferOutput<TItems[TKey]>;
24
+ };
25
+ /**
26
+ * Infer tuple issue type.
27
+ */
28
+ export type InferTupleIssue<TItems extends TupleItems | TupleItemsAsync> = InferIssue<TItems[number]>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tuple.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tuple.js","sourceRoot":"","sources":["../../src/types/tuple.ts"],"names":[],"mappings":""}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Checks if a type is `any`.
3
+ */
4
+ export type IsAny<Type> = 0 extends 1 & Type ? true : false;
5
+ /**
6
+ * Checks if a type is `never`.
7
+ */
8
+ export type IsNever<Type> = [Type] extends [never] ? true : false;
9
+ /**
10
+ * Extracts `null` from a type.
11
+ */
12
+ export type NonNullable<TValue> = TValue extends null ? never : TValue;
13
+ /**
14
+ * Extracts `null` and `undefined` from a type.
15
+ */
16
+ export type NonNullish<TValue> = TValue extends null | undefined ? never : TValue;
17
+ /**
18
+ * Extracts `undefined` from a type.
19
+ */
20
+ export type NonOptional<TValue> = TValue extends undefined ? never : TValue;
21
+ /**
22
+ * Constructs a type that is maybe readonly.
23
+ */
24
+ export type MaybeReadonly<TValue> = TValue | Readonly<TValue>;
25
+ /**
26
+ * Constructs a type that is deeply readonly.
27
+ */
28
+ export type DeepReadonly<TValue> = TValue extends Record<string, unknown> | readonly unknown[] ? {
29
+ readonly [TKey in keyof TValue]: DeepReadonly<TValue[TKey]>;
30
+ } : TValue;
31
+ /**
32
+ * Constructs a type that is maybe deeply readonly.
33
+ */
34
+ export type MaybeDeepReadonly<TValue> = TValue | DeepReadonly<TValue>;
35
+ /**
36
+ * Constructs a type that is maybe a promise.
37
+ */
38
+ export type MaybePromise<TValue> = TValue | Promise<TValue>;
39
+ /**
40
+ * Prettifies a type for better readability.
41
+ *
42
+ * Hint: This type has no effect and is only used so that TypeScript displays
43
+ * the final type in the preview instead of the utility types used.
44
+ */
45
+ export type Prettify<TObject> = {
46
+ [TKey in keyof TObject]: TObject[TKey];
47
+ } & {};
48
+ /**
49
+ * Marks specific keys as optional.
50
+ */
51
+ export type MarkOptional<TObject, TKeys extends keyof TObject> = {
52
+ [TKey in keyof TObject]?: unknown;
53
+ } & Omit<TObject, TKeys> & Partial<Pick<TObject, TKeys>>;
54
+ /**
55
+ * Merges two objects. Overlapping entries from the second object overwrite
56
+ * properties from the first object.
57
+ */
58
+ export type Merge<TFirstObject, TSecondObject> = Omit<TFirstObject, keyof TFirstObject & keyof TSecondObject> & TSecondObject;
59
+ /**
60
+ * Extracts first tuple item.
61
+ */
62
+ export type FirstTupleItem<TTuple extends readonly [unknown, ...unknown[]]> = TTuple[0];
63
+ /**
64
+ * Extracts last tuple item.
65
+ */
66
+ export type LastTupleItem<TTuple extends readonly [unknown, ...unknown[]]> = TTuple[TTuple extends readonly [unknown, ...infer TRest] ? TRest['length'] : never];
67
+ /**
68
+ * Converts union to intersection type.
69
+ */
70
+ export type UnionToIntersect<TUnion> = (TUnion extends any ? (arg: TUnion) => void : never) extends (arg: infer Intersect) => void ? Intersect : never;
71
+ /**
72
+ * Converts union to tuple type using an accumulator.
73
+ *
74
+ * For more information: {@link https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#tail-recursion-elimination-on-conditional-types}
75
+ */
76
+ type UnionToTupleHelper<TUnion, TResult extends unknown[]> = UnionToIntersect<TUnion extends never ? never : () => TUnion> extends () => infer TLast ? UnionToTupleHelper<Exclude<TUnion, TLast>, [TLast, ...TResult]> : TResult;
77
+ /**
78
+ * Converts union to tuple type.
79
+ */
80
+ export type UnionToTuple<TUnion> = UnionToTupleHelper<TUnion, []>;
81
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":""}
@@ -0,0 +1,81 @@
1
+ import type { Config } from './config.js';
2
+ import type { OutputDataset } from './dataset.js';
3
+ import type { BaseIssue } from './issue.js';
4
+ /**
5
+ * Base validation interface.
6
+ */
7
+ export interface BaseValidation<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
8
+ /**
9
+ * The object kind.
10
+ */
11
+ readonly kind: 'validation';
12
+ /**
13
+ * The validation type.
14
+ */
15
+ readonly type: string;
16
+ /**
17
+ * The validation reference.
18
+ */
19
+ readonly reference: (...args: any[]) => BaseValidation<any, any, BaseIssue<unknown>>;
20
+ /**
21
+ * The expected property.
22
+ */
23
+ readonly expects: string | null;
24
+ /**
25
+ * Whether it's async.
26
+ */
27
+ readonly async: false;
28
+ /**
29
+ * Validates known input values.
30
+ *
31
+ * @param dataset The input dataset.
32
+ * @param config The configuration.
33
+ *
34
+ * @returns The output dataset.
35
+ *
36
+ * @internal
37
+ */
38
+ readonly '~run': (dataset: OutputDataset<TInput, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, BaseIssue<unknown> | TIssue>;
39
+ /**
40
+ * The input, output and issue type.
41
+ *
42
+ * @internal
43
+ */
44
+ readonly '~types'?: {
45
+ readonly input: TInput;
46
+ readonly output: TOutput;
47
+ readonly issue: TIssue;
48
+ } | undefined;
49
+ }
50
+ /**
51
+ * Base validation async interface.
52
+ */
53
+ export interface BaseValidationAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseValidation<TInput, TOutput, TIssue>, 'reference' | 'async' | '~run'> {
54
+ /**
55
+ * The validation reference.
56
+ */
57
+ readonly reference: (...args: any[]) => BaseValidation<any, any, BaseIssue<unknown>> | BaseValidationAsync<any, any, BaseIssue<unknown>>;
58
+ /**
59
+ * Whether it's async.
60
+ */
61
+ readonly async: true;
62
+ /**
63
+ * Validates known input values.
64
+ *
65
+ * @param dataset The input dataset.
66
+ * @param config The configuration.
67
+ *
68
+ * @returns The output dataset.
69
+ *
70
+ * @internal
71
+ */
72
+ readonly '~run': (dataset: OutputDataset<TInput, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, BaseIssue<unknown> | TIssue>>;
73
+ }
74
+ /**
75
+ * Generic validation type.
76
+ */
77
+ export type GenericValidation<TInput = any, TOutput = TInput, TIssue extends BaseIssue<unknown> = BaseIssue<unknown>> = BaseValidation<TInput, TOutput, TIssue>;
78
+ /**
79
+ * Generic validation async type.
80
+ */
81
+ export type GenericValidationAsync<TInput = any, TOutput = TInput, TIssue extends BaseIssue<unknown> = BaseIssue<unknown>> = BaseValidationAsync<TInput, TOutput, TIssue>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/types/validation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,41 @@
1
+ import type { BaseIssue, BaseSchema, BaseSchemaAsync, InferIssue } from '../types/index.js';
2
+ import { type FormattedIssueTree } from './formatIssues.js';
3
+ /**
4
+ * A error with useful information.
5
+ */
6
+ export declare class ValidationError<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>> extends Error {
7
+ /**
8
+ * The error issues.
9
+ */
10
+ readonly issues: [InferIssue<TSchema>, ...InferIssue<TSchema>[]];
11
+ readonly summary: string;
12
+ /**
13
+ * Creates a error with useful information.
14
+ *
15
+ * @param issues The error issues.
16
+ */
17
+ constructor(issues: [InferIssue<TSchema>, ...InferIssue<TSchema>[]]);
18
+ flatten(): {
19
+ readonly root?: [string, ...string[]] | undefined;
20
+ readonly nested?: {
21
+ readonly [x: string]: [string, ...string[]] | undefined;
22
+ } | undefined;
23
+ readonly other?: [string, ...string[]] | undefined;
24
+ };
25
+ format(): FormattedIssueTree;
26
+ summarize(): string;
27
+ toJSON(): {
28
+ name: string;
29
+ message: string;
30
+ summary: string;
31
+ issues: [InferIssue<TSchema>, ...InferIssue<TSchema>[]];
32
+ flat: {
33
+ readonly root?: [string, ...string[]] | undefined;
34
+ readonly nested?: {
35
+ readonly [x: string]: [string, ...string[]] | undefined;
36
+ } | undefined;
37
+ readonly other?: [string, ...string[]] | undefined;
38
+ };
39
+ formatted: FormattedIssueTree;
40
+ };
41
+ }
@@ -0,0 +1,46 @@
1
+ import { flatten } from '../methods/flatten.js';
2
+ import { summarize } from '../methods/summarize.js';
3
+ import { formatIssues } from './formatIssues.js';
4
+ /**
5
+ * A error with useful information.
6
+ */
7
+ export class ValidationError extends Error {
8
+ /**
9
+ * The error issues.
10
+ */
11
+ issues;
12
+ summary;
13
+ /**
14
+ * Creates a error with useful information.
15
+ *
16
+ * @param issues The error issues.
17
+ */
18
+ // @__NO_SIDE_EFFECTS__
19
+ constructor(issues) {
20
+ const summary = summarize(issues);
21
+ super(issues.length === 1 ? issues[0].message : summary, { cause: issues });
22
+ this.name = 'ValidationError';
23
+ this.issues = issues;
24
+ this.summary = summary;
25
+ }
26
+ flatten() {
27
+ return flatten(this.issues);
28
+ }
29
+ format() {
30
+ return formatIssues(this.issues);
31
+ }
32
+ summarize() {
33
+ return this.summary;
34
+ }
35
+ toJSON() {
36
+ return {
37
+ name: this.name,
38
+ message: this.message,
39
+ summary: this.summary,
40
+ issues: this.issues,
41
+ flat: this.flatten(),
42
+ formatted: this.format(),
43
+ };
44
+ }
45
+ }
46
+ //# sourceMappingURL=ValidationError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ValidationError.js","sourceRoot":"","sources":["../../src/utils/ValidationError.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAC;AAE1E;;GAEG;AACH,MAAM,OAAO,eAIX,SAAQ,KAAK;IACb;;OAEG;IACa,MAAM,CAAkD;IACxD,OAAO,CAAS;IAEhC;;;;OAIG;IACH,uBAAuB;IACvB,YAAY,MAAuD;QACjE,MAAM,OAAO,GAAG,SAAS,CAAC,MAAuD,CAAC,CAAC;QACnF,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5E,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,OAAO;QACL,OAAO,OAAO,CAAC,IAAI,CAAC,MAAuD,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM;QACJ,OAAO,YAAY,CAAC,IAAI,CAAC,MAAuD,CAAC,CAAC;IACpF,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,MAAM;QACJ,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;YACpB,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE;SACzB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,35 @@
1
+ import type { BaseIssue, BaseSchema, BaseSchemaAsync, BaseTransformation, BaseTransformationAsync, BaseValidation, BaseValidationAsync, Config, ErrorMessage, InferInput, InferIssue, IssuePathItem, OutputDataset, UnknownDataset } from '../types/index.js';
2
+ /**
3
+ * Context type.
4
+ */
5
+ type Context = BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>>;
6
+ /**
7
+ * Other interface.
8
+ */
9
+ interface Other<TContext extends Context> {
10
+ input?: unknown | undefined;
11
+ expected?: string | undefined;
12
+ received?: string | undefined;
13
+ message?: ErrorMessage<InferIssue<TContext>> | undefined;
14
+ path?: [IssuePathItem, ...IssuePathItem[]] | undefined;
15
+ issues?: [BaseIssue<InferInput<TContext>>, ...BaseIssue<InferInput<TContext>>[]] | undefined;
16
+ }
17
+ /**
18
+ * Adds an issue to the dataset.
19
+ *
20
+ * @param context The issue context.
21
+ * @param label The issue label.
22
+ * @param dataset The input dataset.
23
+ * @param config The configuration.
24
+ * @param other The optional props.
25
+ *
26
+ * @internal
27
+ */
28
+ export declare function _addIssue<const TContext extends Context>(context: TContext & {
29
+ expects?: string | null;
30
+ requirement?: unknown;
31
+ message?: ErrorMessage<Extract<InferIssue<TContext>, {
32
+ type: TContext['type'];
33
+ }>> | undefined;
34
+ }, label: string, dataset: UnknownDataset | OutputDataset<unknown, BaseIssue<unknown>>, config: Config<InferIssue<TContext>>, other?: Other<TContext>): void;
35
+ export {};