speeds

2.0.0 • Public • Published

speeds

NPM version build status npm download semantic-release

Speeds controllable stream.

You can control the downstream speed on your own.

Install

$ npm install speeds

Usage

var speeds = require('speeds');
var fs = require('fs');
 
// read data 1 byte per second
var total = 0;
fs.createReadStream(__filename).pipe(speeds(1)).on('data', function (chunk) {
  total += chunk.length;
  console.log('%s %d/%d bytes', Date(), chunk.length, total);
});

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    5
  • 1.0.0
    0
  • 0.0.1
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i speeds

Weekly Downloads

5

Version

2.0.0

License

MIT

Last publish

Collaborators

  • fengmk2