👾 regist

regist

A declarative, type-safe, and human-readable library for string validation and transformation.

npm install @regist/regist

Stop Fighting with Regex

Write readable, maintainable string logic that everyone on your team can understand.

The Old Way: Regex

Validating a strong password (8+ chars, uppercase, lowercase, digit, special char) is cryptic and error-prone.

const regex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*d)(?=.*[^A-Za-z0-9]).{8,}$/;

regex.test("Aa1!aa11"); // true

The regist Way

Use a declarative, fluent API that reads like plain English and prevents bugs.

import { assertThat } from 'regist';

assertThat("Aa1!aa11")
  .isStrongPassword()
  .try(); // true

Declarative & Readable

Describe string logic in a human-readable way, not with cryptic regex.

Fully Type-Safe

Catch errors at compile time, not runtime, with excellent autocompletion.

Zero Dependencies

No extra baggage. Just a lightweight library to keep your project lean.

Two-Way Chaining

Seamlessly switch between validation and transformation APIs in one chain.

Reusable & Composable

Build logic once, then reuse, branch, and compose it anywhere you need.

Extensible

Easily add your own custom logic with customCheck() and customTransform().