Simple building blocks for reliable applications
This documentation covers installation, core concepts and the full reference for the public interface.
Features
- parseInput(value, schema). Validates a value against a schema and returns the cleaned result or a list of errors.
- serializeState(state). Converts the current state to a compact string that can be restored later.
- formatRecord(record, template). Renders a record using a template string with named placeholders.
- mergeConfig(base, overrides). Combines two configuration objects, giving priority to the second and keeping types intact.
Installation
pnpm add fluxonQuick start
import { parseInput } from "fluxon";
const result = parseInput(config, { strict: true });
console.log(result);