npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nspin-extension

v1.0.0

Published

Lightweight async workflow extension for nspin with runtime-safe lifecycle utilities

Readme

nspin-extension

NPM Version NPM Downloads

Overview

Lightweight async workflow utilities for nspin.

nspin-extension adds small workflow helpers on top of nspin for promise-based execution, explicit lifecycle handling, and predictable async behavior.

Built for developers who want lightweight async workflow ergonomics without introducing orchestration complexity.

Requirements

  • Node.js v22+ (Uses modern APIs like styleText and performance.now())

Features

  • Promise-based workflow execution
  • Explicit lifecycle helpers
  • Lightweight state inspection
  • Pause and resume support
  • Runtime-safe cleanup behavior
  • TypeScript support
  • ESM + CommonJS compatibility
  • Modern Node.js runtime support

Installation

Install via npm:

npm install nspin-extension

Quick Usage

Here's a simple example to get started:

import { Spinner } from "nspin";
import { ExtendedSpinner } from "nspin-extension";

const spinner = new Spinner({
  text: "Loading data...",
});

const workflow = new ExtendedSpinner(spinner);

await workflow.run(async () => {
  await fetchData();
});

The workflow lifecycle remains explicit and predictable during async execution.

Promise-Based Workflows

nspin-extension focuses on lightweight async workflow ergonomics.

await workflow.run(async () => {
  await performAsyncOperation();
});

The runtime behavior remains transparent:

  • spinner lifecycle stays explicit
  • errors are never hidden
  • cleanup behavior remains predictable
  • workflow ownership stays local

Lifecycle Helpers

Inspect workflow state explicitly during runtime:

workflow.isRunning();
workflow.isPaused();
workflow.isStopped();
workflow.isDestroyed();
workflow.isIdle();

You can also inspect the current lifecycle state directly:

workflow.getLifecycleState();

These helpers are intentionally lightweight and runtime-focused.

Pause and Resume

workflow.start();

workflow.pause();

workflow.resume();

workflow.stop("Completed");

The package prioritizes predictable lifecycle transitions over hidden automation.

Philosophy

nspin-extension is intentionally small.

The package improves async workflow ergonomics without introducing:

  • task orchestration
  • queues
  • workflow engines
  • plugin systems
  • centralized execution systems
  • hidden runtime coordination

The goal is to preserve the simplicity and transparency of nspin.

Ecosystem

Core Runtime

Extension Package


For more detailed information and comprehensive documentation, please visit the GitHub repository.

Note: This is a simplified overview. For complete documentation, usage examples, and API details, consult the full README on GitHub.