Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

are-we-there-yet

Package Overview
Dependencies
Maintainers
5
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

are-we-there-yet

Keep track of the overall completion of many disparate processes

  • 4.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18M
decreased by-5.2%
Maintainers
5
Weekly downloads
 
Created

What is are-we-there-yet?

The 'are-we-there-yet' npm package is a progress tracker for complex operations where multiple steps are involved. It can be used to track the progress of individual items and groups of items, and it can report on the overall progress of the entire set of operations.

What are are-we-there-yet's main functionalities?

Tracking individual items

This feature allows you to track the progress of individual items by creating a new Tracker instance and specifying the total work units. You can then mark work as completed and check the progress.

{"var Tracker = require('are-we-there-yet').Tracker; var item = new Tracker('item', 10); item.completeWork(1); console.log(item.completed()); // Output: 1"}

Tracking groups of items

This feature allows you to track the progress of groups of items. You can create a new TrackerGroup instance, add items to the group, and then mark work as completed on individual items. The group's overall progress is calculated based on the progress of all items.

{"var TrackerGroup = require('are-we-there-yet').TrackerGroup; var group = new TrackerGroup('group'); var item1 = group.newItem('item1', 10); var item2 = group.newItem('item2', 20); item1.completeWork(5); item2.completeWork(10); console.log(group.completed()); // Output: 0.5"}

Reporting overall progress

This feature allows you to report the overall progress of the entire set of operations. You can add units of work to a TrackerGroup and mark them as completed. The group's completed method will return the overall progress as a fraction of the total work.

{"var TrackerGroup = require('are-we-there-yet').TrackerGroup; var group = new TrackerGroup('group'); group.addUnit('item1', 10); group.addUnit('item2', 20); group.completeUnit('item1'); group.completeUnit('item2', 10); console.log(group.completed()); // Output: 0.5"}

Other packages similar to are-we-there-yet

FAQs

Package last updated on 05 Jan 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc