https://github.com/node-modules/speeds
Speeds controllable stream. You can control the downstream speed on your own.
https://github.com/node-modules/speeds
Last synced: 13 days ago
JSON representation
Speeds controllable stream. You can control the downstream speed on your own.
- Host: GitHub
- URL: https://github.com/node-modules/speeds
- Owner: node-modules
- License: other
- Created: 2014-03-11T08:55:22.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T18:40:33.000Z (over 2 years ago)
- Last Synced: 2025-05-07T00:47:25.651Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 34.2 KB
- Stars: 3
- Watchers: 10
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: LICENSE.txt
Awesome Lists containing this project
README
speeds
=======[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![npm download][download-image]][download-url]
[](https://github.com/semantic-release/semantic-release)[npm-image]: https://img.shields.io/npm/v/speeds.svg?style=flat-square
[npm-url]: https://npmjs.org/package/speeds
[travis-image]: https://img.shields.io/travis/node-modules/speeds.svg?style=flat-square
[travis-url]: https://travis-ci.org/node-modules/speeds
[download-image]: https://img.shields.io/npm/dm/speeds.svg?style=flat-square
[download-url]: https://npmjs.org/package/speedsSpeeds controllable stream.
You can control the downstream speed on your own.
## Install
```bash
$ npm install speeds
```## Usage
```js
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](LICENSE.txt)