Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report

are-we-there-yet 4.0.2

Keep track of the overall completion of many disparate processes
Package summary
Share
0
issues
0
licenses
Package created
8 Dec 2014
Version published
5 Jan 2024
Maintainers
5
Total deps
0
Direct deps
0
License
ISC
Generating a report...
Hold on while we generate a fresh audit report for this package.

Frequently Asked Questions

What does are-we-there-yet do?

"are-we-there-yet" is a handy npm package primarily used to keep track of the completion status of complex hierarchies of asynchronous tasks. This package helps to record and report the progress of different workflows, which are typical in asynchronous programming. Its primary usage is to feed the completion data into one of the progress bar modules. However, the package is versatile and can be utilized as per individual requirements.

How do you use are-we-there-yet?

To use "are-we-there-yet", firstly, you need to install the package via npm using the following command:

npm install --save are-we-there-yet

Here's an example of how to use "are-we-there-yet" in your JavaScript code:

var TrackerGroup = require("are-we-there-yet").TrackerGroup;
var top = new TrackerGroup("program");

var single = top.newItem("one thing", 100);
single.completeWork(20);

console.log(top.completed()) // It will log 0.2 to the console

fs.stat("file", function(er, stat) {
  if (er) throw er;
  var stream = top.newStream("file", stat.size);
  fs.createReadStream("file").pipe(stream)
  .on("data", function (chunk) {
    // You can perform actions with each chunk here
  })

  top.on("change", function(name){
    // This callback will get triggered every time a chunk is read from the file 
    // top.completed() will start at 0.1 and increase up to 0.6 as the file is read
  })
})

In this code, "are-we-there-yet" is used to track the progress of reading a file. The script creates a TrackerGroup and starts a new item on it. The completed() function helps determine the progress of the task.

Where are the are-we-there-yet docs?

The documentation for "are-we-there-yet" is available in the README file of its main repository on GitHub where it's maintained. To access the comprehensive documentation, you can visit https://github.com/npm/are-we-there-yet. It provides a complete guide and thorough explanation on how to use "are-we-there-yet", complete with usage instructions, function explanations, and real-world examples.