@clementine-solutions/jane-io 1.0.0 → 1.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 (205) hide show
  1. package/README.md +132 -1
  2. package/dist/core/analysis/diff.d.ts +35 -0
  3. package/dist/core/analysis/explain.d.ts +35 -0
  4. package/dist/core/analysis/index.d.ts +14 -0
  5. package/dist/core/analysis/replay.d.ts +34 -0
  6. package/dist/core/analysis/telemetry.d.ts +28 -0
  7. package/dist/core/boundary-rules/at-most-one.d.ts +17 -0
  8. package/dist/core/boundary-rules/conditionally-required.d.ts +18 -0
  9. package/dist/core/boundary-rules/date-range.d.ts +17 -0
  10. package/dist/core/boundary-rules/index.d.ts +18 -0
  11. package/dist/core/boundary-rules/mutually-exclusive.d.ts +16 -0
  12. package/dist/core/boundary-rules/no-unknown-fields.d.ts +17 -0
  13. package/dist/core/boundary-rules/require-all.d.ts +16 -0
  14. package/dist/core/boundary-rules/require-one.d.ts +17 -0
  15. package/dist/core/common/events.d.ts +37 -0
  16. package/dist/core/common/fluent.d.ts +151 -0
  17. package/dist/core/common/index.d.ts +16 -0
  18. package/dist/core/common/policy.d.ts +170 -0
  19. package/dist/core/common/utilities.d.ts +59 -0
  20. package/dist/core/common/wildcard.d.ts +27 -0
  21. package/dist/core/field-path/construct.d.ts +77 -0
  22. package/dist/core/field-path/format.d.ts +41 -0
  23. package/dist/core/field-path/index.d.ts +14 -0
  24. package/dist/core/field-path/utilities.d.ts +85 -0
  25. package/dist/core/field-path/walk.d.ts +36 -0
  26. package/dist/core/fluent-registry.d.ts +138 -0
  27. package/dist/core/normalizers/array/compact-sparse-array.d.ts +22 -0
  28. package/dist/core/normalizers/array/flatten-one-level.d.ts +17 -0
  29. package/dist/core/normalizers/array/remove-empty-string-items.d.ts +6 -0
  30. package/dist/core/normalizers/array/remove-null-items.d.ts +16 -0
  31. package/dist/core/normalizers/array/remove-undefined-items.d.ts +16 -0
  32. package/dist/core/normalizers/date/invalid-date-to-undefined.d.ts +17 -0
  33. package/dist/core/normalizers/index.d.ts +28 -0
  34. package/dist/core/normalizers/normalizer-register.d.ts +17 -0
  35. package/dist/core/normalizers/number/infinity-to-undefined.d.ts +18 -0
  36. package/dist/core/normalizers/number/nan-to-undefined.d.ts +17 -0
  37. package/dist/core/normalizers/number/normalize-negative-zero.d.ts +16 -0
  38. package/dist/core/normalizers/object/remove-empty-array-keys.d.ts +17 -0
  39. package/dist/core/normalizers/object/remove-empty-object-keys.d.ts +16 -0
  40. package/dist/core/normalizers/object/remove-empty-string-keys.d.ts +16 -0
  41. package/dist/core/normalizers/object/remove-null-keys.d.ts +16 -0
  42. package/dist/core/normalizers/object/remove-undefined-keys.d.ts +16 -0
  43. package/dist/core/normalizers/string/collapse-whitespace.d.ts +17 -0
  44. package/dist/core/normalizers/string/empty-to-undefined.d.ts +16 -0
  45. package/dist/core/normalizers/string/trim.d.ts +16 -0
  46. package/dist/core/parsers/index.d.ts +22 -0
  47. package/dist/core/parsers/parse-array-string.d.ts +16 -0
  48. package/dist/core/parsers/parse-bigint-string.d.ts +16 -0
  49. package/dist/core/parsers/parse-binary-string.d.ts +16 -0
  50. package/dist/core/parsers/parse-boolean-string.d.ts +16 -0
  51. package/dist/core/parsers/parse-date-string.d.ts +16 -0
  52. package/dist/core/parsers/parse-duration-string.d.ts +16 -0
  53. package/dist/core/parsers/parse-hex-string.d.ts +16 -0
  54. package/dist/core/parsers/parse-integer-string.d.ts +16 -0
  55. package/dist/core/parsers/parse-json-string.d.ts +17 -0
  56. package/dist/core/parsers/parse-numeric-string.d.ts +16 -0
  57. package/dist/core/parsers/parse-object-string.d.ts +16 -0
  58. package/dist/core/parsers/parse-octal-string.d.ts +16 -0
  59. package/dist/core/parsers/parse-scientific-notation-string.d.ts +16 -0
  60. package/dist/core/parsers/parse-url-string.d.ts +16 -0
  61. package/dist/core/pipeline/boundary.d.ts +36 -0
  62. package/dist/core/pipeline/contain.d.ts +122 -0
  63. package/dist/core/pipeline/index.d.ts +16 -0
  64. package/dist/core/pipeline/normalize.d.ts +34 -0
  65. package/dist/core/pipeline/parse.d.ts +40 -0
  66. package/dist/core/pipeline/pipeline.d.ts +23 -0
  67. package/dist/core/pipeline/scan.d.ts +46 -0
  68. package/dist/core/pipeline/validate.d.ts +40 -0
  69. package/dist/core/scanners/any/scan-for-sentinels.d.ts +19 -0
  70. package/dist/core/scanners/array/array-is-deep.d.ts +19 -0
  71. package/dist/core/scanners/array/array-is-heterogenous.d.ts +18 -0
  72. package/dist/core/scanners/array/array-is-large.d.ts +19 -0
  73. package/dist/core/scanners/bigint/bigint-is-large.d.ts +20 -0
  74. package/dist/core/scanners/bigint/bigint-not-safe.d.ts +20 -0
  75. package/dist/core/scanners/date/date-is-before-epoch.d.ts +19 -0
  76. package/dist/core/scanners/date/date-is-far-future.d.ts +19 -0
  77. package/dist/core/scanners/date/date-is-invalid.d.ts +19 -0
  78. package/dist/core/scanners/index.d.ts +31 -0
  79. package/dist/core/scanners/number/number-is-infinite.d.ts +19 -0
  80. package/dist/core/scanners/number/number-is-nan.d.ts +19 -0
  81. package/dist/core/scanners/number/number-is-too-large.d.ts +20 -0
  82. package/dist/core/scanners/number/number-is-unsafe-integer.d.ts +19 -0
  83. package/dist/core/scanners/object/object-has-circular-references.d.ts +20 -0
  84. package/dist/core/scanners/object/object-has-many-keys.d.ts +19 -0
  85. package/dist/core/scanners/object/object-is-deep.d.ts +20 -0
  86. package/dist/core/scanners/scanner-registry.d.ts +19 -0
  87. package/dist/core/scanners/string/string-has-unsafe-unicode.d.ts +19 -0
  88. package/dist/core/scanners/string/string-has-whitespace-edges.d.ts +19 -0
  89. package/dist/core/scanners/string/string-is-long.d.ts +19 -0
  90. package/dist/core/scanners/unknown/unknown-not-scannable.d.ts +21 -0
  91. package/dist/core/shapes/analysis.d.ts +239 -0
  92. package/dist/core/shapes/boundary.d.ts +126 -0
  93. package/dist/core/shapes/events.d.ts +83 -0
  94. package/dist/core/shapes/field-path.d.ts +51 -0
  95. package/dist/core/shapes/index.d.ts +21 -0
  96. package/dist/core/shapes/normalize.d.ts +59 -0
  97. package/dist/core/shapes/parse.d.ts +75 -0
  98. package/dist/core/shapes/pipeline.d.ts +149 -0
  99. package/dist/core/shapes/policy.d.ts +158 -0
  100. package/dist/core/shapes/public.d.ts +92 -0
  101. package/dist/core/shapes/scan.d.ts +126 -0
  102. package/dist/core/shapes/validate.d.ts +65 -0
  103. package/dist/core/validators/array/array-max-items.d.ts +25 -0
  104. package/dist/core/validators/array/array-min-items.d.ts +25 -0
  105. package/dist/core/validators/array/array.d.ts +22 -0
  106. package/dist/core/validators/array/excludes.d.ts +25 -0
  107. package/dist/core/validators/array/has-unique-items.d.ts +24 -0
  108. package/dist/core/validators/array/includes.d.ts +24 -0
  109. package/dist/core/validators/array/items-equal.d.ts +25 -0
  110. package/dist/core/validators/array/no-empty-string-items.d.ts +24 -0
  111. package/dist/core/validators/array/no-null-items.d.ts +24 -0
  112. package/dist/core/validators/array/no-undefined-items.d.ts +24 -0
  113. package/dist/core/validators/array/non-empty-array.d.ts +24 -0
  114. package/dist/core/validators/array/not-sparse.d.ts +25 -0
  115. package/dist/core/validators/bigint/bigint-equals.d.ts +24 -0
  116. package/dist/core/validators/bigint/bigint-max.d.ts +25 -0
  117. package/dist/core/validators/bigint/bigint-min.d.ts +25 -0
  118. package/dist/core/validators/bigint/bigint-negative.d.ts +23 -0
  119. package/dist/core/validators/bigint/bigint-non-negative.d.ts +24 -0
  120. package/dist/core/validators/bigint/bigint-non-positive.d.ts +24 -0
  121. package/dist/core/validators/bigint/bigint-positive.d.ts +24 -0
  122. package/dist/core/validators/bigint/bigint-safe.d.ts +25 -0
  123. package/dist/core/validators/bigint/bigint.d.ts +20 -0
  124. package/dist/core/validators/boolean/boolean.d.ts +21 -0
  125. package/dist/core/validators/boolean/is-false.d.ts +22 -0
  126. package/dist/core/validators/boolean/is-true.d.ts +22 -0
  127. package/dist/core/validators/common/is-country-code.d.ts +17 -0
  128. package/dist/core/validators/common/is-currency-code.d.ts +17 -0
  129. package/dist/core/validators/common/is-email-strict.d.ts +17 -0
  130. package/dist/core/validators/common/is-email.d.ts +17 -0
  131. package/dist/core/validators/common/is-ip.d.ts +17 -0
  132. package/dist/core/validators/common/is-phone-strict.d.ts +17 -0
  133. package/dist/core/validators/common/is-phone.d.ts +17 -0
  134. package/dist/core/validators/common/is-port.d.ts +17 -0
  135. package/dist/core/validators/common/is-postal-code.d.ts +17 -0
  136. package/dist/core/validators/common/is-url.d.ts +17 -0
  137. package/dist/core/validators/common/is-uuid.d.ts +17 -0
  138. package/dist/core/validators/date/before-epoch.d.ts +28 -0
  139. package/dist/core/validators/date/date-now-required.d.ts +22 -0
  140. package/dist/core/validators/date/is-date.d.ts +21 -0
  141. package/dist/core/validators/date/is-far-future.d.ts +23 -0
  142. package/dist/core/validators/date/is-future.d.ts +24 -0
  143. package/dist/core/validators/date/is-past.d.ts +24 -0
  144. package/dist/core/validators/date/not-after.d.ts +25 -0
  145. package/dist/core/validators/date/not-before.d.ts +25 -0
  146. package/dist/core/validators/date/same-day.d.ts +25 -0
  147. package/dist/core/validators/date/same-month.d.ts +25 -0
  148. package/dist/core/validators/date/same-year.d.ts +24 -0
  149. package/dist/core/validators/date/too-early.d.ts +25 -0
  150. package/dist/core/validators/date/too-late.d.ts +25 -0
  151. package/dist/core/validators/date/weekday.d.ts +32 -0
  152. package/dist/core/validators/date/weekend.d.ts +27 -0
  153. package/dist/core/validators/index.d.ts +112 -0
  154. package/dist/core/validators/nullish/is-null-or-undefined.d.ts +22 -0
  155. package/dist/core/validators/nullish/is-null.d.ts +21 -0
  156. package/dist/core/validators/nullish/is-undefined.d.ts +21 -0
  157. package/dist/core/validators/number/finite.d.ts +22 -0
  158. package/dist/core/validators/number/integer.d.ts +22 -0
  159. package/dist/core/validators/number/less-than.d.ts +21 -0
  160. package/dist/core/validators/number/max.d.ts +21 -0
  161. package/dist/core/validators/number/min.d.ts +21 -0
  162. package/dist/core/validators/number/more-than.d.ts +21 -0
  163. package/dist/core/validators/number/negative.d.ts +20 -0
  164. package/dist/core/validators/number/non-negative.d.ts +19 -0
  165. package/dist/core/validators/number/non-positive.d.ts +19 -0
  166. package/dist/core/validators/number/number.d.ts +19 -0
  167. package/dist/core/validators/number/positive.d.ts +20 -0
  168. package/dist/core/validators/number/safe-integer.d.ts +19 -0
  169. package/dist/core/validators/object/deep-equals.d.ts +24 -0
  170. package/dist/core/validators/object/has-key.d.ts +23 -0
  171. package/dist/core/validators/object/has-value.d.ts +27 -0
  172. package/dist/core/validators/object/keys-equal.d.ts +26 -0
  173. package/dist/core/validators/object/max-keys.d.ts +24 -0
  174. package/dist/core/validators/object/min-keys.d.ts +24 -0
  175. package/dist/core/validators/object/missing-key.d.ts +23 -0
  176. package/dist/core/validators/object/no-empty-array-values.d.ts +23 -0
  177. package/dist/core/validators/object/no-empty-object-values.d.ts +23 -0
  178. package/dist/core/validators/object/no-null-values.d.ts +23 -0
  179. package/dist/core/validators/object/no-undefined-values.d.ts +23 -0
  180. package/dist/core/validators/object/non-empty-object.d.ts +21 -0
  181. package/dist/core/validators/object/only-keys.d.ts +23 -0
  182. package/dist/core/validators/object/plain-object.d.ts +22 -0
  183. package/dist/core/validators/string/alpha-num.d.ts +23 -0
  184. package/dist/core/validators/string/alpha.d.ts +24 -0
  185. package/dist/core/validators/string/chars-equal.d.ts +23 -0
  186. package/dist/core/validators/string/ends-with.d.ts +23 -0
  187. package/dist/core/validators/string/is-ascii.d.ts +24 -0
  188. package/dist/core/validators/string/is-printable.d.ts +25 -0
  189. package/dist/core/validators/string/matches.d.ts +23 -0
  190. package/dist/core/validators/string/max-length.d.ts +24 -0
  191. package/dist/core/validators/string/min-length.d.ts +24 -0
  192. package/dist/core/validators/string/no-lead-space.d.ts +23 -0
  193. package/dist/core/validators/string/no-repeat-space.d.ts +25 -0
  194. package/dist/core/validators/string/no-space.d.ts +24 -0
  195. package/dist/core/validators/string/no-trail-space.d.ts +23 -0
  196. package/dist/core/validators/string/non-empty.d.ts +22 -0
  197. package/dist/core/validators/string/not-one-of.d.ts +24 -0
  198. package/dist/core/validators/string/num-string.d.ts +23 -0
  199. package/dist/core/validators/string/one-of.d.ts +23 -0
  200. package/dist/core/validators/string/starts-with.d.ts +23 -0
  201. package/dist/core/validators/string/string.d.ts +21 -0
  202. package/dist/core/validators/string/trimmed.d.ts +24 -0
  203. package/dist/index.d.ts +83 -0
  204. package/dist/test.d.ts +1 -0
  205. package/package.json +2 -2
