@effect-native/schemas
v0.1.0
Published
Reusable Effect Schema definitions for common data types.
Readme
@effect-native/schemas
Reusable Effect Schema definitions for common data types.
Installation
npm install @effect-native/schemasModules
Slug
Utilities for generating URL-safe slugs from strings.
import { slugify, Slug, SlugBranded } from "@effect-native/schemas/Slug"
// Function
slugify("Hello World") // "hello-world"
// Schema (transforms input to slug)
import * as Schema from "effect/Schema"
Schema.decodeUnknownSync(Slug)("Hello World") // "hello-world"
// Branded Schema (transforms and brands the result)
Schema.decodeUnknownSync(SlugBranded)("Hello World") // "hello-world" as SlugBrandLicense
MIT
