effect-io-ai

Package: effect
Module: SchemaTransformation

SchemaTransformation.uncapitalize

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

Signature

declare const uncapitalize: () => Transformation<string, string>

Source

Since v4.0.0