Do more with less code
The library is released under the MIT license and has no runtime dependencies. It runs in modern browsers and on current server runtimes.
Features
- serializeState(state). Converts the current state to a compact string that can be restored later.
- watchChanges(target, handler). Calls the handler every time the target changes and returns a function to stop watching.
- parseInput(value, schema). Validates a value against a schema and returns the cleaned result or a list of errors.
- formatRecord(record, template). Renders a record using a template string with named placeholders.
Installation
pnpm add tesseraQuick start
import { serializeState } from "tessera";
const result = serializeState(config, { strict: true });
console.log(result);