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-bun

v1.1.0

Published

Lightweight and efficient spinner package optimized exclusively for Bun (ESM-only)

Downloads

11

Readme

nspin-bun

NPM Version NPM Downloads

Overview

nspin-bun is a lightweight, dependency-free spinner package engineered exclusively for Bun environments. Inspired by nspin, it leverages modern Node.js APIs (like styleText and performance.now()) along with Bun's native capabilities to deliver an ultra-fast, minimal CLI spinner experience—all without external dependencies.

nspin-bun

Requirements

  • Node.js 22+: To access modern APIs such as styleText and performance.now().
  • Bun (>= 0.6.0): Optimized for Bun’s native build, test, and runtime environment.

Key Features

  • Optimized for Bun: Enjoy blazing-fast build and test speeds with an ultra-small footprint.
  • Modern & Native: Uses advanced Node.js features for reliable and high-performance spinners.
  • Zero Dependencies: No external libraries, ensuring a lightweight and secure package.
  • Chainable API: Easily manage spinners with fluent methods such as start, updateText, updateFrames, and stop.
  • Dynamic Frame Updates: Change the spinner animation on the fly using updateFrames(newFrames: string[]).
  • Adaptive Output: Automatically adjusts for both TTY and non-TTY environments.
  • Configurable Positioning: Position the spinner to the left (default) or right of the message.

Installation

Since nspin-bun is built exclusively for Bun, install it using Bun’s package manager:

bun add nspin-bun

Note: Although available on npm, nspin-bun is optimized specifically for Bun environments.

Quick Usage

Below is a basic example that demonstrates how to initialize a spinner, update its status, and stop it when the task is complete.

import { Spinner } from "nspin-bun";

// Define spinner frames (e.g., progressive updates)
const spinner = new Spinner({
  frames: ["⠋", "⠙", "⠹", "⠸"],
  interval: 80,
  format: "green"
});

spinner.start("Initializing...");

let progress = 0;
const interval = setInterval(() => {
  progress += 20;
  spinner.updateText(`Progress: ${progress}%`);
  if (progress >= 100) {
    clearInterval(interval);
    spinner.stop("Task complete!");
  }
}, 1000);

API Overview

  • new Spinner(options) Create a new spinner instance with the following options:

    • frames: An array of spinner frames (e.g., ["⠋", "⠙", "⠹", "⠸"]).
    • interval: Frame delay in milliseconds (default is 80).
    • format: Styling options applied via styleText.
    • position: Position relative to the text ('left' or 'right').
  • Instance Methods:

    • start(text?: string): Begin the spinner with an optional initial message.
    • updateText(newText: string): Update the spinner’s displayed message in real time.
    • updateFrames(newFrames: string[]): Dynamically update the spinner frames.
    • stop(finalText?: string): Stop the spinner and optionally show a final message.

Additional Information

  • Error Handling & Non-TTY Environments: nspin-bun gracefully degrades in non-TTY environments, ensuring a clear and readable output even when terminal capabilities are limited.

  • Performance Optimized: Built with both modern Node.js and Bun features, the package minimizes overhead and maximizes performance.

  • Clean & Modular Design: The design follows SOLID principles, making the package easy to extend and maintain.

Documentation & Support

For detailed documentation, comprehensive usage examples, and API references, please visit the GitHub repository.

If you have any issues or suggestions, please open an issue on GitHub.


This README for npm is a simplified version. For the complete documentation, including all examples and in-depth API details, please refer to the full README on GitHub.