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
- parseInput(value, schema). Validates a value against a schema and returns the cleaned result or a list of errors.
- watchChanges(target, handler). Calls the handler every time the target changes and returns a function to stop watching.
- createStore(options). Creates a store from the given options and returns an object with read and write methods.
- formatRecord(record, template). Renders a record using a template string with named placeholders.
Installation
npm install kernelpopQuick start
import { parseInput } from "kernelpop";
const result = parseInput(config, { strict: true });
console.log(result);