Tinyledgerv1.1.7

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

  • 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.
  • formatRecord(record, template). Renders a record using a template string with named placeholders.
  • watchChanges(target, handler). Calls the handler every time the target changes and returns a function to stop watching.

Installation

npm install tinyledger

Quick start

const { mergeConfig } = require("tinyledger");

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

API referenceChangelog