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

async-chainable-progress

v1.0.4

Published

Plugin for async-chainable that adds progress bars, spinners and other widgets

Readme

async-chainable-progress

Plugin for async-chainable that adds progress bars, spinners and other widgets.

var asyncChainable = require('async-chainable');
var asyncChainableProgress = require('async-chainable-progress');

// Display a manually updated progress bar
asyncChainable()
	.use(asyncChainableProgress)
	.progress()
	.then(function(next) { setTimeout(next, 1000) })
	.progress(50)
	.then(function(next) { setTimeout(next, 1000) })
	.progress(100)
	.then(function(next) { setTimeout(next, 1000) })
	.progressComplete() // Remove the progress bars
	.end();


// Display a labeled progress bar and update it within a complex operation
asyncChainable()
	.use(asyncChainableProgress)
	.progress(null, 'Doing things')
	.then(function(next) {
		// Assume a really time consuming process
		for (var p = 0; p < 100; p++) {
			this.setProgress(p);
		}
	})
	.progressComplete()
	.end();


// Display a list of current actions where each action has a progress bar and gets ticked off on completion
asyncChainable()
	.use(asyncChainableProgress)
	.progress(null, 'Doing things 1')
	.then(function(next) {
		// Assume a really time consuming process
		for (var p = 0; p < 100; p++) {
			this.setProgress(p);
		}
	})
	.progressComplete()
	.tick('Doing things 1')
	.progress(null, 'Doing things 2')
	.then(function(next) {
		// Assume a really time consuming process
		for (var p = 0; p < 100; p++) {
			this.setProgress(p);
		}
	})
	.progressComplete()
	.tick('Doing things 2')
	.end();

See the examples folder for more examples.

Function reference

async-chainable-progress extends async-chainable in with the following functions.

.progress()

Create or update a progress bar.

progress() // Create an anonymous unlabeled progress bar
progress(String <id>) // Create an ID'd progress bar
progress(String <id>, String <text>) // Create a ID'd and labeled progress bar
progress(Null, String <text>) // Create a labeled progress bar
progress(Number <progress>) // Update the anonymous (non ID'd) progress bar progress
progress(String <id>, Number <progress>) // Update the anonymous (non ID'd) progress bar progress
progress(String <id>, Number <progress>, Number <max_progress>) // As above but also set the max progress (otherwise `100` is assumed)

If no ID parameter is specified 'anonBar' is assumed automatically.

.spinner()

Create or update a spinner - useful for when specific progress is unknown.

spinner() // Create an anonymous unlabled spinner
spinner(String <id>) // Create an ID'd spinner
spinner(String <id>, String <text>) // Create a ID'd and labeled progress bar
spinner(Null, String <text>) // Create a labeled spinner

If no id parameter is specified 'anonSpinner' is assumed automatically.

.tick()

Add a tick mark to the console output to signify that a task has completed.

tick(String <text>) // Create a tick with the specific text
tick(String <text>, String <status>) // Create a tick with the specific text and a custom status.

Valid tick statuses are: 'ok', 'fail', 'pending' or any others listed in this._progressDefaults.tick.

.progressDefaults()

Override the default options when creating progress bars / spinners or other widgets.

progressDefaults(Object) // Append the specified options into the default object

See the this._progressDefaults object for more details on the structure of this object.

.progressComplete()

Indicate that either all or a specific progress action has completed and that its widget should be removed from the output.

progressComplete() // Remove all widgets
progressComplete(String <id>) // Remove a specific single widget
progressComplete(Array <ids>) // Remove all specified widgets

.setProgress()

Used within the this object to update progress while within a async-chainable task.

this.setProgress() // Redraw all widgets - includes moving spinners on by a frame
this.setProgress(Number <progress>) // Update the 'anonBar' progress item to the specified progress
this.setProgress(Number <progress>, Number <max_progress>) // As above but also set the max progress (otherwise `100` is assumed)