@stacksjs/validation 0.70.23 โ 0.70.25
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 +1 -1
- package/dist/index.d.ts +26 -6
- package/dist/index.js +1 -326
- package/dist/reporter.d.ts +3 -3
- package/dist/schema.d.ts +2 -21
- package/dist/validator.d.ts +69 -6
- package/package.json +21 -8
- package/dist/is.d.ts +0 -28
- package/dist/rules.d.ts +0 -30
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ import { validate } from '@stacksjs/validation'
|
|
|
20
20
|
// wip
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
To view the full documentation, please visit [https://stacksjs.
|
|
23
|
+
To view the full documentation, please visit [<https://stacksjs.com/validatio>n](https://stacksjs.com/validation).
|
|
24
24
|
|
|
25
25
|
## ๐งช Testing
|
|
26
26
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
// Type guard utilities
|
|
2
|
+
export declare function isString(value: unknown): value is string;
|
|
3
|
+
export declare function isNumber(value: unknown): value is number;
|
|
4
|
+
export declare function isBoolean(value: unknown): value is boolean;
|
|
5
|
+
export declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
6
|
+
export declare function isArray(value: unknown): value is unknown[];
|
|
7
|
+
export declare function isFunction(value: unknown): value is Function;
|
|
8
|
+
export declare function isUndefined(value: unknown): value is undefined;
|
|
9
|
+
export declare function isNull(value: unknown): value is null;
|
|
10
|
+
export declare function isNullOrUndefined(value: unknown): value is null | undefined;
|
|
11
|
+
// Order matters: bind `schema` first so any consumer that imports it
|
|
12
|
+
// transitively โ validator.ts โ schema, plus any user model that lands
|
|
13
|
+
// inside the auto-imports barrel โ sees the Proxy rather than an empty
|
|
14
|
+
// namespace placeholder. With this export below the others, ESM consumers
|
|
15
|
+
// arriving mid-evaluation through the auto-imports graph would race the
|
|
16
|
+
// `export *` re-exports from `@stacksjs/ts-validation` (which also exports
|
|
17
|
+
// a `schema` symbol) and see whichever binding was registered first.
|
|
18
|
+
export { schema } from './schema';
|
|
19
|
+
// Re-export everything from @stacksjs/ts-validation. The explicit `schema`
|
|
20
|
+
// export above shadows ts-validation's own `schema` for `import { schema }
|
|
21
|
+
// from '@stacksjs/validation'` consumers โ which is what we want, since the
|
|
22
|
+
// Proxy keeps `schema.<method>()` reactive across module-graph races.
|
|
23
|
+
export * from '@stacksjs/ts-validation';
|
|
24
|
+
// Export local validation helpers
|
|
25
|
+
export * from './reporter';
|
|
26
|
+
export * from './validator';
|