Loomkitv1.10.1

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

  • 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.
  • batchUpdate(items, size). Splits a list into groups of the given size and processes them in order.
  • parseInput(value, schema). Validates a value against a schema and returns the cleaned result or a list of errors.

Installation

pnpm add loomkit

Quick start

import { retryTask } from "loomkit";

const result = retryTask(config, { strict: true });
console.log(result);

API referenceChangelog