@clementine-solutions/jane-io 1.0.5 → 1.0.7
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.
- package/README.md +7 -6
- package/dist/core/analysis/diff.js +2 -2
- package/dist/core/analysis/index.js +4 -4
- package/dist/core/analysis/replay.js +2 -2
- package/dist/core/analysis/telemetry.js +1 -1
- package/dist/core/boundary-rules/at-most-one.js +1 -1
- package/dist/core/boundary-rules/conditionally-required.js +1 -1
- package/dist/core/boundary-rules/date-range.js +1 -1
- package/dist/core/boundary-rules/index.js +7 -7
- package/dist/core/boundary-rules/mutually-exclusive.js +1 -1
- package/dist/core/boundary-rules/no-unknown-fields.js +1 -1
- package/dist/core/boundary-rules/require-all.js +1 -1
- package/dist/core/boundary-rules/require-one.js +1 -1
- package/dist/core/common/fluent.js +6 -6
- package/dist/core/common/index.js +5 -5
- package/dist/core/common/policy.js +1 -1
- package/dist/core/field-path/construct.js +1 -1
- package/dist/core/field-path/format.js +1 -1
- package/dist/core/field-path/index.js +4 -4
- package/dist/core/field-path/walk.js +1 -1
- package/dist/core/fluent-registry.d.ts +53 -0
- package/dist/core/fluent-registry.js +71 -4
- package/dist/core/normalizers/array/compact-sparse-array.js +1 -1
- package/dist/core/normalizers/array/flatten-one-level.js +1 -1
- package/dist/core/normalizers/array/remove-empty-string-items.js +1 -1
- package/dist/core/normalizers/array/remove-null-items.js +1 -1
- package/dist/core/normalizers/array/remove-undefined-items.js +1 -1
- package/dist/core/normalizers/date/invalid-date-to-undefined.js +1 -1
- package/dist/core/normalizers/index.js +18 -18
- package/dist/core/normalizers/normalizer-register.js +1 -1
- package/dist/core/normalizers/number/infinity-to-undefined.js +1 -1
- package/dist/core/normalizers/number/nan-to-undefined.js +1 -1
- package/dist/core/normalizers/number/normalize-negative-zero.js +1 -1
- package/dist/core/normalizers/object/remove-empty-array-keys.js +1 -1
- package/dist/core/normalizers/object/remove-empty-object-keys.js +1 -1
- package/dist/core/normalizers/object/remove-empty-string-keys.js +1 -1
- package/dist/core/normalizers/object/remove-null-keys.js +1 -1
- package/dist/core/normalizers/object/remove-undefined-keys.js +1 -1
- package/dist/core/normalizers/string/collapse-whitespace.js +1 -1
- package/dist/core/normalizers/string/empty-to-undefined.js +1 -1
- package/dist/core/normalizers/string/trim.js +1 -1
- package/dist/core/parsers/index.js +12 -12
- package/dist/core/parsers/parse-array-string.js +1 -1
- package/dist/core/parsers/parse-bigint-string.js +1 -1
- package/dist/core/parsers/parse-binary-string.js +1 -1
- package/dist/core/parsers/parse-boolean-string.js +1 -1
- package/dist/core/parsers/parse-date-string.js +1 -1
- package/dist/core/parsers/parse-duration-string.js +1 -1
- package/dist/core/parsers/parse-hex-string.js +1 -1
- package/dist/core/parsers/parse-integer-string.js +1 -1
- package/dist/core/parsers/parse-json-string.js +1 -1
- package/dist/core/parsers/parse-numeric-string.js +1 -1
- package/dist/core/parsers/parse-object-string.js +1 -1
- package/dist/core/parsers/parse-octal-string.js +1 -1
- package/dist/core/parsers/parse-scientific-notation-string.js +1 -1
- package/dist/core/parsers/parse-url-string.js +1 -1
- package/dist/core/pipeline/boundary.js +2 -2
- package/dist/core/pipeline/contain.js +2 -2
- package/dist/core/pipeline/index.js +7 -7
- package/dist/core/pipeline/normalize.js +4 -4
- package/dist/core/pipeline/parse.js +1 -1
- package/dist/core/pipeline/pipeline.js +9 -9
- package/dist/core/pipeline/scan.js +5 -5
- package/dist/core/pipeline/validate.js +2 -2
- package/dist/core/scanners/any/scan-for-sentinels.js +2 -2
- package/dist/core/scanners/array/array-is-deep.js +1 -1
- package/dist/core/scanners/array/array-is-heterogenous.js +2 -2
- package/dist/core/scanners/array/array-is-large.js +1 -1
- package/dist/core/scanners/bigint/bigint-is-large.js +1 -1
- package/dist/core/scanners/bigint/bigint-not-safe.js +1 -1
- package/dist/core/scanners/date/date-is-before-epoch.js +1 -1
- package/dist/core/scanners/date/date-is-far-future.js +1 -1
- package/dist/core/scanners/date/date-is-invalid.js +1 -1
- package/dist/core/scanners/index.js +21 -21
- package/dist/core/scanners/number/number-is-infinite.js +1 -1
- package/dist/core/scanners/number/number-is-nan.js +1 -1
- package/dist/core/scanners/number/number-is-too-large.js +1 -1
- package/dist/core/scanners/number/number-is-unsafe-integer.js +1 -1
- package/dist/core/scanners/object/object-has-circular-references.js +1 -1
- package/dist/core/scanners/object/object-has-many-keys.js +1 -1
- package/dist/core/scanners/object/object-is-deep.js +2 -2
- package/dist/core/scanners/scanner-registry.js +1 -1
- package/dist/core/scanners/string/string-has-unsafe-unicode.js +1 -1
- package/dist/core/scanners/string/string-has-whitespace-edges.js +1 -1
- package/dist/core/scanners/string/string-is-long.js +1 -1
- package/dist/core/scanners/unknown/unknown-not-scannable.js +2 -2
- package/dist/core/validators/array/array-max-items.js +2 -2
- package/dist/core/validators/array/array-min-items.js +2 -2
- package/dist/core/validators/array/array.js +2 -2
- package/dist/core/validators/array/excludes.js +3 -3
- package/dist/core/validators/array/has-unique-items.js +2 -2
- package/dist/core/validators/array/includes.js +3 -3
- package/dist/core/validators/array/items-equal.js +2 -2
- package/dist/core/validators/array/no-empty-string-items.js +2 -2
- package/dist/core/validators/array/no-null-items.js +2 -2
- package/dist/core/validators/array/no-undefined-items.js +2 -2
- package/dist/core/validators/array/non-empty-array.js +2 -2
- package/dist/core/validators/array/not-sparse.js +2 -2
- package/dist/core/validators/bigint/bigint-equals.js +3 -3
- package/dist/core/validators/bigint/bigint-max.js +3 -3
- package/dist/core/validators/bigint/bigint-min.js +3 -3
- package/dist/core/validators/bigint/bigint-negative.js +3 -3
- package/dist/core/validators/bigint/bigint-non-negative.js +3 -3
- package/dist/core/validators/bigint/bigint-non-positive.js +3 -3
- package/dist/core/validators/bigint/bigint-positive.js +3 -3
- package/dist/core/validators/bigint/bigint-safe.js +3 -3
- package/dist/core/validators/bigint/bigint.js +2 -2
- package/dist/core/validators/boolean/boolean.js +2 -2
- package/dist/core/validators/boolean/is-false.js +2 -2
- package/dist/core/validators/boolean/is-true.js +2 -2
- package/dist/core/validators/common/is-country-code.js +3 -3
- package/dist/core/validators/common/is-currency-code.js +3 -3
- package/dist/core/validators/common/is-email-strict.js +3 -3
- package/dist/core/validators/common/is-email.js +3 -3
- package/dist/core/validators/common/is-ip.js +3 -3
- package/dist/core/validators/common/is-phone-strict.js +3 -3
- package/dist/core/validators/common/is-phone.js +3 -3
- package/dist/core/validators/common/is-port.js +2 -2
- package/dist/core/validators/common/is-postal-code.js +3 -3
- package/dist/core/validators/common/is-url.js +3 -3
- package/dist/core/validators/common/is-uuid.js +3 -3
- package/dist/core/validators/date/before-epoch.js +3 -3
- package/dist/core/validators/date/date-now-required.js +3 -3
- package/dist/core/validators/date/is-date.js +2 -2
- package/dist/core/validators/date/is-far-future.js +3 -3
- package/dist/core/validators/date/is-future.js +3 -3
- package/dist/core/validators/date/is-past.js +3 -3
- package/dist/core/validators/date/not-after.js +3 -3
- package/dist/core/validators/date/not-before.js +3 -3
- package/dist/core/validators/date/same-day.js +3 -3
- package/dist/core/validators/date/same-month.js +3 -3
- package/dist/core/validators/date/same-year.js +3 -3
- package/dist/core/validators/date/too-early.js +3 -3
- package/dist/core/validators/date/too-late.js +3 -3
- package/dist/core/validators/date/weekday.js +3 -3
- package/dist/core/validators/date/weekend.js +3 -3
- package/dist/core/validators/index.js +99 -99
- package/dist/core/validators/nullish/is-null-or-undefined.js +2 -2
- package/dist/core/validators/nullish/is-null.js +2 -2
- package/dist/core/validators/nullish/is-undefined.js +2 -2
- package/dist/core/validators/number/finite.js +3 -3
- package/dist/core/validators/number/integer.js +3 -3
- package/dist/core/validators/number/less-than.js +3 -3
- package/dist/core/validators/number/max.js +3 -3
- package/dist/core/validators/number/min.js +3 -3
- package/dist/core/validators/number/more-than.js +3 -3
- package/dist/core/validators/number/negative.js +3 -3
- package/dist/core/validators/number/non-negative.js +3 -3
- package/dist/core/validators/number/non-positive.js +3 -3
- package/dist/core/validators/number/number.js +2 -2
- package/dist/core/validators/number/positive.js +3 -3
- package/dist/core/validators/number/safe-integer.js +3 -3
- package/dist/core/validators/object/deep-equals.js +3 -3
- package/dist/core/validators/object/has-key.js +3 -3
- package/dist/core/validators/object/has-value.js +3 -3
- package/dist/core/validators/object/keys-equal.js +3 -3
- package/dist/core/validators/object/max-keys.js +3 -3
- package/dist/core/validators/object/min-keys.js +3 -3
- package/dist/core/validators/object/missing-key.js +3 -3
- package/dist/core/validators/object/no-empty-array-values.js +3 -3
- package/dist/core/validators/object/no-empty-object-values.js +3 -3
- package/dist/core/validators/object/no-null-values.js +3 -3
- package/dist/core/validators/object/no-undefined-values.js +3 -3
- package/dist/core/validators/object/non-empty-object.js +3 -3
- package/dist/core/validators/object/only-keys.js +3 -3
- package/dist/core/validators/object/plain-object.js +3 -3
- package/dist/core/validators/string/alpha-num.js +3 -3
- package/dist/core/validators/string/alpha.js +3 -3
- package/dist/core/validators/string/chars-equal.js +2 -2
- package/dist/core/validators/string/ends-with.js +3 -3
- package/dist/core/validators/string/is-ascii.js +3 -3
- package/dist/core/validators/string/is-printable.js +3 -3
- package/dist/core/validators/string/matches.js +3 -3
- package/dist/core/validators/string/max-length.js +2 -2
- package/dist/core/validators/string/min-length.js +2 -2
- package/dist/core/validators/string/no-lead-space.js +3 -3
- package/dist/core/validators/string/no-repeat-space.js +3 -3
- package/dist/core/validators/string/no-space.js +3 -3
- package/dist/core/validators/string/no-trail-space.js +3 -3
- package/dist/core/validators/string/non-empty.js +2 -2
- package/dist/core/validators/string/not-one-of.js +3 -3
- package/dist/core/validators/string/num-string.js +3 -3
- package/dist/core/validators/string/one-of.js +3 -3
- package/dist/core/validators/string/starts-with.js +3 -3
- package/dist/core/validators/string/string.js +2 -2
- package/dist/core/validators/string/trimmed.js +3 -3
- package/dist/index.d.ts +19 -0
- package/dist/index.js +22 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Jane
|
|
1
|
+
# Jane-IO
|
|
2
2
|
|
|
3
3
|
[](https://gitlab.com/clementine-solution/open-source/jane-io/-/commits/main)
|
|
4
4
|
[](https://gitlab.com/clementine-solution/open-source/jane-io/-/commits/main)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
> A clarity-first boundary system for shaping, validating, and transforming data with full introspection and policy control.
|
|
9
9
|
|
|
10
|
-
Jane
|
|
10
|
+
Jane-IO is a TypeScript-first data validation library that emphasizes **explicit design**, **runtime safety**, and **comprehensive observability**. Unlike traditional validators, Jane treats data processing as a multi-stage pipeline with policy-driven decision making.
|
|
11
11
|
|
|
12
12
|
## Key Features
|
|
13
13
|
|
|
@@ -38,9 +38,10 @@ pnpm add @clementine-solutions/jane-io
|
|
|
38
38
|
import { jane } from '@clementine-solutions/jane-io';
|
|
39
39
|
|
|
40
40
|
// Simple validation
|
|
41
|
-
const result = await jane.value(
|
|
42
|
-
.parse("
|
|
43
|
-
.
|
|
41
|
+
const result = await jane.value(37)
|
|
42
|
+
.parse("numeric")
|
|
43
|
+
.integer()
|
|
44
|
+
.min(21)
|
|
44
45
|
.run();
|
|
45
46
|
|
|
46
47
|
if (result.ok) {
|
|
@@ -129,4 +130,4 @@ Jane IO is built with care for the developer experience and runtime safety. Spec
|
|
|
129
130
|
|
|
130
131
|
---
|
|
131
132
|
|
|
132
|
-
**Jane IO** -
|
|
133
|
+
**Jane IO** - Observable data validation with clarity and confidence.
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { isObject, isPlainObject } from '../common
|
|
12
|
-
import { appendSegment, rootPath, setIndex, setKey } from '../field-path
|
|
11
|
+
import { isObject, isPlainObject } from '../common';
|
|
12
|
+
import { appendSegment, rootPath, setIndex, setKey } from '../field-path';
|
|
13
13
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
14
14
|
|* Diff *|
|
|
15
15
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
12
12
|
|* Diff *|
|
|
13
13
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
14
|
-
export { diff, walkDiff, runDiff } from './diff
|
|
14
|
+
export { diff, walkDiff, runDiff } from './diff';
|
|
15
15
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
16
16
|
|* Explain *|
|
|
17
17
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
18
|
-
export { explain, format, runExplain } from './explain
|
|
18
|
+
export { explain, format, runExplain } from './explain';
|
|
19
19
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
20
20
|
|* Replay *|
|
|
21
21
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
22
|
-
export { applyEntry, replay, runReplay } from './replay
|
|
22
|
+
export { applyEntry, replay, runReplay } from './replay';
|
|
23
23
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
24
24
|
|* Telemetry *|
|
|
25
25
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
26
|
-
export { runTelemetry, telemetry } from './telemetry
|
|
26
|
+
export { runTelemetry, telemetry } from './telemetry';
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { setAtPath } from '../field-path
|
|
12
|
-
import { deepClone } from '../pipeline
|
|
11
|
+
import { setAtPath } from '../field-path';
|
|
12
|
+
import { deepClone } from '../pipeline';
|
|
13
13
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
14
14
|
|* Apply Entry *|
|
|
15
15
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { defaultPolicy } from '../common
|
|
11
|
+
import { defaultPolicy } from '../common';
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Telemetry *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @see https://jane-io.com
|
|
10
10
|
* ----------------------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
|
-
import { rootPath } from '../field-path
|
|
12
|
+
import { rootPath } from '../field-path';
|
|
13
13
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
14
14
|
|* Implementation *|
|
|
15
15
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @see https://jane-io.com
|
|
10
10
|
* ----------------------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
|
-
import { rootPath } from '../field-path
|
|
12
|
+
import { rootPath } from '../field-path';
|
|
13
13
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
14
14
|
|* Implementation *|
|
|
15
15
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @see https://jane-io.com
|
|
10
10
|
* ----------------------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
|
-
import { rootPath } from '../field-path
|
|
12
|
+
import { rootPath } from '../field-path';
|
|
13
13
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
14
14
|
|* Implementation *|
|
|
15
15
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Boundary Rules *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
15
|
-
export { atMostOne } from './at-most-one
|
|
16
|
-
export { conditionallyRequired } from './conditionally-required
|
|
17
|
-
export { dateRange } from './date-range
|
|
18
|
-
export { mutuallyExclusive } from './mutually-exclusive
|
|
19
|
-
export { noUnknownFields } from './no-unknown-fields
|
|
20
|
-
export { requireAll } from './require-all
|
|
21
|
-
export { requireOne } from './require-one
|
|
15
|
+
export { atMostOne } from './at-most-one';
|
|
16
|
+
export { conditionallyRequired } from './conditionally-required';
|
|
17
|
+
export { dateRange } from './date-range';
|
|
18
|
+
export { mutuallyExclusive } from './mutually-exclusive';
|
|
19
|
+
export { noUnknownFields } from './no-unknown-fields';
|
|
20
|
+
export { requireAll } from './require-all';
|
|
21
|
+
export { requireOne } from './require-one';
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { rootPath } from '../field-path
|
|
11
|
+
import { rootPath } from '../field-path';
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Implementation *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { rootPath } from '../field-path
|
|
11
|
+
import { rootPath } from '../field-path';
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Implementation *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { rootPath } from '../field-path
|
|
11
|
+
import { rootPath } from '../field-path';
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Implementation *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @see https://jane-io.com
|
|
10
10
|
* ----------------------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
|
-
import { rootPath } from '../field-path
|
|
12
|
+
import { rootPath } from '../field-path';
|
|
13
13
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
14
14
|
|* Implementation *|
|
|
15
15
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
* @see https://jane-io.com
|
|
10
10
|
* ----------------------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
|
-
import { rootPath } from '../field-path
|
|
13
|
-
import { boundaryRunner, createPipeline } from '../pipeline
|
|
14
|
-
import { telemetry } from '../analysis
|
|
15
|
-
import { defaultPolicy } from '../common
|
|
16
|
-
import { janeRegistry } from '../fluent-registry
|
|
17
|
-
import { boundaryPolicyDefault, boundaryPolicyLax, boundaryPolicyStrict, mergeBoundaryPolicies, normalizePolicy, resolvePolicy, } from './policy
|
|
12
|
+
import { rootPath } from '../field-path';
|
|
13
|
+
import { boundaryRunner, createPipeline } from '../pipeline';
|
|
14
|
+
import { telemetry } from '../analysis';
|
|
15
|
+
import { defaultPolicy } from '../common';
|
|
16
|
+
import { janeRegistry } from '../fluent-registry';
|
|
17
|
+
import { boundaryPolicyDefault, boundaryPolicyLax, boundaryPolicyStrict, mergeBoundaryPolicies, normalizePolicy, resolvePolicy, } from './policy';
|
|
18
18
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
19
19
|
|* Attach Public Fluent Validators *|
|
|
20
20
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Events *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
15
|
-
export { createEvent, isJaneEvent } from './events
|
|
15
|
+
export { createEvent, isJaneEvent } from './events';
|
|
16
16
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
17
17
|
|* Fluent *|
|
|
18
18
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
19
|
-
export { attachFluentParsers, attachFluentValidators, createJane, toJaneBoundaryResult, toJaneResult, } from './fluent
|
|
19
|
+
export { attachFluentParsers, attachFluentValidators, createJane, toJaneBoundaryResult, toJaneResult, } from './fluent';
|
|
20
20
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
21
21
|
|* Policy *|
|
|
22
22
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
23
|
-
export { applyEscalate, applyOverride, boundaryPolicyDefault, boundaryPolicyLax, boundaryPolicyStrict, clampSeverityIndex, compileSeverityMap, decideEvent, defaultPolicy, laxPolicy, normalizePolicy, mergeBoundaryPolicies, policyDecision, resolveLevel, resolvePolicy, severityIndex, SEVERITY_ORDER, strictPolicy, } from './policy
|
|
23
|
+
export { applyEscalate, applyOverride, boundaryPolicyDefault, boundaryPolicyLax, boundaryPolicyStrict, clampSeverityIndex, compileSeverityMap, decideEvent, defaultPolicy, laxPolicy, normalizePolicy, mergeBoundaryPolicies, policyDecision, resolveLevel, resolvePolicy, severityIndex, SEVERITY_ORDER, strictPolicy, } from './policy';
|
|
24
24
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
25
25
|
|* Utilities *|
|
|
26
26
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
27
|
-
export { deepEqual, generateRunId, isObject, isPlainObject, isPrimitive, safeStringify, } from './utilities
|
|
27
|
+
export { deepEqual, generateRunId, isObject, isPlainObject, isPrimitive, safeStringify, } from './utilities';
|
|
28
28
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
29
29
|
|* Wildcard *|
|
|
30
30
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
31
|
-
export { compileWildcard, getCompiledWildcard, matchesWildcard } from './wildcard
|
|
31
|
+
export { compileWildcard, getCompiledWildcard, matchesWildcard } from './wildcard';
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @see https://jane-io.com
|
|
10
10
|
* ----------------------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
|
-
import { createEvent, getCompiledWildcard, matchesWildcard } from '
|
|
12
|
+
import { createEvent, getCompiledWildcard, matchesWildcard } from '.';
|
|
13
13
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
14
14
|
|* Apply Escalate *|
|
|
15
15
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
12
12
|
|* Internal Modules *|
|
|
13
13
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
14
|
-
import { deepClone } from '../pipeline
|
|
14
|
+
import { deepClone } from '../pipeline';
|
|
15
15
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
16
16
|
|* Append Segment *|
|
|
17
17
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { escapeKey, isDangerousKey, isSafeKey, setFieldPath, setIndex, setKey } from '
|
|
11
|
+
import { escapeKey, isDangerousKey, isSafeKey, setFieldPath, setIndex, setKey } from '.';
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Array To Field Path *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
12
12
|
|* Construct *|
|
|
13
13
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
14
|
-
export { appendSegment, cloneContainer, clonePath, makeFieldPath, rootPath, setAtPath, setFieldPath, setIndex, setKey, } from './construct
|
|
14
|
+
export { appendSegment, cloneContainer, clonePath, makeFieldPath, rootPath, setAtPath, setFieldPath, setIndex, setKey, } from './construct';
|
|
15
15
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
16
16
|
|* Format *|
|
|
17
17
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
18
|
-
export { arrayToFieldPath, fieldPathToArray, fieldPathToUser, userToFieldPath } from './format
|
|
18
|
+
export { arrayToFieldPath, fieldPathToArray, fieldPathToUser, userToFieldPath } from './format';
|
|
19
19
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
20
20
|
|* Utilities *|
|
|
21
21
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
22
|
-
export { DANGEROUS_KEYS, escapeKey, isDangerousKey, isRoot, isSafeKey, lastSegment, parentPath, pathEquals, pathStartsWith, segmentsEqual, } from './utilities
|
|
22
|
+
export { DANGEROUS_KEYS, escapeKey, isDangerousKey, isRoot, isSafeKey, lastSegment, parentPath, pathEquals, pathStartsWith, segmentsEqual, } from './utilities';
|
|
23
23
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
24
24
|
|* Walk *|
|
|
25
25
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
26
|
-
export { walk, walkArray, walkObject } from './walk
|
|
26
|
+
export { walk, walkArray, walkObject } from './walk';
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { appendSegment, setIndex, setKey } from '../field-path
|
|
11
|
+
import { appendSegment, setIndex, setKey } from '../field-path';
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Walk *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -135,4 +135,57 @@ export declare const janeRegistry: {
|
|
|
135
135
|
readonly duration: import("./shapes").ParseRule<unknown>;
|
|
136
136
|
readonly scientific: import("./shapes").ParseRule<unknown>;
|
|
137
137
|
};
|
|
138
|
+
readonly normalizers: {
|
|
139
|
+
readonly collapseWhitespace: import("./shapes").NormalizationRule<unknown>;
|
|
140
|
+
readonly compactSparseArray: import("./shapes").NormalizationRule<unknown>;
|
|
141
|
+
readonly emptyToUndefined: import("./shapes").NormalizationRule<unknown>;
|
|
142
|
+
readonly flattenOneLevel: import("./shapes").NormalizationRule<unknown>;
|
|
143
|
+
readonly infinityToUndefined: import("./shapes").NormalizationRule<unknown>;
|
|
144
|
+
readonly invalidDateToUndefined: import("./shapes").NormalizationRule<unknown>;
|
|
145
|
+
readonly nanToUndefined: import("./shapes").NormalizationRule<unknown>;
|
|
146
|
+
readonly normalizeNegativeZero: import("./shapes").NormalizationRule<unknown>;
|
|
147
|
+
readonly removeEmptyArrayKeys: import("./shapes").NormalizationRule<unknown>;
|
|
148
|
+
readonly removeEmptyObjectKeys: import("./shapes").NormalizationRule<unknown>;
|
|
149
|
+
readonly removeEmptyStringItems: import("./shapes").NormalizationRule<unknown>;
|
|
150
|
+
readonly removeEmptyStringKeys: import("./shapes").NormalizationRule<unknown>;
|
|
151
|
+
readonly removeNullItems: import("./shapes").NormalizationRule<unknown>;
|
|
152
|
+
readonly removeNullKeys: import("./shapes").NormalizationRule<unknown>;
|
|
153
|
+
readonly removeUndefinedItems: import("./shapes").NormalizationRule<unknown>;
|
|
154
|
+
readonly removeUndefinedKeys: import("./shapes").NormalizationRule<unknown>;
|
|
155
|
+
readonly trim: import("./shapes").NormalizationRule<unknown>;
|
|
156
|
+
};
|
|
157
|
+
readonly scanners: {
|
|
158
|
+
readonly arrayIsDeep: import("./shapes").ScanRule;
|
|
159
|
+
readonly arrayIsHeterogeneous: import("./shapes").ScanRule;
|
|
160
|
+
readonly arrayIsLarge: import("./shapes").ScanRule;
|
|
161
|
+
readonly bigintIsLarge: import("./shapes").ScanRule;
|
|
162
|
+
readonly bigintNotSafe: import("./shapes").ScanRule;
|
|
163
|
+
readonly dateIsBeforeEpoch: import("./shapes").ScanRule;
|
|
164
|
+
readonly dateIsFarFuture: import("./shapes").ScanRule;
|
|
165
|
+
readonly dateIsInvalid: import("./shapes").ScanRule;
|
|
166
|
+
readonly numberIsInfinite: import("./shapes").ScanRule;
|
|
167
|
+
readonly numberIsNaN: import("./shapes").ScanRule;
|
|
168
|
+
readonly numberIsTooLarge: import("./shapes").ScanRule;
|
|
169
|
+
readonly numberIsUnsafeInteger: import("./shapes").ScanRule;
|
|
170
|
+
readonly objectHasCircularReferences: import("./shapes").ScanRule;
|
|
171
|
+
readonly objectHasManyKeys: import("./shapes").ScanRule;
|
|
172
|
+
readonly objectIsDeep: import("./shapes").ScanRule;
|
|
173
|
+
readonly scanForSentinels: import("./shapes").ScanRule;
|
|
174
|
+
readonly stringHasUnsafeUnicode: import("./shapes").ScanRule;
|
|
175
|
+
readonly stringHasWhitespaceEdges: import("./shapes").ScanRule;
|
|
176
|
+
readonly stringIsLong: import("./shapes").ScanRule;
|
|
177
|
+
readonly unknownNotScannable: import("./shapes").ScanRule;
|
|
178
|
+
};
|
|
179
|
+
readonly policies: {
|
|
180
|
+
readonly default: import("./shapes").Policy;
|
|
181
|
+
readonly lax: import("./shapes").Policy;
|
|
182
|
+
readonly strict: import("./shapes").Policy;
|
|
183
|
+
readonly boundaryDefault: import("./shapes").BoundaryDecideConfig;
|
|
184
|
+
readonly boundaryLax: import("./shapes").BoundaryDecideConfig;
|
|
185
|
+
readonly boundaryStrict: import("./shapes").BoundaryDecideConfig;
|
|
186
|
+
};
|
|
187
|
+
readonly registries: {
|
|
188
|
+
readonly normalizationRuleRegistry: Record<import("./shapes").StructuralType, readonly import("./shapes").NormalizationRule[]>;
|
|
189
|
+
readonly scanRuleRegistry: import("./shapes").ScanRuleSet;
|
|
190
|
+
};
|
|
138
191
|
};
|
|
@@ -10,13 +10,27 @@
|
|
|
10
10
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
11
11
|
|* Parsers *|
|
|
12
12
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
13
|
-
import { parseArrayString, parseBigIntString, parseBinaryString, parseBooleanString, parseDurationString, parseHexString, parseIsoDateString, parseJsonString, parseNumericString, parseObjectString, parseOctalString, parseUrlString, } from './parsers
|
|
14
|
-
import { parseIntegerString } from './parsers/parse-integer-string
|
|
15
|
-
import { parseScientificNotationString } from './parsers/parse-scientific-notation-string
|
|
13
|
+
import { parseArrayString, parseBigIntString, parseBinaryString, parseBooleanString, parseDurationString, parseHexString, parseIsoDateString, parseJsonString, parseNumericString, parseObjectString, parseOctalString, parseUrlString, } from './parsers';
|
|
14
|
+
import { parseIntegerString } from './parsers/parse-integer-string';
|
|
15
|
+
import { parseScientificNotationString } from './parsers/parse-scientific-notation-string';
|
|
16
|
+
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
17
|
+
||* Normalizers *|
|
|
18
|
+
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
19
|
+
import { collapseWhitespace, compactSparseArray, emptyToUndefined, flattenOneLevel, infinityToUndefined, invalidDateToUndefined, nanToUndefined, normalizeNegativeZero, removeEmptyArrayKeys, removeEmptyObjectKeys, removeEmptyStringItems, removeEmptyStringKeys, removeNullItems, removeNullKeys, removeUndefinedItems, removeUndefinedKeys, trim, } from './normalizers';
|
|
20
|
+
import { normalizationRuleRegistry } from './normalizers';
|
|
21
|
+
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
22
|
+
||* Scanners *|
|
|
23
|
+
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
24
|
+
import { arrayIsDeep, arrayIsHeterogeneous, arrayIsLarge, bigintIsLarge, bigintNotSafe, dateIsBeforeEpoch, dateIsFarFuture, dateIsInvalid, numberIsInfinite, numberIsNaN, numberIsTooLarge, numberIsUnsafeInteger, objectHasCircularReferences, objectHasManyKeys, objectIsDeep, scanForSentinels, stringHasUnsafeUnicode, stringHasWhitespaceEdges, stringIsLong, unknownNotScannable, } from './scanners';
|
|
25
|
+
import { scanRuleRegistry } from './scanners';
|
|
26
|
+
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
27
|
+
||* Policies *|
|
|
28
|
+
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
29
|
+
import { boundaryPolicyDefault, boundaryPolicyLax, boundaryPolicyStrict, defaultPolicy, laxPolicy, strictPolicy, } from './common/policy';
|
|
16
30
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
17
31
|
|* Validators *|
|
|
18
32
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
19
|
-
import { alpha, alphaNum, array, arrayMaxItems, arrayMinItems, beforeEpoch, bigint, bigintEquals, bigintMax, bigintMin, bigintNegative, bigintNonNegative, bigintNonPositive, bigintPositive, bigintSafe, boolean, charsEqual, dateNowRequired, deepEquals, endsWith, excludes, finite, hasKey, hasUniqueItems, hasValue, includes, integer, isAscii, isCountryCode, isCurrencyCode, isDate, isEmail, isEmailStrict, isFalse, isFarFuture, isFuture, isIp, isNull, isNullOrUndefined, isPast, isPhone, isPhoneStrict, isPort, isPostalCode, isPrintable, isTrue, isUndefined, isUrl, isUuid, itemsEqual, keysEqual, lessThan, matches, max, maxLength, maxKeys, min, minLength, minKeys, missingKey, moreThan, negative, noEmptyArrayValues, noEmptyObjectValues, noEmptyStringItems, noNullItems, noNullValues, noUndefinedItems, noUndefinedValues, nonEmptyArray, nonEmptyObject, noLeadSpace, noRepeatSpace, noSpace, noTrailSpace, nonNegative, nonPositive, notAfter, notBefore, nonEmpty, notOneOf, notSparse, number, numString, oneOf, onlyKeys, plainObject, positive, safeInteger, sameDay, sameMonth, sameYear, startsWith, string, tooEarly, tooLate, trimmed, weekday, weekend, } from './validators
|
|
33
|
+
import { alpha, alphaNum, array, arrayMaxItems, arrayMinItems, beforeEpoch, bigint, bigintEquals, bigintMax, bigintMin, bigintNegative, bigintNonNegative, bigintNonPositive, bigintPositive, bigintSafe, boolean, charsEqual, dateNowRequired, deepEquals, endsWith, excludes, finite, hasKey, hasUniqueItems, hasValue, includes, integer, isAscii, isCountryCode, isCurrencyCode, isDate, isEmail, isEmailStrict, isFalse, isFarFuture, isFuture, isIp, isNull, isNullOrUndefined, isPast, isPhone, isPhoneStrict, isPort, isPostalCode, isPrintable, isTrue, isUndefined, isUrl, isUuid, itemsEqual, keysEqual, lessThan, matches, max, maxLength, maxKeys, min, minLength, minKeys, missingKey, moreThan, negative, noEmptyArrayValues, noEmptyObjectValues, noEmptyStringItems, noNullItems, noNullValues, noUndefinedItems, noUndefinedValues, nonEmptyArray, nonEmptyObject, noLeadSpace, noRepeatSpace, noSpace, noTrailSpace, nonNegative, nonPositive, notAfter, notBefore, nonEmpty, notOneOf, notSparse, number, numString, oneOf, onlyKeys, plainObject, positive, safeInteger, sameDay, sameMonth, sameYear, startsWith, string, tooEarly, tooLate, trimmed, weekday, weekend, } from './validators';
|
|
20
34
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
21
35
|
|* Fluent API *|
|
|
22
36
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -148,4 +162,57 @@ export const janeRegistry = {
|
|
|
148
162
|
duration: parseDurationString,
|
|
149
163
|
scientific: parseScientificNotationString,
|
|
150
164
|
},
|
|
165
|
+
normalizers: {
|
|
166
|
+
collapseWhitespace,
|
|
167
|
+
compactSparseArray,
|
|
168
|
+
emptyToUndefined,
|
|
169
|
+
flattenOneLevel,
|
|
170
|
+
infinityToUndefined,
|
|
171
|
+
invalidDateToUndefined,
|
|
172
|
+
nanToUndefined,
|
|
173
|
+
normalizeNegativeZero,
|
|
174
|
+
removeEmptyArrayKeys,
|
|
175
|
+
removeEmptyObjectKeys,
|
|
176
|
+
removeEmptyStringItems,
|
|
177
|
+
removeEmptyStringKeys,
|
|
178
|
+
removeNullItems,
|
|
179
|
+
removeNullKeys,
|
|
180
|
+
removeUndefinedItems,
|
|
181
|
+
removeUndefinedKeys,
|
|
182
|
+
trim,
|
|
183
|
+
},
|
|
184
|
+
scanners: {
|
|
185
|
+
arrayIsDeep,
|
|
186
|
+
arrayIsHeterogeneous,
|
|
187
|
+
arrayIsLarge,
|
|
188
|
+
bigintIsLarge,
|
|
189
|
+
bigintNotSafe,
|
|
190
|
+
dateIsBeforeEpoch,
|
|
191
|
+
dateIsFarFuture,
|
|
192
|
+
dateIsInvalid,
|
|
193
|
+
numberIsInfinite,
|
|
194
|
+
numberIsNaN,
|
|
195
|
+
numberIsTooLarge,
|
|
196
|
+
numberIsUnsafeInteger,
|
|
197
|
+
objectHasCircularReferences,
|
|
198
|
+
objectHasManyKeys,
|
|
199
|
+
objectIsDeep,
|
|
200
|
+
scanForSentinels,
|
|
201
|
+
stringHasUnsafeUnicode,
|
|
202
|
+
stringHasWhitespaceEdges,
|
|
203
|
+
stringIsLong,
|
|
204
|
+
unknownNotScannable,
|
|
205
|
+
},
|
|
206
|
+
policies: {
|
|
207
|
+
default: defaultPolicy,
|
|
208
|
+
lax: laxPolicy,
|
|
209
|
+
strict: strictPolicy,
|
|
210
|
+
boundaryDefault: boundaryPolicyDefault,
|
|
211
|
+
boundaryLax: boundaryPolicyLax,
|
|
212
|
+
boundaryStrict: boundaryPolicyStrict,
|
|
213
|
+
},
|
|
214
|
+
registries: {
|
|
215
|
+
normalizationRuleRegistry,
|
|
216
|
+
scanRuleRegistry,
|
|
217
|
+
},
|
|
151
218
|
};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @see https://jane-io.com
|
|
10
10
|
* ----------------------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
|
-
import { normalizationEvent } from '../../pipeline
|
|
12
|
+
import { normalizationEvent } from '../../pipeline';
|
|
13
13
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
14
14
|
|* Implementation *|
|
|
15
15
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { normalizationEvent } from '../../pipeline
|
|
11
|
+
import { normalizationEvent } from '../../pipeline';
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Implementation *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { normalizationEvent } from '../../pipeline
|
|
11
|
+
import { normalizationEvent } from '../../pipeline';
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Implementation *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { normalizationEvent } from '../../pipeline
|
|
11
|
+
import { normalizationEvent } from '../../pipeline';
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Implementation *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { normalizationEvent } from '../../pipeline
|
|
11
|
+
import { normalizationEvent } from '../../pipeline';
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Implementation *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @see https://jane-io.com
|
|
10
10
|
* ----------------------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
|
-
import { normalizationEvent } from '../../pipeline
|
|
12
|
+
import { normalizationEvent } from '../../pipeline';
|
|
13
13
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
14
14
|
|* Implementation *|
|
|
15
15
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -11,36 +11,36 @@
|
|
|
11
11
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
12
12
|
|* Array Values *|
|
|
13
13
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
14
|
-
export { compactSparseArray } from './array/compact-sparse-array
|
|
15
|
-
export { flattenOneLevel } from './array/flatten-one-level
|
|
16
|
-
export { removeEmptyStringItems } from './array/remove-empty-string-items
|
|
17
|
-
export { removeNullItems } from './array/remove-null-items
|
|
18
|
-
export { removeUndefinedItems } from './array/remove-undefined-items
|
|
14
|
+
export { compactSparseArray } from './array/compact-sparse-array';
|
|
15
|
+
export { flattenOneLevel } from './array/flatten-one-level';
|
|
16
|
+
export { removeEmptyStringItems } from './array/remove-empty-string-items';
|
|
17
|
+
export { removeNullItems } from './array/remove-null-items';
|
|
18
|
+
export { removeUndefinedItems } from './array/remove-undefined-items';
|
|
19
19
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
20
20
|
|* Date Values *|
|
|
21
21
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
22
|
-
export { invalidDateToUndefined } from './date/invalid-date-to-undefined
|
|
22
|
+
export { invalidDateToUndefined } from './date/invalid-date-to-undefined';
|
|
23
23
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
24
24
|
|* Number Values *|
|
|
25
25
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
26
|
-
export { infinityToUndefined } from './number/infinity-to-undefined
|
|
27
|
-
export { nanToUndefined } from './number/nan-to-undefined
|
|
28
|
-
export { normalizeNegativeZero } from './number/normalize-negative-zero
|
|
26
|
+
export { infinityToUndefined } from './number/infinity-to-undefined';
|
|
27
|
+
export { nanToUndefined } from './number/nan-to-undefined';
|
|
28
|
+
export { normalizeNegativeZero } from './number/normalize-negative-zero';
|
|
29
29
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
30
30
|
|* Object Values *|
|
|
31
31
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
32
|
-
export { removeEmptyArrayKeys } from './object/remove-empty-array-keys
|
|
33
|
-
export { removeEmptyObjectKeys } from './object/remove-empty-object-keys
|
|
34
|
-
export { removeEmptyStringKeys } from './object/remove-empty-string-keys
|
|
35
|
-
export { removeNullKeys } from './object/remove-null-keys
|
|
36
|
-
export { removeUndefinedKeys } from './object/remove-undefined-keys
|
|
32
|
+
export { removeEmptyArrayKeys } from './object/remove-empty-array-keys';
|
|
33
|
+
export { removeEmptyObjectKeys } from './object/remove-empty-object-keys';
|
|
34
|
+
export { removeEmptyStringKeys } from './object/remove-empty-string-keys';
|
|
35
|
+
export { removeNullKeys } from './object/remove-null-keys';
|
|
36
|
+
export { removeUndefinedKeys } from './object/remove-undefined-keys';
|
|
37
37
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
38
38
|
|* String Values *|
|
|
39
39
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
40
|
-
export { collapseWhitespace } from './string/collapse-whitespace
|
|
41
|
-
export { emptyToUndefined } from './string/empty-to-undefined
|
|
42
|
-
export { trim } from './string/trim
|
|
40
|
+
export { collapseWhitespace } from './string/collapse-whitespace';
|
|
41
|
+
export { emptyToUndefined } from './string/empty-to-undefined';
|
|
42
|
+
export { trim } from './string/trim';
|
|
43
43
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
44
44
|
|* Registry *|
|
|
45
45
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
46
|
-
export { normalizationRuleRegistry } from './normalizer-register
|
|
46
|
+
export { normalizationRuleRegistry } from './normalizer-register';
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @see https://jane-io.com
|
|
10
10
|
* ----------------------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
|
-
import { collapseWhitespace, compactSparseArray, emptyToUndefined, flattenOneLevel, infinityToUndefined, invalidDateToUndefined, nanToUndefined, normalizeNegativeZero, removeEmptyArrayKeys, removeEmptyObjectKeys, removeEmptyStringItems, removeEmptyStringKeys, removeNullItems, removeNullKeys, removeUndefinedItems, removeUndefinedKeys, trim, } from '
|
|
12
|
+
import { collapseWhitespace, compactSparseArray, emptyToUndefined, flattenOneLevel, infinityToUndefined, invalidDateToUndefined, nanToUndefined, normalizeNegativeZero, removeEmptyArrayKeys, removeEmptyObjectKeys, removeEmptyStringItems, removeEmptyStringKeys, removeNullItems, removeNullKeys, removeUndefinedItems, removeUndefinedKeys, trim, } from '.';
|
|
13
13
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
14
14
|
|* Normalization Rule Registry *|
|
|
15
15
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @see https://jane-io.com
|
|
10
10
|
* ----------------------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
|
-
import { normalizationEvent } from '../../pipeline
|
|
12
|
+
import { normalizationEvent } from '../../pipeline';
|
|
13
13
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
14
14
|
|* Implementation *|
|
|
15
15
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|