Nimbusv4.0.8

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

  • parseInput(value, schema). Validates a value against a schema and returns the cleaned result or a list of errors.
  • batchUpdate(items, size). Splits a list into groups of the given size and processes them in order.
  • retryTask(task, attempts). Runs an asynchronous task again if it fails, with a short delay between attempts.
  • watchChanges(target, handler). Calls the handler every time the target changes and returns a function to stop watching.

Installation

pnpm add nimbus

Quick start

const { parseInput } = require("nimbus");

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

API referenceChangelog