@@ -0,0 +1,22 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Compact Sparse Array
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Removes sparse array holes while preserving all defined
7
+ * elements, producing a dense structure without altering the
8
+ * array’s semantic content.
9
+ * @see https://jane-io.com
10
+ * ----------------------------------------------------------------------------
11
+ */
12
+ import type { NormalizationRule } from '../../shapes';
13
+ /**
14
+ * Compacts sparse arrays by removing empty slots while preserving all defined
15
+ * elements. This targets only structural holes—never values—ensuring arrays
16
+ * become dense without altering their semantic content.
17
+ *
18
+ * Useful for normalizing inputs that originate from user interfaces, spread
19
+ * operations, or partial constructions where sparse positions may appear
20
+ * unintentionally.
21
+ */
22
+ export declare const compactSparseArray: NormalizationRule<unknown>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Remove Empty String Items
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Removes empty string entries from arrays, eliminating
7
+ * placeholder or accidental text values.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { NormalizationRule } from '../../shapes';
12
+ /**
13
+ * Flattens nested arrays by a single level, simplifying structure while
14
+ * preserving item order. Useful for normalizing inputs where shallow nesting
15
+ * appears unintentionally.
16
+ */
17
+ export declare const flattenOneLevel: NormalizationRule<unknown>;
@@ -0,0 +1,6 @@
1
+ import type { NormalizationRule } from '../../shapes';
2
+ /**
3
+ * Removes empty string entries from arrays, eliminating placeholder or
4
+ * accidental text values while preserving all meaningful items.
5
+ */
6
+ export declare const removeEmptyStringItems: NormalizationRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Remove Null Items
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Filters out null entries from arrays, removing structurally
7
+ * empty items while preserving all defined values.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { NormalizationRule } from '../../shapes';
12
+ /**
13
+ * Filters out null entries from arrays, removing structurally empty items
14
+ * without altering the order or meaning of defined values.
15
+ */
16
+ export declare const removeNullItems: NormalizationRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Remove Undefined Items
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Removes undefined entries from arrays, producing a cleaner
7
+ * and more predictable sequence of defined values.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { NormalizationRule } from '../../shapes';
12
+ /**
13
+ * Removes undefined entries from arrays, producing a cleaner and more
14
+ * predictable sequence of defined values.
15
+ */
16
+ export declare const removeUndefinedItems: NormalizationRule<unknown>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Invalid Date To Undefined
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Converts invalid Date instances (timestamp NaN) to undefined,
7
+ * preventing malformed or unparsable date values from
8
+ * propagating through normalization.
9
+ * @see https://jane-io.com
10
+ * ----------------------------------------------------------------------------
11
+ */
12
+ import type { NormalizationRule } from '../../shapes';
13
+ /**
14
+ * Converts invalid Date instances (timestamp NaN) to undefined, ensuring that
15
+ * malformed or unparsable date values do not propagate through normalization.
16
+ */
17
+ export declare const invalidDateToUndefined: NormalizationRule<unknown>;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Barrel File
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Re‑exports all normalization rules, providing a single,
7
+ * consolidated entry point for the normalization subsystem.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ export { compactSparseArray } from './array/compact-sparse-array';
12
+ export { flattenOneLevel } from './array/flatten-one-level';
13
+ export { removeEmptyStringItems } from './array/remove-empty-string-items';
14
+ export { removeNullItems } from './array/remove-null-items';
15
+ export { removeUndefinedItems } from './array/remove-undefined-items';
16
+ export { invalidDateToUndefined } from './date/invalid-date-to-undefined';
17
+ export { infinityToUndefined } from './number/infinity-to-undefined';
18
+ export { nanToUndefined } from './number/nan-to-undefined';
19
+ export { normalizeNegativeZero } from './number/normalize-negative-zero';
20
+ export { removeEmptyArrayKeys } from './object/remove-empty-array-keys';
21
+ export { removeEmptyObjectKeys } from './object/remove-empty-object-keys';
22
+ export { removeEmptyStringKeys } from './object/remove-empty-string-keys';
23
+ export { removeNullKeys } from './object/remove-null-keys';
24
+ export { removeUndefinedKeys } from './object/remove-undefined-keys';
25
+ export { collapseWhitespace } from './string/collapse-whitespace';
26
+ export { emptyToUndefined } from './string/empty-to-undefined';
27
+ export { trim } from './string/trim';
28
+ export { normalizationRuleRegistry } from './normalizer-register';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Public | Normalizer Registry
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Exposes the full mapping of structural types to their
7
+ * associated normalization rules, defining Jane’s public
8
+ * normalization pipeline surface.
9
+ * @see https://jane-io.com
10
+ * ----------------------------------------------------------------------------
11
+ */
12
+ import type { NormalizationRule, StructuralType } from '../shapes';
13
+ /**
14
+ * Maps each structural type to the normalization rules that apply to it,
15
+ * defining the full normalization pipeline Jane runs for incoming values.
16
+ */
17
+ export declare const normalizationRuleRegistry: Record<StructuralType, readonly NormalizationRule[]>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Infinity To Undefined
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Converts `Infinity` and `-Infinity` to `undefined`, removing
7
+ * non‑finite numeric values that cannot be represented or
8
+ * validated safely.
9
+ * @see https://jane-io.com
10
+ * ----------------------------------------------------------------------------
11
+ */
12
+ import type { NormalizationRule } from '../../shapes';
13
+ /**
14
+ * Converts `Infinity` and `-Infinity` to `undefined`, removing non‑finite
15
+ * numeric values that cannot be represented safely across serialization or
16
+ * downstream validation.
17
+ */
18
+ export declare const infinityToUndefined: NormalizationRule<unknown>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | NaN to Undefined
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Converts `NaN` to `undefined`, eliminating invalid numeric
7
+ * states that cannot be compared, serialized, or reasoned
8
+ * about reliably.
9
+ * @see https://jane-io.com
10
+ * ----------------------------------------------------------------------------
11
+ */
12
+ import type { NormalizationRule } from '../../shapes';
13
+ /**
14
+ * Converts `NaN` to `undefined`, eliminating invalid numeric states that cannot
15
+ * be meaningfully compared, serialized, or validated.
16
+ */
17
+ export declare const nanToUndefined: NormalizationRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Normalize Negative Zero
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Normalizes `-0` to `0`, removing a JavaScript‑specific edge
7
+ * case while preserving the value’s intended semantics.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { NormalizationRule } from '../../shapes';
12
+ /**
13
+ * Normalizes `-0` to `0`, removing a JavaScript‑specific numeric edge case
14
+ * while preserving the value’s intended semantics.
15
+ */
16
+ export declare const normalizeNegativeZero: NormalizationRule<unknown>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Remove Empty Array Keys
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Removes keys whose values are empty arrays, eliminating
7
+ * structurally empty list fields while preserving all
8
+ * non‑empty array data.
9
+ * @see https://jane-io.com
10
+ * ----------------------------------------------------------------------------
11
+ */
12
+ import type { NormalizationRule } from '../../shapes';
13
+ /**
14
+ * Removes keys whose values are empty arrays, eliminating structurally empty
15
+ * list fields while preserving all non‑empty array values.
16
+ */
17
+ export declare const removeEmptyArrayKeys: NormalizationRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Remove Empty Object Keys
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Removes keys whose values are empty plain objects, clearing
7
+ * fields that carry no structural or semantic content.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { NormalizationRule } from '../../shapes';
12
+ /**
13
+ * Removes keys whose values are empty plain objects, filtering out fields that
14
+ * carry no structural or semantic content.
15
+ */
16
+ export declare const removeEmptyObjectKeys: NormalizationRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Remove Empty String Keys
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Removes keys whose values are empty strings, eliminating
7
+ * placeholder or accidental text fields.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { NormalizationRule } from '../../shapes';
12
+ /**
13
+ * Removes keys whose values are empty strings, clearing out placeholder or
14
+ * accidental text fields while retaining all meaningful values.
15
+ */
16
+ export declare const removeEmptyStringKeys: NormalizationRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Remove Null Keys
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Removes keys whose values are null, stripping explicitly
7
+ * empty fields while preserving all defined data.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { NormalizationRule } from '../../shapes';
12
+ /**
13
+ * Removes keys whose values are null, eliminating explicitly empty fields while
14
+ * preserving all defined data.
15
+ */
16
+ export declare const removeNullKeys: NormalizationRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Remove Undefined Keys
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Removes keys whose values are undefined, producing a cleaner
7
+ * and more predictable object shape.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { NormalizationRule } from '../../shapes';
12
+ /**
13
+ * Removes keys whose values are undefined, producing a cleaner and more
14
+ * predictable object shape by stripping absent fields.
15
+ */
16
+ export declare const removeUndefinedKeys: NormalizationRule<unknown>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Collapse Whitespace
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Collapses repeated internal whitespace into a single space,
7
+ * producing cleaner, more consistent text without altering
8
+ * meaning.
9
+ * @see https://jane-io.com
10
+ * ----------------------------------------------------------------------------
11
+ */
12
+ import type { NormalizationRule } from '../../shapes';
13
+ /**
14
+ * Collapses repeated internal whitespace into a single space, producing a
15
+ * cleaner and more consistent text structure without altering meaning.
16
+ */
17
+ export declare const collapseWhitespace: NormalizationRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Empty To Undefined
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Converts empty strings to undefined, removing text fields
7
+ * that contain no meaningful content.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { NormalizationRule } from '../../shapes';
12
+ /**
13
+ * Converts empty strings to undefined, removing text fields that contain no
14
+ * meaningful content.
15
+ */
16
+ export declare const emptyToUndefined: NormalizationRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Normalizers | Trim
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Removes leading and trailing whitespace, normalizing text
7
+ * edges while preserving internal content exactly as provided.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { NormalizationRule } from '../../shapes';
12
+ /**
13
+ * Trims leading and trailing whitespace, normalizing text edges while
14
+ * preserving the internal content exactly as provided.
15
+ */
16
+ export declare const trim: NormalizationRule<unknown>;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Barrel File
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Re‑exports all parser implementations, providing a unified
7
+ * entry point for Jane’s parsing subsystem.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ export { parseArrayString } from './parse-array-string';
12
+ export { parseJsonString } from './parse-json-string';
13
+ export { parseBigIntString } from './parse-bigint-string';
14
+ export { parseBinaryString } from './parse-binary-string';
15
+ export { parseHexString } from './parse-hex-string';
16
+ export { parseOctalString } from './parse-octal-string';
17
+ export { parseBooleanString } from './parse-boolean-string';
18
+ export { parseIsoDateString } from './parse-date-string';
19
+ export { parseDurationString } from './parse-duration-string';
20
+ export { parseNumericString } from './parse-numeric-string';
21
+ export { parseObjectString } from './parse-object-string';
22
+ export { parseUrlString } from './parse-url-string';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse Array String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses JSON‑compatible array strings into actual arrays,
7
+ * rejecting ambiguous or non‑array input.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses JSON‑compatible array strings into actual arrays, rejecting anything
14
+ * that is not a syntactically valid array literal.
15
+ */
16
+ export declare const parseArrayString: ParseRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse Bigint String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses canonical decimal bigint literals into `bigint`
7
+ * values, enforcing strict, non‑guessing numeric rules.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses canonical decimal bigint strings into `bigint` values, enforcing a
14
+ * strict digits‑only format with an optional leading minus.
15
+ */
16
+ export declare const parseBigIntString: ParseRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse Binary String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses binary string literals (0b…) into `bigint` values,
7
+ * validating format and rejecting malformed input.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses binary string literals (`0b…`) into `bigint` values, validating format
14
+ * and rejecting malformed or non‑binary input.
15
+ */
16
+ export declare const parseBinaryString: ParseRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse Boolean String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses strict boolean strings (`"true"` / `"false"`) into
7
+ * boolean values without accepting loose or coercive forms.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses strict boolean strings (`"true"` or `"false"`) into boolean values,
14
+ * without accepting loose or coercive forms.
15
+ */
16
+ export declare const parseBooleanString: ParseRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse ISO Date String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses strict ISO‑8601 date strings into `Date` objects,
7
+ * rejecting malformed or non‑standard formats.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses strict ISO‑8601 date strings into `Date` objects, rejecting malformed
14
+ * or non‑standard formats and ensuring the resulting timestamp is valid.
15
+ */
16
+ export declare const parseIsoDateString: ParseRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse Duration String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses duration strings of the form `<number><unit>` (s, m,
7
+ * h, d) into structured duration objects.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses duration strings of the form `<number><unit>` (s, m, h, d) into
14
+ * structured duration objects, rejecting ambiguous or partial formats.
15
+ */
16
+ export declare const parseDurationString: ParseRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse Hex String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses hexadecimal string literals (0x…) into `bigint`
7
+ * values, enforcing canonical formatting.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses hexadecimal string literals (`0x…`) into numeric values, rejecting
14
+ * malformed or non‑hexadecimal input.
15
+ */
16
+ export declare const parseHexString: ParseRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse Integer String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses strict integer strings into numeric values, rejecting
7
+ * floats, scientific notation, and ambiguous formats.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses strict integer strings into numeric values, rejecting floats,
14
+ * scientific notation, and any non‑digit characters.
15
+ */
16
+ export declare const parseIntegerString: ParseRule<unknown>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse JSON String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses JSON‑compatible strings into structured data,
7
+ * accepting only valid objects, arrays, or quoted strings.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses JSON‑compatible strings into structured data, accepting only objects,
14
+ * arrays, or quoted strings and rejecting anything that cannot be parsed
15
+ * safely.
16
+ */
17
+ export declare const parseJsonString: ParseRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse Numeric String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses strict numeric strings into numbers, supporting
7
+ * optional decimals while rejecting ambiguous formats.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses strict numeric strings into JavaScript numbers, supporting optional
14
+ * decimals while rejecting scientific notation and non‑numeric characters.
15
+ */
16
+ export declare const parseNumericString: ParseRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse Object String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses JSON object strings into plain objects, rejecting
7
+ * arrays, null, and non‑object structures.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses JSON object strings into plain objects, rejecting arrays, null, and
14
+ * any non‑object structures.
15
+ */
16
+ export declare const parseObjectString: ParseRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse Octal String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses octal string literals (`0o…`) into `bigint` values,
7
+ * enforcing strict base‑8 formatting.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses octal string literals (`0o…`) into `bigint` values, validating format
14
+ * and rejecting malformed or non‑octal input.
15
+ */
16
+ export declare const parseOctalString: ParseRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse Scientific Notation String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses strict scientific‑notation strings into numbers,
7
+ * validating both mantissa and exponent format.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses strict scientific‑notation strings into numbers, enforcing canonical
14
+ * formatting for both mantissa and exponent.
15
+ */
16
+ export declare const parseScientificNotationString: ParseRule<unknown>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * Parsers | Parse URL String
4
+ * ----------------------------------------------------------------------------
5
+ * @package @clementine-solutions/jane
6
+ * @description Parses URL strings into normalized URL values, ensuring the
7
+ * text represents a valid, fully qualified URL.
8
+ * @see https://jane-io.com
9
+ * ----------------------------------------------------------------------------
10
+ */
11
+ import type { ParseRule } from '../shapes';
12
+ /**
13
+ * Parses URL strings into normalized URL values, ensuring the text represents
14
+ * a syntactically valid and fully qualified URL.
15
+ */
16
+ export declare const parseUrlString: ParseRule<string>;