valgen 5.18.2 → 5.19.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 (208) hide show
  1. package/{types/constants.d.ts → constants.d.ts} +1 -0
  2. package/{esm/constants.js → constants.js} +1 -0
  3. package/{esm/core → core}/context.js +12 -2
  4. package/{esm/core → core}/validation-error.js +1 -1
  5. package/{types/index.d.ts → index.d.ts} +63 -59
  6. package/{esm/index.js → index.js} +10 -1
  7. package/package.json +9 -25
  8. package/{types/rules → rules}/type-rules/is-date.d.ts +6 -6
  9. package/{esm/rules → rules}/type-rules/is-date.js +21 -10
  10. package/CHANGELOG.md +0 -384
  11. package/cjs/constants.js +0 -7
  12. package/cjs/core/constants.js +0 -5
  13. package/cjs/core/context.js +0 -74
  14. package/cjs/core/index.js +0 -9
  15. package/cjs/core/types.js +0 -2
  16. package/cjs/core/utilities.js +0 -30
  17. package/cjs/core/validation-error.js +0 -12
  18. package/cjs/core/validator.js +0 -71
  19. package/cjs/factories.js +0 -4
  20. package/cjs/helpers/object.utils.js +0 -18
  21. package/cjs/helpers/omit-undefined.js +0 -14
  22. package/cjs/helpers/string.utils.js +0 -6
  23. package/cjs/index.js +0 -129
  24. package/cjs/package.json +0 -3
  25. package/cjs/rules/format-rules/is-alpha.js +0 -30
  26. package/cjs/rules/format-rules/is-ascii.js +0 -17
  27. package/cjs/rules/format-rules/is-base64.js +0 -18
  28. package/cjs/rules/format-rules/is-btc-address.js +0 -18
  29. package/cjs/rules/format-rules/is-credit-card.js +0 -19
  30. package/cjs/rules/format-rules/is-decimal.js +0 -19
  31. package/cjs/rules/format-rules/is-ean.js +0 -17
  32. package/cjs/rules/format-rules/is-email.js +0 -66
  33. package/cjs/rules/format-rules/is-eth-address.js +0 -18
  34. package/cjs/rules/format-rules/is-fqdn.js +0 -21
  35. package/cjs/rules/format-rules/is-hash.js +0 -18
  36. package/cjs/rules/format-rules/is-hex-color.js +0 -18
  37. package/cjs/rules/format-rules/is-hex.js +0 -18
  38. package/cjs/rules/format-rules/is-iban.js +0 -29
  39. package/cjs/rules/format-rules/is-ip.js +0 -35
  40. package/cjs/rules/format-rules/is-issn.js +0 -21
  41. package/cjs/rules/format-rules/is-jwt.js +0 -17
  42. package/cjs/rules/format-rules/is-lowercase.js +0 -31
  43. package/cjs/rules/format-rules/is-mac-address.js +0 -24
  44. package/cjs/rules/format-rules/is-mobile-phone.js +0 -22
  45. package/cjs/rules/format-rules/is-object-id.js +0 -28
  46. package/cjs/rules/format-rules/is-passport-number.js +0 -19
  47. package/cjs/rules/format-rules/is-port.js +0 -22
  48. package/cjs/rules/format-rules/is-time.js +0 -51
  49. package/cjs/rules/format-rules/is-url.js +0 -20
  50. package/cjs/rules/format-rules/is-uuid.js +0 -20
  51. package/cjs/rules/format-rules/is-vat-number.js +0 -18
  52. package/cjs/rules/format-rules/matches.js +0 -22
  53. package/cjs/rules/index.js +0 -56
  54. package/cjs/rules/logical-rules/is-defined.js +0 -15
  55. package/cjs/rules/logical-rules/is-empty.js +0 -110
  56. package/cjs/rules/logical-rules/is-equal.js +0 -32
  57. package/cjs/rules/logical-rules/range.js +0 -175
  58. package/cjs/rules/type-rules/is-any.js +0 -10
  59. package/cjs/rules/type-rules/is-array.js +0 -45
  60. package/cjs/rules/type-rules/is-bigint.js +0 -21
  61. package/cjs/rules/type-rules/is-boolean.js +0 -31
  62. package/cjs/rules/type-rules/is-date.js +0 -180
  63. package/cjs/rules/type-rules/is-enum.js +0 -31
  64. package/cjs/rules/type-rules/is-integer.js +0 -30
  65. package/cjs/rules/type-rules/is-null.js +0 -54
  66. package/cjs/rules/type-rules/is-number.js +0 -27
  67. package/cjs/rules/type-rules/is-object.js +0 -113
  68. package/cjs/rules/type-rules/is-record.js +0 -42
  69. package/cjs/rules/type-rules/is-string.js +0 -81
  70. package/cjs/rules/type-rules/is-tuple.js +0 -38
  71. package/cjs/rules/type-rules/is-undefined.js +0 -17
  72. package/cjs/rules/utility-rules/all-of.js +0 -20
  73. package/cjs/rules/utility-rules/exists.js +0 -18
  74. package/cjs/rules/utility-rules/get-length.js +0 -29
  75. package/cjs/rules/utility-rules/one-of.js +0 -59
  76. package/cjs/rules/utility-rules/optional.js +0 -15
  77. package/cjs/rules/utility-rules/pipe.js +0 -28
  78. package/cjs/rules/utility-rules/required.js +0 -19
  79. package/cjs/tsconfig-build-cjs.tsbuildinfo +0 -1
  80. package/esm/package.json +0 -3
  81. package/esm/tsconfig-build-esm.tsbuildinfo +0 -1
  82. package/types/index.d.cts +0 -65
  83. /package/{types/core → core}/constants.d.ts +0 -0
  84. /package/{esm/core → core}/constants.js +0 -0
  85. /package/{types/core → core}/context.d.ts +0 -0
  86. /package/{types/core → core}/index.d.ts +0 -0
  87. /package/{esm/core → core}/index.js +0 -0
  88. /package/{types/core → core}/types.d.ts +0 -0
  89. /package/{esm/core → core}/types.js +0 -0
  90. /package/{types/core → core}/utilities.d.ts +0 -0
  91. /package/{esm/core → core}/utilities.js +0 -0
  92. /package/{types/core → core}/validation-error.d.ts +0 -0
  93. /package/{types/core → core}/validator.d.ts +0 -0
  94. /package/{esm/core → core}/validator.js +0 -0
  95. /package/{types/factories.d.ts → factories.d.ts} +0 -0
  96. /package/{esm/factories.js → factories.js} +0 -0
  97. /package/{types/helpers → helpers}/object.utils.d.ts +0 -0
  98. /package/{esm/helpers → helpers}/object.utils.js +0 -0
  99. /package/{types/helpers → helpers}/omit-undefined.d.ts +0 -0
  100. /package/{esm/helpers → helpers}/omit-undefined.js +0 -0
  101. /package/{types/helpers → helpers}/string.utils.d.ts +0 -0
  102. /package/{esm/helpers → helpers}/string.utils.js +0 -0
  103. /package/{types/rules → rules}/format-rules/is-alpha.d.ts +0 -0
  104. /package/{esm/rules → rules}/format-rules/is-alpha.js +0 -0
  105. /package/{types/rules → rules}/format-rules/is-ascii.d.ts +0 -0
  106. /package/{esm/rules → rules}/format-rules/is-ascii.js +0 -0
  107. /package/{types/rules → rules}/format-rules/is-base64.d.ts +0 -0
  108. /package/{esm/rules → rules}/format-rules/is-base64.js +0 -0
  109. /package/{types/rules → rules}/format-rules/is-btc-address.d.ts +0 -0
  110. /package/{esm/rules → rules}/format-rules/is-btc-address.js +0 -0
  111. /package/{types/rules → rules}/format-rules/is-credit-card.d.ts +0 -0
  112. /package/{esm/rules → rules}/format-rules/is-credit-card.js +0 -0
  113. /package/{types/rules → rules}/format-rules/is-decimal.d.ts +0 -0
  114. /package/{esm/rules → rules}/format-rules/is-decimal.js +0 -0
  115. /package/{types/rules → rules}/format-rules/is-ean.d.ts +0 -0
  116. /package/{esm/rules → rules}/format-rules/is-ean.js +0 -0
  117. /package/{types/rules → rules}/format-rules/is-email.d.ts +0 -0
  118. /package/{esm/rules → rules}/format-rules/is-email.js +0 -0
  119. /package/{types/rules → rules}/format-rules/is-eth-address.d.ts +0 -0
  120. /package/{esm/rules → rules}/format-rules/is-eth-address.js +0 -0
  121. /package/{types/rules → rules}/format-rules/is-fqdn.d.ts +0 -0
  122. /package/{esm/rules → rules}/format-rules/is-fqdn.js +0 -0
  123. /package/{types/rules → rules}/format-rules/is-hash.d.ts +0 -0
  124. /package/{esm/rules → rules}/format-rules/is-hash.js +0 -0
  125. /package/{types/rules → rules}/format-rules/is-hex-color.d.ts +0 -0
  126. /package/{esm/rules → rules}/format-rules/is-hex-color.js +0 -0
  127. /package/{types/rules → rules}/format-rules/is-hex.d.ts +0 -0
  128. /package/{esm/rules → rules}/format-rules/is-hex.js +0 -0
  129. /package/{types/rules → rules}/format-rules/is-iban.d.ts +0 -0
  130. /package/{esm/rules → rules}/format-rules/is-iban.js +0 -0
  131. /package/{types/rules → rules}/format-rules/is-ip.d.ts +0 -0
  132. /package/{esm/rules → rules}/format-rules/is-ip.js +0 -0
  133. /package/{types/rules → rules}/format-rules/is-issn.d.ts +0 -0
  134. /package/{esm/rules → rules}/format-rules/is-issn.js +0 -0
  135. /package/{types/rules → rules}/format-rules/is-jwt.d.ts +0 -0
  136. /package/{esm/rules → rules}/format-rules/is-jwt.js +0 -0
  137. /package/{types/rules → rules}/format-rules/is-lowercase.d.ts +0 -0
  138. /package/{esm/rules → rules}/format-rules/is-lowercase.js +0 -0
  139. /package/{types/rules → rules}/format-rules/is-mac-address.d.ts +0 -0
  140. /package/{esm/rules → rules}/format-rules/is-mac-address.js +0 -0
  141. /package/{types/rules → rules}/format-rules/is-mobile-phone.d.ts +0 -0
  142. /package/{esm/rules → rules}/format-rules/is-mobile-phone.js +0 -0
  143. /package/{types/rules → rules}/format-rules/is-object-id.d.ts +0 -0
  144. /package/{esm/rules → rules}/format-rules/is-object-id.js +0 -0
  145. /package/{types/rules → rules}/format-rules/is-passport-number.d.ts +0 -0
  146. /package/{esm/rules → rules}/format-rules/is-passport-number.js +0 -0
  147. /package/{types/rules → rules}/format-rules/is-port.d.ts +0 -0
  148. /package/{esm/rules → rules}/format-rules/is-port.js +0 -0
  149. /package/{types/rules → rules}/format-rules/is-time.d.ts +0 -0
  150. /package/{esm/rules → rules}/format-rules/is-time.js +0 -0
  151. /package/{types/rules → rules}/format-rules/is-url.d.ts +0 -0
  152. /package/{esm/rules → rules}/format-rules/is-url.js +0 -0
  153. /package/{types/rules → rules}/format-rules/is-uuid.d.ts +0 -0
  154. /package/{esm/rules → rules}/format-rules/is-uuid.js +0 -0
  155. /package/{types/rules → rules}/format-rules/is-vat-number.d.ts +0 -0
  156. /package/{esm/rules → rules}/format-rules/is-vat-number.js +0 -0
  157. /package/{types/rules → rules}/format-rules/matches.d.ts +0 -0
  158. /package/{esm/rules → rules}/format-rules/matches.js +0 -0
  159. /package/{types/rules → rules}/index.d.ts +0 -0
  160. /package/{esm/rules → rules}/index.js +0 -0
  161. /package/{types/rules → rules}/logical-rules/is-defined.d.ts +0 -0
  162. /package/{esm/rules → rules}/logical-rules/is-defined.js +0 -0
  163. /package/{types/rules → rules}/logical-rules/is-empty.d.ts +0 -0
  164. /package/{esm/rules → rules}/logical-rules/is-empty.js +0 -0
  165. /package/{types/rules → rules}/logical-rules/is-equal.d.ts +0 -0
  166. /package/{esm/rules → rules}/logical-rules/is-equal.js +0 -0
  167. /package/{types/rules → rules}/logical-rules/range.d.ts +0 -0
  168. /package/{esm/rules → rules}/logical-rules/range.js +0 -0
  169. /package/{types/rules → rules}/type-rules/is-any.d.ts +0 -0
  170. /package/{esm/rules → rules}/type-rules/is-any.js +0 -0
  171. /package/{types/rules → rules}/type-rules/is-array.d.ts +0 -0
  172. /package/{esm/rules → rules}/type-rules/is-array.js +0 -0
  173. /package/{types/rules → rules}/type-rules/is-bigint.d.ts +0 -0
  174. /package/{esm/rules → rules}/type-rules/is-bigint.js +0 -0
  175. /package/{types/rules → rules}/type-rules/is-boolean.d.ts +0 -0
  176. /package/{esm/rules → rules}/type-rules/is-boolean.js +0 -0
  177. /package/{types/rules → rules}/type-rules/is-enum.d.ts +0 -0
  178. /package/{esm/rules → rules}/type-rules/is-enum.js +0 -0
  179. /package/{types/rules → rules}/type-rules/is-integer.d.ts +0 -0
  180. /package/{esm/rules → rules}/type-rules/is-integer.js +0 -0
  181. /package/{types/rules → rules}/type-rules/is-null.d.ts +0 -0
  182. /package/{esm/rules → rules}/type-rules/is-null.js +0 -0
  183. /package/{types/rules → rules}/type-rules/is-number.d.ts +0 -0
  184. /package/{esm/rules → rules}/type-rules/is-number.js +0 -0
  185. /package/{types/rules → rules}/type-rules/is-object.d.ts +0 -0
  186. /package/{esm/rules → rules}/type-rules/is-object.js +0 -0
  187. /package/{types/rules → rules}/type-rules/is-record.d.ts +0 -0
  188. /package/{esm/rules → rules}/type-rules/is-record.js +0 -0
  189. /package/{types/rules → rules}/type-rules/is-string.d.ts +0 -0
  190. /package/{esm/rules → rules}/type-rules/is-string.js +0 -0
  191. /package/{types/rules → rules}/type-rules/is-tuple.d.ts +0 -0
  192. /package/{esm/rules → rules}/type-rules/is-tuple.js +0 -0
  193. /package/{types/rules → rules}/type-rules/is-undefined.d.ts +0 -0
  194. /package/{esm/rules → rules}/type-rules/is-undefined.js +0 -0
  195. /package/{types/rules → rules}/utility-rules/all-of.d.ts +0 -0
  196. /package/{esm/rules → rules}/utility-rules/all-of.js +0 -0
  197. /package/{types/rules → rules}/utility-rules/exists.d.ts +0 -0
  198. /package/{esm/rules → rules}/utility-rules/exists.js +0 -0
  199. /package/{types/rules → rules}/utility-rules/get-length.d.ts +0 -0
  200. /package/{esm/rules → rules}/utility-rules/get-length.js +0 -0
  201. /package/{types/rules → rules}/utility-rules/one-of.d.ts +0 -0
  202. /package/{esm/rules → rules}/utility-rules/one-of.js +0 -0
  203. /package/{types/rules → rules}/utility-rules/optional.d.ts +0 -0
  204. /package/{esm/rules → rules}/utility-rules/optional.js +0 -0
  205. /package/{types/rules → rules}/utility-rules/pipe.d.ts +0 -0
  206. /package/{esm/rules → rules}/utility-rules/pipe.js +0 -0
  207. /package/{types/rules → rules}/utility-rules/required.d.ts +0 -0
  208. /package/{esm/rules → rules}/utility-rules/required.js +0 -0
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.exists = exists;
4
- const index_js_1 = require("../../core/index.js");
5
- /**
6
- * Validates if property exists
7
- * @validator exists
8
- */
9
- function exists(options) {
10
- return (0, index_js_1.validator)('exists', (input, context, _this) => {
11
- if (input !== undefined ||
12
- (context.scope &&
13
- Object.getOwnPropertyDescriptor(context.scope, input))) {
14
- return input;
15
- }
16
- context.fail(_this, `{{label}} must exist`, input);
17
- }, options);
18
- }
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLength = getLength;
4
- const index_js_1 = require("../../core/index.js");
5
- /**
6
- * Returns length of an Array, String, ArrayBuffer, Buffer or any object with the "length" property.
7
- * @validator getLength
8
- */
9
- function getLength() {
10
- return (0, index_js_1.validator)('getLength', (input, context, _this) => {
11
- if (typeof input === 'string')
12
- return input.length;
13
- if (Array.isArray(input))
14
- return input.length;
15
- if (input instanceof ArrayBuffer)
16
- return input.byteLength;
17
- if (input &&
18
- typeof input === 'object' &&
19
- typeof input.length === 'number') {
20
- return input.length;
21
- }
22
- if (input &&
23
- typeof input === 'object' &&
24
- typeof input.size === 'number') {
25
- return input.size;
26
- }
27
- context.fail(_this, `Unable to get length`, input);
28
- });
29
- }
@@ -1,59 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.oneOf = oneOf;
4
- const index_js_1 = require("../../core/index.js");
5
- /**
6
- *
7
- */
8
- function oneOf(rules) {
9
- const l = rules.length;
10
- return (0, index_js_1.validator)('union', (input, context, _this) => {
11
- let i;
12
- let c;
13
- let discriminator;
14
- let v;
15
- let passed = false;
16
- // Mock fail method to prevent errors
17
- context.fail = () => (passed = false);
18
- for (i = 0; i < l; i++) {
19
- passed = true;
20
- if (Array.isArray(rules[i])) {
21
- c = rules[i][0];
22
- discriminator = rules[i][1];
23
- if (!(input &&
24
- typeof input === 'object' &&
25
- typeof discriminator === 'object')) {
26
- continue;
27
- }
28
- try {
29
- for (const k of Object.keys(discriminator)) {
30
- discriminator[k](input[k], context);
31
- if (!passed)
32
- break;
33
- }
34
- if (!passed)
35
- continue;
36
- }
37
- catch {
38
- continue;
39
- }
40
- }
41
- else
42
- c = rules[i];
43
- if (passed)
44
- try {
45
- v = c(input, context);
46
- if (passed)
47
- break;
48
- }
49
- catch {
50
- //
51
- }
52
- }
53
- // Restore fail method
54
- delete context.fail;
55
- if (passed)
56
- return v;
57
- context.fail(_this, `Value didn't match one of required rules`, input);
58
- });
59
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.optional = optional;
4
- const index_js_1 = require("../../core/index.js");
5
- /**
6
- * Makes sub-rule optional
7
- * @validator optional
8
- */
9
- function optional(nested, options) {
10
- return (0, index_js_1.validator)('optional', (input, context) => {
11
- if (input == null)
12
- return input;
13
- return nested(input, context);
14
- }, options);
15
- }
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.pipe = pipe;
4
- const index_js_1 = require("../../core/index.js");
5
- /**
6
- *
7
- * @validator pipe
8
- */
9
- function pipe(rules, options) {
10
- const l = rules.length;
11
- const returnIndex = options?.returnIndex;
12
- return (0, index_js_1.validator)('pipe', (input, context) => {
13
- let i;
14
- let c;
15
- let v = input;
16
- let returnValue = input;
17
- const oldErrors = context.errors.length;
18
- for (i = 0; i < l; i++) {
19
- c = rules[i];
20
- v = c(v, context);
21
- if (returnIndex == null || i <= returnIndex)
22
- returnValue = v;
23
- if (context.errors.length > oldErrors)
24
- return;
25
- }
26
- return returnValue;
27
- }, options);
28
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.required = required;
4
- const index_js_1 = require("../../core/index.js");
5
- /**
6
- * Check if value is not nullish before calling nested rule
7
- * @validator required
8
- */
9
- function required(nested, options) {
10
- return (0, index_js_1.validator)('required', (input, context, _this) => {
11
- if (input == null)
12
- input = options?.default;
13
- if (input == null) {
14
- context.fail(_this, `Value required`, input);
15
- return;
16
- }
17
- return nested(input, context);
18
- }, options);
19
- }
@@ -1 +0,0 @@
1
- {"root":["../../src/constants.ts","../../src/factories.ts","../../src/index.ts","../../src/core/constants.ts","../../src/core/context.ts","../../src/core/index.ts","../../src/core/types.ts","../../src/core/utilities.ts","../../src/core/validation-error.ts","../../src/core/validator.ts","../../src/helpers/object.utils.ts","../../src/helpers/omit-undefined.ts","../../src/helpers/string.utils.ts","../../src/rules/index.ts","../../src/rules/format-rules/is-alpha.ts","../../src/rules/format-rules/is-ascii.ts","../../src/rules/format-rules/is-base64.ts","../../src/rules/format-rules/is-btc-address.ts","../../src/rules/format-rules/is-credit-card.ts","../../src/rules/format-rules/is-decimal.ts","../../src/rules/format-rules/is-ean.ts","../../src/rules/format-rules/is-email.ts","../../src/rules/format-rules/is-eth-address.ts","../../src/rules/format-rules/is-fqdn.ts","../../src/rules/format-rules/is-hash.ts","../../src/rules/format-rules/is-hex-color.ts","../../src/rules/format-rules/is-hex.ts","../../src/rules/format-rules/is-iban.ts","../../src/rules/format-rules/is-ip.ts","../../src/rules/format-rules/is-issn.ts","../../src/rules/format-rules/is-jwt.ts","../../src/rules/format-rules/is-lowercase.ts","../../src/rules/format-rules/is-mac-address.ts","../../src/rules/format-rules/is-mobile-phone.ts","../../src/rules/format-rules/is-object-id.ts","../../src/rules/format-rules/is-passport-number.ts","../../src/rules/format-rules/is-port.ts","../../src/rules/format-rules/is-time.ts","../../src/rules/format-rules/is-url.ts","../../src/rules/format-rules/is-uuid.ts","../../src/rules/format-rules/is-vat-number.ts","../../src/rules/format-rules/matches.ts","../../src/rules/logical-rules/is-defined.ts","../../src/rules/logical-rules/is-empty.ts","../../src/rules/logical-rules/is-equal.ts","../../src/rules/logical-rules/range.ts","../../src/rules/type-rules/is-any.ts","../../src/rules/type-rules/is-array.ts","../../src/rules/type-rules/is-bigint.ts","../../src/rules/type-rules/is-boolean.ts","../../src/rules/type-rules/is-date.ts","../../src/rules/type-rules/is-enum.ts","../../src/rules/type-rules/is-integer.ts","../../src/rules/type-rules/is-null.ts","../../src/rules/type-rules/is-number.ts","../../src/rules/type-rules/is-object.ts","../../src/rules/type-rules/is-record.ts","../../src/rules/type-rules/is-string.ts","../../src/rules/type-rules/is-tuple.ts","../../src/rules/type-rules/is-undefined.ts","../../src/rules/utility-rules/all-of.ts","../../src/rules/utility-rules/exists.ts","../../src/rules/utility-rules/get-length.ts","../../src/rules/utility-rules/one-of.ts","../../src/rules/utility-rules/optional.ts","../../src/rules/utility-rules/pipe.ts","../../src/rules/utility-rules/required.ts"],"version":"5.9.2"}
package/esm/package.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }
@@ -1 +0,0 @@
1
- {"root":["../../src/constants.ts","../../src/factories.ts","../../src/index.ts","../../src/core/constants.ts","../../src/core/context.ts","../../src/core/index.ts","../../src/core/types.ts","../../src/core/utilities.ts","../../src/core/validation-error.ts","../../src/core/validator.ts","../../src/helpers/object.utils.ts","../../src/helpers/omit-undefined.ts","../../src/helpers/string.utils.ts","../../src/rules/index.ts","../../src/rules/format-rules/is-alpha.ts","../../src/rules/format-rules/is-ascii.ts","../../src/rules/format-rules/is-base64.ts","../../src/rules/format-rules/is-btc-address.ts","../../src/rules/format-rules/is-credit-card.ts","../../src/rules/format-rules/is-decimal.ts","../../src/rules/format-rules/is-ean.ts","../../src/rules/format-rules/is-email.ts","../../src/rules/format-rules/is-eth-address.ts","../../src/rules/format-rules/is-fqdn.ts","../../src/rules/format-rules/is-hash.ts","../../src/rules/format-rules/is-hex-color.ts","../../src/rules/format-rules/is-hex.ts","../../src/rules/format-rules/is-iban.ts","../../src/rules/format-rules/is-ip.ts","../../src/rules/format-rules/is-issn.ts","../../src/rules/format-rules/is-jwt.ts","../../src/rules/format-rules/is-lowercase.ts","../../src/rules/format-rules/is-mac-address.ts","../../src/rules/format-rules/is-mobile-phone.ts","../../src/rules/format-rules/is-object-id.ts","../../src/rules/format-rules/is-passport-number.ts","../../src/rules/format-rules/is-port.ts","../../src/rules/format-rules/is-time.ts","../../src/rules/format-rules/is-url.ts","../../src/rules/format-rules/is-uuid.ts","../../src/rules/format-rules/is-vat-number.ts","../../src/rules/format-rules/matches.ts","../../src/rules/logical-rules/is-defined.ts","../../src/rules/logical-rules/is-empty.ts","../../src/rules/logical-rules/is-equal.ts","../../src/rules/logical-rules/range.ts","../../src/rules/type-rules/is-any.ts","../../src/rules/type-rules/is-array.ts","../../src/rules/type-rules/is-bigint.ts","../../src/rules/type-rules/is-boolean.ts","../../src/rules/type-rules/is-date.ts","../../src/rules/type-rules/is-enum.ts","../../src/rules/type-rules/is-integer.ts","../../src/rules/type-rules/is-null.ts","../../src/rules/type-rules/is-number.ts","../../src/rules/type-rules/is-object.ts","../../src/rules/type-rules/is-record.ts","../../src/rules/type-rules/is-string.ts","../../src/rules/type-rules/is-tuple.ts","../../src/rules/type-rules/is-undefined.ts","../../src/rules/utility-rules/all-of.ts","../../src/rules/utility-rules/exists.ts","../../src/rules/utility-rules/get-length.ts","../../src/rules/utility-rules/one-of.ts","../../src/rules/utility-rules/optional.ts","../../src/rules/utility-rules/pipe.ts","../../src/rules/utility-rules/required.ts"],"version":"5.9.2"}
package/types/index.d.cts DELETED
@@ -1,65 +0,0 @@
1
- import * as vg from './rules/index.js';
2
- export * from './constants.js';
3
- export * from './core/index.js';
4
- export type { IsObject } from './rules/type-rules/is-object.js';
5
- declare const isAlpha: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
6
- declare const isAlphanumeric: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
7
- declare const isAny: import("./core/validator.js").Validator<any, any, import("./core/types.js").ExecutionOptions>;
8
- declare const isArray: import("./core/validator.js").Validator<unknown[], unknown, import("./core/types.js").ExecutionOptions>;
9
- declare const isAscii: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
10
- declare const isBase64: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
11
- declare const isBigint: import("./core/validator.js").Validator<bigint, unknown, import("./core/types.js").ExecutionOptions>;
12
- declare const isBoolean: import("./core/validator.js").Validator<boolean | undefined, unknown, import("./core/types.js").ExecutionOptions>;
13
- declare const isBtcAddress: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
14
- declare const isCreditCard: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
15
- declare const isDate: import("./core/validator.js").Validator<Date, string | number | Date, import("./core/types.js").ExecutionOptions>;
16
- declare const isDateString: import("./core/validator.js").Validator<string, string | number | Date, import("./core/types.js").ExecutionOptions>;
17
- declare const isDecimal: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
18
- declare const isDefined: import("./core/validator.js").Validator<any, unknown, import("./core/types.js").ExecutionOptions>;
19
- declare const isEAN: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
20
- declare const isEmail: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
21
- declare const isEmpty: import("./core/validator.js").Validator<any, any, import("./core/types.js").ExecutionOptions>;
22
- declare const isETHAddress: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
23
- declare const isFQDN: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
24
- declare const isHex: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
25
- declare const isHexColor: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
26
- declare const isIBAN: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
27
- declare const isInteger: import("./core/validator.js").Validator<number, unknown, import("./core/types.js").ExecutionOptions>;
28
- declare const isIP: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
29
- declare const isIPRange: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
30
- declare const isISSN: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
31
- declare const isJWT: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
32
- declare const isLowercase: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
33
- declare const isMACAddress: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
34
- declare const isMobilePhone: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
35
- declare const isNotEmpty: import("./core/validator.js").Validator<any, any, import("./core/types.js").ExecutionOptions>;
36
- declare const isNotNull: import("./core/validator.js").Validator<unknown, unknown, import("./core/types.js").ExecutionOptions>;
37
- declare const isNotNullish: import("./core/validator.js").Validator<unknown, unknown, import("./core/types.js").ExecutionOptions>;
38
- declare const isNull: import("./core/validator.js").Validator<null, unknown, import("./core/types.js").ExecutionOptions>;
39
- declare const isNullish: import("./core/validator.js").Validator<null, unknown, import("./core/types.js").ExecutionOptions>;
40
- declare const isNumber: import("./core/validator.js").Validator<number, unknown, import("./core/types.js").ExecutionOptions>;
41
- declare const isObject: vg.IsObject.Validator<object, string | object>;
42
- declare const isObjectId: import("./core/validator.js").Validator<string | vg.ObjectIdLike | Uint8Array<ArrayBufferLike>, unknown, import("./core/types.js").ExecutionOptions>;
43
- declare const isPort: import("./core/validator.js").Validator<number, string | number, import("./core/types.js").ExecutionOptions>;
44
- declare const isString: import("./core/validator.js").Validator<string, unknown, import("./core/types.js").ExecutionOptions>;
45
- declare const isSWIFT: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
46
- declare const isTime: import("./core/validator.js").Validator<string, string | Date, import("./core/types.js").ExecutionOptions>;
47
- declare const isUndefined: import("./core/validator.js").Validator<any, unknown, import("./core/types.js").ExecutionOptions>;
48
- declare const isUppercase: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
49
- declare const isURL: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
50
- declare const isUUID: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
51
- declare const isUUID1: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
52
- declare const isUUID2: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
53
- declare const isUUID3: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
54
- declare const isUUID4: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
55
- declare const isUUID5: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
56
- declare const toArray: import("./core/validator.js").Validator<any[], any, import("./core/types.js").ExecutionOptions>;
57
- declare const toBigint: import("./core/validator.js").Validator<bigint, unknown, import("./core/types.js").ExecutionOptions>;
58
- declare const toBoolean: import("./core/validator.js").Validator<boolean | undefined, unknown, import("./core/types.js").ExecutionOptions>;
59
- declare const toDate: import("./core/validator.js").Validator<Date, string | number | Date, import("./core/types.js").ExecutionOptions>;
60
- declare const toDateString: import("./core/validator.js").Validator<string, string | number | Date, import("./core/types.js").ExecutionOptions>;
61
- declare const toInteger: import("./core/validator.js").Validator<number, unknown, import("./core/types.js").ExecutionOptions>;
62
- declare const toNumber: import("./core/validator.js").Validator<number, unknown, import("./core/types.js").ExecutionOptions>;
63
- declare const toString: import("./core/validator.js").Validator<string, unknown, import("./core/types.js").ExecutionOptions>;
64
- declare const toTime: import("./core/validator.js").Validator<string, string | Date, import("./core/types.js").ExecutionOptions>;
65
- export { isAlpha, isAlphanumeric, isAny, isArray, isAscii, isBase64, isBigint, isBoolean, isBtcAddress, isCreditCard, isDate, isDateString, isDecimal, isDefined, isEAN, isEmail, isEmpty, isETHAddress, isFQDN, isHex, isHexColor, isIBAN, isInteger, isIP, isIPRange, isISSN, isJWT, isLowercase, isMACAddress, isMobilePhone, isNotEmpty, isNotNull, isNotNullish, isNull, isNullish, isNumber, isObject, isObjectId, isPort, isString, isSWIFT, isTime, isUndefined, isUppercase, isURL, isUUID, isUUID1, isUUID2, isUUID3, isUUID4, isUUID5, toArray, toBigint, toBoolean, toDate, toDateString, toInteger, toNumber, toString, toTime, vg, };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes