A small, fast library for working with structured data
This documentation covers installation, core concepts and the full reference for the public interface.
Features
- formatRecord(record, template). Renders a record using a template string with named placeholders.
- retryTask(task, attempts). Runs an asynchronous task again if it fails, with a short delay between attempts.
- parseInput(value, schema). Validates a value against a schema and returns the cleaned result or a list of errors.
- createStore(options). Creates a store from the given options and returns an object with read and write methods.
Installation
npm install kernelpopQuick start
import { formatRecord } from "kernelpop";
const result = formatRecord(input, { strict: true });
console.log(result);