{"_id":"throttle","_rev":"22-16b12efa64ad0bc21ac8900cd2e496a2","name":"throttle","description":"Node.js Transform stream that passes data through at `n` bytes per second","dist-tags":{"latest":"1.0.3"},"versions":{"0.0.1":{"name":"throttle","description":"Throttle node Stream instances with \"bytes per second\".","version":"0.0.1","repository":"git://github.com/TooTallNate/node-throttle.git","author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"main":"./throttle","scripts":{"test":"expresso test/test*.js"},"engines":{"node":"*"},"_id":"throttle@0.0.1","_engineSupported":true,"_npmVersion":"0.2.16","_nodeVersion":"v0.3.6-pre","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"ef37b232bbe3d8621a00e8607ddcb8902e0621d0","tarball":"https://registry.npmjs.org/throttle/-/throttle-0.0.1.tgz","integrity":"sha512-R+9DWo1gx8HjjGi7lX471Yc0zmewypcIWM1yIXUQ8VYiEI0TR81EK2nguVsCAts9cBFuaK/Mu2hFgPXDFbpl3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE77cvP9e8cITY7vtkrX95lXJRedm0aWgV7BbEkssu2XAiEA+/efSXTwZwzfaC8cQGfxCNA6e1cuGyX4ICZgPlzbR0o="}]}},"1.0.0":{"name":"throttle","description":"Node.js Transform stream that passes data through at `n` bytes per second","version":"1.0.0","repository":{"type":"git","url":"git://github.com/TooTallNate/node-throttle.git"},"author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"main":"./throttle","scripts":{"test":"mocha --reporter spec"},"engines":{"node":">= v0.8.0"},"dependencies":{"stream-parser":">= 0.0.2"},"devDependencies":{"mocha":"*"},"_id":"throttle@1.0.0","dist":{"shasum":"5f643d18d302d6d94c8666460fd8fa5f4dbbe3c6","tarball":"https://registry.npmjs.org/throttle/-/throttle-1.0.0.tgz","integrity":"sha512-mQvAgY+30QxQA53kMwkQsNLIZ/YsGUPj1nqaAqBb602rS5GZbHVXfex1BV94Oyxa8iGdPxjitN2KCgUgOZZ7Rw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC59AeF+olAaXn0+rwbQ6pAtzJTG3oEBEoCIDST8zdaUAIgIsZgpOjiBoexZFXra2gbR+dHkyAwpJA7/Fus4qniNGM="}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"TooTallNate","email":"nathan@tootallnate.net"},{"name":"tootallnate","email":"nathan@tootallnate.net"}]},"1.0.1":{"name":"throttle","description":"Node.js Transform stream that passes data through at `n` bytes per second","version":"1.0.1","repository":{"type":"git","url":"git://github.com/TooTallNate/node-throttle.git"},"author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"main":"./throttle","scripts":{"test":"mocha --reporter spec"},"engines":{"node":">= v0.8.0"},"dependencies":{"stream-parser":">= 0.0.2"},"devDependencies":{"mocha":"*","readable-stream":"*"},"_id":"throttle@1.0.1","dist":{"shasum":"e2c260dbe780f38f4e7c515dbb122622d4897c5a","tarball":"https://registry.npmjs.org/throttle/-/throttle-1.0.1.tgz","integrity":"sha512-QSZD6LwVyCsTbl6Yf8qfcHT8Fb8oIvheMUgAhhu6/y7k4hv0NMziyq5y1DKrFSpW//7mQxcfm2g/aPCsdTcycw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBW5Ljr4rjnpJJNXl5GRRon9f0xsJkdE3gSVoAKQyK3DAiA4kIBDVw/mXwVJLTZJf6sU5wcc11cfQJozOKZeB1ZHxg=="}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"TooTallNate","email":"nathan@tootallnate.net"},{"name":"tootallnate","email":"nathan@tootallnate.net"}]},"1.0.2":{"name":"throttle","description":"Node.js Transform stream that passes data through at `n` bytes per second","version":"1.0.2","repository":{"type":"git","url":"git://github.com/TooTallNate/node-throttle.git"},"author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"main":"./throttle","scripts":{"test":"mocha --reporter spec"},"engines":{"node":">= v0.8.0"},"dependencies":{"stream-parser":">= 0.0.2","readable-stream":">= 0.3.0"},"devDependencies":{"mocha":"*"},"_id":"throttle@1.0.2","dist":{"shasum":"3da4cbfc9120611fa2c82ca2738a14c21a9d7700","tarball":"https://registry.npmjs.org/throttle/-/throttle-1.0.2.tgz","integrity":"sha512-zgOFHVyGeVQs3ZFFUzw0M6bZKylcQqL+yp2FGO24mHyWa/RhKCafkUknQCrDxim5kwHSVflJWxdlEZ3100vA2w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHeiT0k3maDEpmKSf/Y7wApmWoVEy1U9+35kZza290+pAiATMBOEothtRdYTzI7tC/ZbdKsH0MDSoEwfekBQ5Z7Apg=="}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"TooTallNate","email":"nathan@tootallnate.net"},{"name":"tootallnate","email":"nathan@tootallnate.net"}]},"1.0.3":{"name":"throttle","description":"Node.js Transform stream that passes data through at `n` bytes per second","version":"1.0.3","repository":{"type":"git","url":"git://github.com/TooTallNate/node-throttle.git"},"author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"main":"./throttle","scripts":{"test":"mocha --reporter spec"},"engines":{"node":">= v0.8.0"},"dependencies":{"stream-parser":">= 0.0.2","readable-stream":">= 0.3.0"},"devDependencies":{"mocha":"*"},"_id":"throttle@1.0.3","dist":{"shasum":"8a32e4a15f1763d997948317c5ebe3ad8a41e4b7","tarball":"https://registry.npmjs.org/throttle/-/throttle-1.0.3.tgz","integrity":"sha512-VYINSQFQeFdmhCds0tTqvQmLmdAjzGX1D6GnRQa4zlq8OpTtWSMddNyRq8Z4Snw/d6QZrWt9cM/cH8xTiGUkYA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDE9aW8HmKtZnZeAlKCSn69XIQIvaWGnpVpf+Olf/MJyQIgeUnaU1YXFziJBk9Wrc1NMYaei1M9hOCUjVkuUNJFgSg="}]},"_from":".","_npmVersion":"1.2.12","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"TooTallNate","email":"nathan@tootallnate.net"},{"name":"tootallnate","email":"nathan@tootallnate.net"}]}},"maintainers":[{"email":"nathan@tootallnate.net","name":"tootallnate"}],"time":{"modified":"2022-06-27T06:23:35.760Z","created":"2011-01-25T03:37:42.563Z","0.0.1":"2011-01-25T03:37:43.252Z","1.0.0":"2013-02-09T03:06:52.899Z","1.0.1":"2013-02-10T20:00:38.941Z","1.0.2":"2013-02-26T22:22:40.634Z","1.0.3":"2013-03-07T19:05:06.959Z"},"author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"repository":{"type":"git","url":"git://github.com/TooTallNate/node-throttle.git"},"users":{"roryrjb":true,"dusandz":true,"demoive":true,"samar":true,"hiztmine":true,"skriglitz":true,"legaphy":true},"readme":"node-throttle\n=============\n### Node.js Transform stream that passes data through at `n` bytes per second\n[![Build Status](https://secure.travis-ci.org/TooTallNate/node-throttle.png)](http://travis-ci.org/TooTallNate/node-throttle)\n\nThis module offers a `Throttle` passthrough stream class, which allows you to\nwrite data to it and it will be passed through in `n` bytes per second. It can\nbe useful for throttling HTTP uploads or to simulate reading from a file in\nreal-time, etc.\n\n\nInstallation\n------------\n\n``` bash\n$ npm install throttle\n```\n\n\nExample\n-------\n\nHere's an example of throttling stdin at 1 byte per second and outputting the\ndata to stdout:\n\n``` js\nvar Throttle = require('throttle');\n\n// create a \"Throttle\" instance that reads at 1 bps\nvar throttle = new Throttle(1);\n\nprocess.stdin.pipe(throttle).pipe(process.stdout);\n```\n\nWe can see it in action with the `echo` command:\n\n![](http://f.cl.ly/items/2h1I2Q0m3x1I2s2r2O3R/throttle.opt.gif)\n\n\nAPI\n---\n\n  - [Throttle()](#throttle)\n\n## Throttle()\n\nThe `Throttle` passthrough stream class is very similar to the node core\n`stream.Passthrough` stream, except that you specify a `bps` \"bytes per\nsecond\" option and data *will not* be passed through faster than the byte\nvalue you specify.\n\nYou can invoke with just a `bps` Number and get the rest of the default\noptions. This should be more common:\n\n``` js\nprocess.stdin.pipe(new Throttle(100 * 1024)).pipe(process.stdout);\n```\n\nOr you can pass an `options` Object in, with a `bps` value specified along with\nother options:\n\n``` js\nvar t = new Throttle({ bps: 100 * 1024, chunkSize: 100, highWaterMark: 500 });\n```\n","readmeFilename":"README.md"}