New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-eta

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-eta

Estimated time to arrival

  • 0.9.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ETA

Estimated time to arrival.

API

ctor(count[, autoStartOrOptions])

Constructs ETA object for count of iterations. Optionally accepts additional parameter specifying whether time measurement should start immediately (autoStart), or, if it is an object, then it will be treated as options.

Options are:

  • autoStart - already described
  • numberFormatter - function, which accepts number and returns string
var Eta = require('node-eta');
var eta = new Eta(10);

start()

Starts time measurement.

iterate([anything1, anything2, ...])

Notifies estimator that one more iteration has finished. Optionally supports any number of arguments that will be passed to util.format to produce message, associated with last iteration.

format([anything1, anything2, ...])

Passes arguments to util.format and treats its invocation result as layout where following placeholders can participate:

  • {{elapsed}} - elapsed time in seconds
  • {{rate}} - current rate (iterations per second)
  • {{estimated}} - estimated time (total) in seconds
  • {{progress}} - progress (fraction of 1)
  • {{eta}} - estimated time to arrival in seconds
  • {{etah}} - formatted (for human-readability) eta
  • {{last}} - message from last iteration, if any

Returns layout filled with placeholder values.

License

MIT

Keywords

FAQs

Package last updated on 27 Nov 2015

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