downloading

0.0.1 • Public • Published

What is downloading?

Progress bar file download.

Original package: https://www.npmjs.com/package/progress

Differences: Added title

Installation

npm i downloading

Usage

Import the library in your code:

const Downloading = require('downloading');
 
let bar = new Downloading(':bar [:title] :percent', {
    title: 'Downloading file puppy.png',
    width: 50,
    total: 100
});

Example

const Downloading = require('downloading');
 
let bar = new Downloading(':bar [:title] :percent', {
    title: 'Download archive with beautiful puppies.',
    width: 50,
    total: 100
});
 
let tick = setInterval(() => {
    bar.tick(Math.random());
    if (bar.curr >= bar.total - 1) {
        clearInterval(tick);
        bar.tick(1, {
            title: 'Archive downloaded'
        });
    }
}, 300);

Package Sidebar

Install

npm i downloading

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

32.6 kB

Total Files

4

Last publish

Collaborators

  • rickylawson