-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: export individual cleaner functions
Export `cleanString` etc. for better tree shaking
- Loading branch information
1 parent
07e5d7d
commit dc2d434
Showing
4 changed files
with
34 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export { cleanAny as any, AnySchema } from "./any" | ||
export { cleanArray as array, ArraySchema } from "./array" | ||
export { cleanBoolean as boolean, BooleanSchema } from "./boolean" | ||
export { cleanDate as date, DateSchema } from "./date" | ||
export { cleanEmail as email, EmailSchema } from "./email" | ||
export { cleanFloat as float, FloatSchema } from "./float" | ||
export { cleanInteger as integer, IntegerSchema } from "./integer" | ||
export { cleanObject as object, ObjectSchema } from "./object" | ||
export { cleanString as string, StringSchema } from "./string" | ||
export { cleanUuid as uuid, UuidSchema } from "./uuid" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
export { cleanAny as any, AnySchema } from "./any" | ||
export { cleanArray as array, ArraySchema } from "./array" | ||
export { cleanBoolean as boolean, BooleanSchema } from "./boolean" | ||
export { cleanDate as date, DateSchema } from "./date" | ||
export { cleanEmail as email, EmailSchema } from "./email" | ||
export { cleanFloat as float, FloatSchema } from "./float" | ||
export { cleanInteger as integer, IntegerSchema } from "./integer" | ||
export { cleanObject as object, ObjectSchema } from "./object" | ||
export { cleanString as string, StringSchema } from "./string" | ||
export { cleanUuid as uuid, UuidSchema } from "./uuid" | ||
export * from "./any" | ||
export * from "./array" | ||
export * from "./boolean" | ||
export * from "./date" | ||
export * from "./email" | ||
export * from "./float" | ||
export * from "./integer" | ||
export * from "./object" | ||
export * from "./string" | ||
export * from "./uuid" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./SchemaError" | ||
export * from "./ValidationError" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
// allows: | ||
// import { cleanString } from "data-cleaner" | ||
// cleanString() | ||
export * from "./clean" | ||
export * as clean from "./clean" | ||
export * from "./errors/SchemaError" | ||
export * from "./errors/ValidationError" | ||
// [DEPRECATED] allows: | ||
// import * as clean from "data-cleaner" | ||
// clean.string() | ||
export * from "./clean/index-ns" | ||
// allows: | ||
// import { clean } from "data-cleaner" | ||
// clean.string() | ||
export * as clean from "./clean/index-ns" | ||
export * from "./errors" | ||
export * from "./types" |