Simple building blocks for reliable applications
If you are new, start with the quick start below and move to the reference when you need details.
Features
- batchUpdate(items, size). Splits a list into groups of the given size and processes them in order.
- serializeState(state). Converts the current state to a compact string that can be restored later.
- retryTask(task, attempts). Runs an asynchronous task again if it fails, with a short delay between attempts.
- formatRecord(record, template). Renders a record using a template string with named placeholders.
Installation
npm install stackwiseQuick start
import { batchUpdate } from "stackwise";
const result = batchUpdate(data, { strict: true });
console.log(result);