SchemaGetter51
Constructors
checkEffectfunctionCreates a getter that validates a value using an effectful check function.failfunctionCreates a getter that always fails with the given issue.forbiddenfunctionCreates a getter that always fails with a Forbidden issue.omitfunctionCreates a getter that always returns None, effectively omitting the value from output.onNonefunctionCreates a getter that handles the case when the input is absent (Option.None).onSomefunctionCreates a getter that handles present values (Option.Some), passing None through.passthroughfunctionReturns the identity getter — passes the value through unchanged.passthroughSubtypefunctionReturns the identity getter, typed for when the encoded type E is a subtype of T.passthroughSupertypefunctionReturns the identity getter typed for the relationship T extends E.requiredfunctionCreates a getter that fails with MissingKey if the input is absent (Option.None).succeedfunctionCreates a getter that always produces the given constant value, ignoring the input.transformfunctionCreates a getter that applies a pure function to present values.transformOptionalfunctionCreates a getter that transforms the full Option — both present and absent values.transformOrFailfunctionCreates a getter that applies a fallible, effectful transformation to present values.withDefaultfunctionCreates a getter that replaces undefined values with a default.Models
Base64 Getters
decodeBase64functionDecodes a Base64 string to a Uint8Array.decodeBase64StringfunctionDecodes a Base64 string to a UTF-8 string.decodeBase64UrlfunctionDecodes a URL-safe Base64 string to a Uint8Array.decodeBase64UrlStringfunctionDecodes a URL-safe Base64 string to a UTF-8 string.encodeBase64functionEncodes a Uint8Array or string to a Base64 string.encodeBase64UrlfunctionEncodes a Uint8Array or string to a URL-safe Base64 string.Coercions
BigIntfunctionCoerces a value to bigint using the global BigInt() constructor.BooleanfunctionCoerces any value to a boolean using the global Boolean() constructor.DatefunctionCoerces a value to a Date using new Date(input).NumberfunctionCoerces any value to a number using the global Number() constructor.StringfunctionCoerces any value to a string using the global String() constructor.Datetime
Formdata
Hex Getters
Json Getters
Search Params
String
camelToSnakefunctionConverts a camelCase string to snake_case.capitalizefunctionCapitalizes the first character of a string.joinKeyValuefunctionJoins a record of key-value pairs into a delimited string.snakeToCamelfunctionConverts a snake_case string to camelCase.splitfunctionSplits a string into an array of strings by a separator.splitKeyValuefunctionParses a string into a record of key-value pairs.toLowerCasefunctionConverts a string to lowercase.toUpperCasefunctionConverts a string to uppercase.trimfunctionStrips whitespace from both ends of a string.uncapitalizefunctionUncapitalizes the first character of a string.