Zero dependencies, typed, tested and documented
This documentation covers installation, core concepts and the full reference for the public interface.
Features
- watchChanges(target, handler). Calls the handler every time the target changes and returns a function to stop watching.
- 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.
- createStore(options). Creates a store from the given options and returns an object with read and write methods.
Installation
npm install kernelpopQuick start
import { watchChanges } from "kernelpop";
const result = watchChanges(data, { strict: true });
console.log(result);