Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.21 KB

File metadata and controls

40 lines (25 loc) · 1.21 KB

progress-state

Small progress state primitives for JavaScript and TypeScript.

are-we-there-yet is no longer supported. This package keeps the useful idea of weighted progress groups, but exposes a compact typed API that can be used with terminal UIs, logs, or web dashboards.

Install

npm install progress-state

Usage

import { createProgressGroup } from "progress-state";

const group = createProgressGroup();
const install = group.add("install", 2);
const build = group.add("build", 1);

install.complete(0.5);
build.complete(1);

console.log(group.snapshot().percent);

API

  • createProgressGroup()
  • ProgressGroup#add(name, weight?)
  • ProgressItem#complete(value) where value is 0..1
  • snapshot() returns weighted completion, item details, and percent.

Migration Position

progress-state is an independent alternative or migration helper for projects moving away from are-we-there-yet. It is not affiliated with the original package maintainers or project.

For release context, see the local migration guide, examples, compatibility notes, source metadata, and adoption plan.