effect-io-ai

Package: effect
Module: Schema

Schema.isStartsWith

Validates at runtime that a string starts with the specified literal prefix.

Details

RegExp metacharacters in the prefix are escaped in JSON Schema and arbitrary metadata so that the generated patterns retain literal startsWith semantics.

Signature

declare const isStartsWith: (startsWith: string, annotations?: Annotations.Filter) => SchemaAST.Filter<string>

Source

Since v4.0.0