MCPcopy Index your code
hub / github.com/Effect-TS/effect / capitalized

Function capitalized

packages/effect/src/Schema.ts:4593–4603  ·  view source on GitHub ↗
(annotations?: Annotations.Filter<Schema.Type<S>>)

Source from the content-addressed store, hash-verified

4591 */
4592export const capitalized =
4593 <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) =>
4594 <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>): filter<S> =>
4595 self.pipe(
4596 filter((a) => a[0]?.toUpperCase() === a[0], {
4597 schemaId: CapitalizedSchemaId,
4598 title: "capitalized",
4599 description: "a capitalized string",
4600 jsonSchema: { pattern: "^[^a-z]?.*$" },
4601 ...annotations
4602 })
4603 )
4604
4605/**
4606 * @category string constructors

Callers 1

CapitalizedClass · 0.85

Calls 2

filterFunction · 0.70
pipeMethod · 0.65

Tested by

no test coverage detected