core/node_modules/through/package.json
2017-12-07 16:31:24 +01:00

41 lines
2.0 KiB
JSON

{
"name": "through",
"version": "2.2.0",
"description": "simplified stream contruction",
"main": "index.js",
"scripts": {
"test": "asynct test/*.js"
},
"devDependencies": {
"stream-spec": "0",
"assertions": "2",
"asynct": "1"
},
"keywords": [
"stream",
"streams",
"user-streams",
"pipe"
],
"author": {
"name": "Dominic Tarr",
"email": "dominic.tarr@gmail.com",
"url": "dominictarr.com"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/dominictarr/through.git"
},
"homepage": "http://github.com/dominictarr/through",
"readme": "#through\n\n[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through)\n\nEasy way to create a `Stream` that is both `readable` and `writable`. \nPass in optional `write` and `end` methods. `through` takes care of pause/resume logic.\nUse `this.pause()` and `this.resume()` to manage flow.\nCheck `this.paused` to see current flow state. (write always returns `!this.paused`)\n\nThis function is the basis for most of the syncronous streams in \n[event-stream](http://github.com/dominictarr/event-stream).\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.queue(data) //data *must* not be null\n },\n function end () { //optional\n this.queue(null)\n })\n```\n\nOr, can also be used _without_ buffering on pause, use `this.emit('data', data)`,\nand this.emit('end')\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.emit('data', data)\n //this.pause() \n },\n function end () { //optional\n this.emit('end')\n })\n```\n\n## License\n\nMIT / Apache2\n",
"readmeFilename": "readme.markdown",
"bugs": {
"url": "https://github.com/dominictarr/through/issues"
},
"_id": "through@2.2.0",
"_shasum": "c4e5a200a3f1b480368196cf50bc69ffe2cdce73",
"_resolved": "https://registry.npmjs.org/through/-/through-2.2.0.tgz",
"_from": "through@2.2.0"
}