Socket
Socket
Sign inDemoInstall

async-progress

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    async-progress

Progess reporting for async module functions


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Install size
4.54 kB
Created
Weekly downloads
 

Readme

Source

async-progress

Build Status

This small module with zero dependencies wraps a async methods with progress tracking events.

So far supported async events are:

Additionally it supports CLI progress bars by passing the the multimeter module via dependency injection.

Installation

npm install async-progress --save

Usage

var
  asyncProgess = require("async-progress")({
    async: require("async"),
    multimeter: require("multimeter") // optional for CLI progress bars
  });

asyncProgess.auto({
  one: function one(callback) {
    setTimeout(callback, 1000);
  },
  two: ["one", function two(callback) {
    setTimeout(callback, 1000);
  }],
  three: ["two", function three(callback) {
    setTimeout(callback, 2000);
  }],
  two_and_a_half: ["one", function two_and_a_half(callback) {
    setTimeout(callback, 1300);
  }]
}, function () {
  console.log("done");
})

.on("progress", function (progress) {
  // implement your own progress bar
})

// Or use multimeter
.multimeter("Test A", process);

License

MIT

Keywords

FAQs

Last updated on 22 May 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc