valgen 5.9.0 → 5.12.0

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 (120) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +3 -3
  3. package/cjs/core/utilities.js +4 -4
  4. package/cjs/rules/format-rules/is-alpha.js +3 -3
  5. package/cjs/rules/format-rules/is-ascii.js +2 -2
  6. package/cjs/rules/format-rules/is-base64.js +2 -2
  7. package/cjs/rules/format-rules/is-btc-address.js +2 -2
  8. package/cjs/rules/format-rules/is-credit-card.js +2 -2
  9. package/cjs/rules/format-rules/is-decimal.js +2 -2
  10. package/cjs/rules/format-rules/is-ean.js +2 -2
  11. package/cjs/rules/format-rules/is-email.js +7 -7
  12. package/cjs/rules/format-rules/is-eth-address.js +2 -2
  13. package/cjs/rules/format-rules/is-fqdn.js +2 -2
  14. package/cjs/rules/format-rules/is-hash.js +2 -2
  15. package/cjs/rules/format-rules/is-hex-color.js +2 -2
  16. package/cjs/rules/format-rules/is-hex.js +2 -2
  17. package/cjs/rules/format-rules/is-iban.js +3 -3
  18. package/cjs/rules/format-rules/is-ip.js +3 -3
  19. package/cjs/rules/format-rules/is-issn.js +2 -2
  20. package/cjs/rules/format-rules/is-jwt.js +2 -2
  21. package/cjs/rules/format-rules/is-lowercase.js +3 -3
  22. package/cjs/rules/format-rules/is-mac-address.js +2 -2
  23. package/cjs/rules/format-rules/is-mobile-phone.js +2 -2
  24. package/cjs/rules/format-rules/is-object-id.js +1 -1
  25. package/cjs/rules/format-rules/is-passport-number.js +2 -2
  26. package/cjs/rules/format-rules/is-port.js +5 -3
  27. package/cjs/rules/format-rules/is-url.js +2 -2
  28. package/cjs/rules/format-rules/is-uuid.js +2 -2
  29. package/cjs/rules/format-rules/is-vat-number.js +2 -2
  30. package/cjs/tsconfig-build-cjs.tsbuildinfo +1 -0
  31. package/esm/core/utilities.js +1 -1
  32. package/esm/rules/format-rules/is-alpha.js +2 -2
  33. package/esm/rules/format-rules/is-ascii.js +2 -2
  34. package/esm/rules/format-rules/is-base64.js +2 -2
  35. package/esm/rules/format-rules/is-btc-address.js +2 -2
  36. package/esm/rules/format-rules/is-credit-card.js +2 -2
  37. package/esm/rules/format-rules/is-decimal.js +2 -2
  38. package/esm/rules/format-rules/is-ean.js +2 -2
  39. package/esm/rules/format-rules/is-email.js +2 -2
  40. package/esm/rules/format-rules/is-eth-address.js +2 -2
  41. package/esm/rules/format-rules/is-fqdn.js +2 -2
  42. package/esm/rules/format-rules/is-hash.js +2 -2
  43. package/esm/rules/format-rules/is-hex-color.js +2 -2
  44. package/esm/rules/format-rules/is-hex.js +2 -2
  45. package/esm/rules/format-rules/is-iban.js +2 -2
  46. package/esm/rules/format-rules/is-ip.js +2 -2
  47. package/esm/rules/format-rules/is-issn.js +2 -2
  48. package/esm/rules/format-rules/is-jwt.js +2 -2
  49. package/esm/rules/format-rules/is-lowercase.js +2 -2
  50. package/esm/rules/format-rules/is-mac-address.js +2 -2
  51. package/esm/rules/format-rules/is-mobile-phone.js +2 -2
  52. package/esm/rules/format-rules/is-object-id.js +1 -1
  53. package/esm/rules/format-rules/is-passport-number.js +2 -2
  54. package/esm/rules/format-rules/is-port.js +5 -3
  55. package/esm/rules/format-rules/is-url.js +2 -2
  56. package/esm/rules/format-rules/is-uuid.js +2 -2
  57. package/esm/rules/format-rules/is-vat-number.js +2 -2
  58. package/esm/rules/logical-rules/is-defined.js +1 -1
  59. package/esm/rules/logical-rules/is-empty.js +1 -1
  60. package/esm/rules/type-rules/is-bigint.js +1 -1
  61. package/esm/rules/type-rules/is-date.js +1 -1
  62. package/esm/rules/type-rules/is-null.js +1 -1
  63. package/esm/rules/type-rules/is-number.js +1 -1
  64. package/esm/rules/utility-rules/exists.js +1 -1
  65. package/esm/rules/utility-rules/union.js +1 -1
  66. package/esm/tsconfig-build-esm.tsbuildinfo +1 -0
  67. package/package.json +5 -5
  68. package/types/core/utilities.d.ts +2 -1
  69. package/types/core/validation-error.d.ts +1 -1
  70. package/types/core/validator.d.ts +2 -2
  71. package/types/index.d.cts +1 -1
  72. package/types/index.d.ts +1 -1
  73. package/types/rules/format-rules/is-alpha.d.ts +1 -1
  74. package/types/rules/format-rules/is-ascii.d.ts +1 -1
  75. package/types/rules/format-rules/is-base64.d.ts +2 -2
  76. package/types/rules/format-rules/is-btc-address.d.ts +1 -1
  77. package/types/rules/format-rules/is-credit-card.d.ts +2 -2
  78. package/types/rules/format-rules/is-decimal.d.ts +1 -1
  79. package/types/rules/format-rules/is-ean.d.ts +1 -1
  80. package/types/rules/format-rules/is-email.d.ts +1 -1
  81. package/types/rules/format-rules/is-eth-address.d.ts +1 -1
  82. package/types/rules/format-rules/is-fqdn.d.ts +1 -1
  83. package/types/rules/format-rules/is-hash.d.ts +2 -2
  84. package/types/rules/format-rules/is-hex-color.d.ts +1 -1
  85. package/types/rules/format-rules/is-hex.d.ts +1 -1
  86. package/types/rules/format-rules/is-iban.d.ts +1 -1
  87. package/types/rules/format-rules/is-ip.d.ts +1 -1
  88. package/types/rules/format-rules/is-issn.d.ts +1 -1
  89. package/types/rules/format-rules/is-jwt.d.ts +1 -1
  90. package/types/rules/format-rules/is-lowercase.d.ts +1 -1
  91. package/types/rules/format-rules/is-mac-address.d.ts +1 -1
  92. package/types/rules/format-rules/is-mobile-phone.d.ts +2 -2
  93. package/types/rules/format-rules/is-object-id.d.ts +1 -1
  94. package/types/rules/format-rules/is-passport-number.d.ts +1 -1
  95. package/types/rules/format-rules/is-port.d.ts +2 -2
  96. package/types/rules/format-rules/is-url.d.ts +2 -2
  97. package/types/rules/format-rules/is-uuid.d.ts +1 -1
  98. package/types/rules/format-rules/is-vat-number.d.ts +1 -1
  99. package/types/rules/format-rules/matches.d.ts +1 -1
  100. package/types/rules/logical-rules/is-defined.d.ts +1 -1
  101. package/types/rules/logical-rules/is-empty.d.ts +1 -1
  102. package/types/rules/logical-rules/range.d.ts +1 -1
  103. package/types/rules/type-rules/is-array.d.ts +1 -1
  104. package/types/rules/type-rules/is-bigint.d.ts +1 -1
  105. package/types/rules/type-rules/is-boolean.d.ts +1 -1
  106. package/types/rules/type-rules/is-date.d.ts +1 -1
  107. package/types/rules/type-rules/is-enum.d.ts +1 -1
  108. package/types/rules/type-rules/is-integer.d.ts +1 -1
  109. package/types/rules/type-rules/is-null.d.ts +1 -1
  110. package/types/rules/type-rules/is-number.d.ts +1 -1
  111. package/types/rules/type-rules/is-object.d.ts +1 -1
  112. package/types/rules/type-rules/is-record.d.ts +1 -1
  113. package/types/rules/type-rules/is-string.d.ts +1 -1
  114. package/types/rules/type-rules/is-tuple.d.ts +1 -1
  115. package/types/rules/type-rules/is-undefined.d.ts +1 -1
  116. package/types/rules/utility-rules/exists.d.ts +1 -1
  117. package/types/rules/utility-rules/optional.d.ts +2 -2
  118. package/types/rules/utility-rules/pipe.d.ts +1 -1
  119. package/types/rules/utility-rules/required.d.ts +2 -2
  120. package/types/rules/utility-rules/union.d.ts +1 -1
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is an "UUID".
4
4
  * @validator isUUID
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is an VAT number
4
4
  * @validator isVAT
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  export interface IsRegExpOptions extends ValidationOptions {
3
3
  formatName?: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is not "undefined" nor "null"
4
4
  * @validator isDefined
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  type IsEmptyInput = string | any[] | object | Set<any> | Map<any, any>;
3
3
  /**
4
4
  * Checks if value is an empty. Value should be string, array, set, map or object
@@ -1,4 +1,4 @@
1
- import { ValidationOptions, Validator } from '../../core/index.js';
1
+ import { type ValidationOptions, type Validator } from '../../core/index.js';
2
2
  type RangeInput = number | bigint | Date | string;
3
3
  /**
4
4
  * Checks if value is between minValue and maxValue
@@ -1,4 +1,4 @@
1
- import { ValidationOptions, Validator } from '../../core/index.js';
1
+ import { type ValidationOptions, type Validator } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is "array" and applies validation for each item.
4
4
  * Converts input value to array if coerce option is set to 'true'.
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is "BigInt".
4
4
  * Converts input value to number if coerce option is set to 'true'.
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is "boolean".
4
4
  * Converts input value to boolean if coerce option is set to 'true'.
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is instance of "Date".
4
4
  * Converts input value to Date if coerce option is set to 'true'.
@@ -1,4 +1,4 @@
1
- import { ValidationOptions, Validator } from '../../core/index.js';
1
+ import { type ValidationOptions, type Validator } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if given value is one of enum values.
4
4
  * @validator isEnum
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is "integer".
4
4
  * Converts input value to integer number if coerce option is set to 'true'.
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is "null".
4
4
  * @validator isNull
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is "number".
4
4
  * Converts input value to number if coerce option is set to 'true'.
@@ -1,4 +1,4 @@
1
- import { Type, ValidationOptions, Validator as Validator_ } from '../../core/index.js';
1
+ import { type Type, type ValidationOptions, type Validator as Validator_ } from '../../core/index.js';
2
2
  export declare namespace IsObject {
3
3
  interface Validator<T extends object = object, I = object> extends Validator_<T, I> {
4
4
  schema: Schema;
@@ -1,4 +1,4 @@
1
- import { ValidationOptions, Validator } from '../../core/index.js';
1
+ import { type ValidationOptions, type Validator } from '../../core/index.js';
2
2
  /**
3
3
  * Validates record object according to given "key" and "value" rules
4
4
  * Converts properties according to rules if coerce option is set to 'true'.
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is "string".
4
4
  * Converts input value to string if coerce option is set to 'true'.
@@ -1,4 +1,4 @@
1
- import { ValidationOptions, Validator } from '../../core/index.js';
1
+ import { type ValidationOptions, type Validator } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is "tuple" and applies validation for each item.
4
4
  * Converts input value to tuple if coerce option is set to 'true'.
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if value is "undefined"
4
4
  * @validator isUndefined
@@ -1,4 +1,4 @@
1
- import { ValidationOptions } from '../../core/index.js';
1
+ import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
3
  * Validates if property exists
4
4
  * @validator exists
@@ -1,5 +1,5 @@
1
- import { Nullish } from 'ts-gems';
2
- import { ValidationOptions, Validator } from '../../core/index.js';
1
+ import type { Nullish } from 'ts-gems';
2
+ import { type ValidationOptions, type Validator } from '../../core/index.js';
3
3
  /**
4
4
  * Makes sub-rule optional
5
5
  * @validator optional
@@ -1,4 +1,4 @@
1
- import { ValidationOptions, Validator } from '../../core/index.js';
1
+ import { type ValidationOptions, type Validator } from '../../core/index.js';
2
2
  export interface PipeOptions extends ValidationOptions {
3
3
  returnIndex?: number;
4
4
  }
@@ -1,5 +1,5 @@
1
- import { Nullish } from 'ts-gems';
2
- import { ValidationOptions, Validator } from '../../core/index.js';
1
+ import type { Nullish } from 'ts-gems';
2
+ import { type ValidationOptions, type Validator } from '../../core/index.js';
3
3
  /**
4
4
  * Makes sub-rule required
5
5
  * @validator required
@@ -1,4 +1,4 @@
1
- import { Validator } from '../../core/index.js';
1
+ import { type Validator } from '../../core/index.js';
2
2
  /**
3
3
  *
4
4
  */