Stackwisev1.2.6

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

  • createStore(options). Creates a store from the given options and returns an object with read and write methods.
  • serializeState(state). Converts the current state to a compact string that can be restored later.
  • 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 stackwise

Quick start

import { createStore } from "stackwise";

const result = createStore(items, { strict: true });
console.log(result);

API referenceChangelog