Tinyledgerv4.1.9

Do more with less code

If you are new, start with the quick start below and move to the reference when you need details.

Features

  • watchChanges(target, handler). Calls the handler every time the target changes and returns a function to stop watching.
  • retryTask(task, attempts). Runs an asynchronous task again if it fails, with a short delay between attempts.
  • mergeConfig(base, overrides). Combines two configuration objects, giving priority to the second and keeping types intact.
  • batchUpdate(items, size). Splits a list into groups of the given size and processes them in order.

Installation

pnpm add tinyledger

Quick start

import { watchChanges } from "tinyledger";

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

API referenceChangelog