Naively Programmable Module
Miss any of our Open RFC calls?Watch the recordings here! »

exponential-progress

2.0.0 • Public • Published

exponential-progress

Simulate progress using an exponential function.

Install

$ npm install exponential-progress

Usage

import ExponentialProgress from "exponential-progress";
 
const progress = new ExponentialProgress(10000);
 
setTimeout(() => {
  console.log(progress.progress);
}, 500);

API

ExponentialProgress(time)

time

Type: number

Average time in milliseconds for task to complete.

ExponentialProgress.start()

Sets the progress starting point to now. (optional: if not called, the moment of instance creation will be used)

ExponentialProgress.progress

The current progress from 0 to 1.

Install

npm i exponential-progress

DownloadsWeekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

2.42 kB

Total Files

4

Last publish

Collaborators

  • avatar