From 49dff476493fed5f5b308cad156ebcb199047a10 Mon Sep 17 00:00:00 2001 From: Giulio Canti Date: Thu, 27 Jul 2023 11:04:27 +0200 Subject: [PATCH] update docs (#364) --- docs/modules/Schema.ts.md | 60 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/docs/modules/Schema.ts.md b/docs/modules/Schema.ts.md index 59427c02b..d64d4e1dd 100644 --- a/docs/modules/Schema.ts.md +++ b/docs/modules/Schema.ts.md @@ -30,7 +30,9 @@ Added in v1.0.0 - [maxItems](#maxitems) - [minItems](#minitems) - [bigint](#bigint) + - [BigintFromString](#bigintfromstring) - [betweenBigint](#betweenbigint) + - [bigintFromString](#bigintfromstring) - [clampBigint](#clampbigint) - [greaterThanBigint](#greaterthanbigint) - [greaterThanOrEqualToBigint](#greaterthanorequaltobigint) @@ -48,6 +50,7 @@ Added in v1.0.0 - [attachPropertySignature](#attachpropertysignature) - [brand](#brand) - [chunk](#chunk) + - [compose](#compose) - [data](#data) - [dataFromSelf](#datafromself) - [declare](#declare) @@ -161,6 +164,7 @@ Added in v1.0.0 - [minLength](#minlength) - [nonEmpty](#nonempty) - [pattern](#pattern) + - [split](#split) - [startsWith](#startswith) - [trim](#trim) - [trimmed](#trimmed) @@ -394,6 +398,20 @@ Added in v1.0.0 # bigint +## BigintFromString + +This schema transforms a `string` into a `bigint` by parsing the string using the `BigInt` function. + +It returns an error if the value can't be converted (for example when non-numeric characters are provided). + +**Signature** + +```ts +export declare const BigintFromString: Schema +``` + +Added in v1.0.0 + ## betweenBigint **Signature** @@ -408,6 +426,20 @@ export declare const betweenBigint: ( Added in v1.0.0 +## bigintFromString + +This combinator transforms a `string` into a `bigint` by parsing the string using the `BigInt` function. + +It returns an error if the value can't be converted (for example when non-numeric characters are provided). + +**Signature** + +```ts +export declare const bigintFromString: (self: Schema) => Schema +``` + +Added in v1.0.0 + ## clampBigint Clamps a bigint between a minimum and a maximum value. @@ -635,6 +667,19 @@ export declare const chunk: (item: Schema) => Schema(bc: Schema): (ab: Schema) => Schema + (ab: Schema, bc: Schema): Schema +} +``` + +Added in v1.0.0 + ## data **Signature** @@ -1949,6 +1994,21 @@ export declare const pattern: ( Added in v1.0.0 +## split + +This combinator allows splitting a string into an array of strings. + +**Signature** + +```ts +export declare const split: { + (separator: string): (self: Schema) => Schema + (self: Schema, separator: string): Schema +} +``` + +Added in v1.0.0 + ## startsWith **Signature**