Package: effect
Module: SchemaTransformation
Transforms strings by lowercasing the first character on decode. Encode is passthrough.
When to use
Use when you need a schema transformation to normalize identifiers or field names.
Details
Decoding lowercases the first character and leaves the rest unchanged. Encoding is passthrough.
Example (Uncapitalizing on decode)
import { Schema, SchemaTransformation } from "effect"
const Uncapitalized = Schema.String.pipe(
Schema.decode(SchemaTransformation.uncapitalize())
)
See
capitalizetoLowerCaseSignature
declare const uncapitalize: () => Transformation<string, string>
Since v4.0.0