0.0.1 • Published 7 years ago
downloading v0.0.1
What is downloading?
Progress bar file download.
Original package: https://www.npmjs.com/package/progress
Differences: Added title
Installation
npm i downloadingUsage
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);0.0.1
7 years ago