-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
45 lines (45 loc) · 2.56 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"name": "read-only-stream",
"version": "1.1.1",
"description": "wrap a readable/writable stream to be read-only",
"main": "index.js",
"dependencies": {
"readable-stream": "^1.0.31",
"readable-wrap": "^1.0.0"
},
"devDependencies": {
"concat-stream": "^1.4.6",
"tape": "^2.13.2",
"through2": "~0.6.1",
"through": "^2.3.4",
"covert": "^1.0.0"
},
"scripts": {
"test": "tape test/*.js",
"coverage": "covert test/*.js"
},
"repository": {
"type": "git",
"url": "git://github.com/substack/read-only-stream.git"
},
"homepage": "https://github.com/substack/read-only-stream",
"keywords": [
"stream",
"readonly"
],
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"license": "MIT",
"readme": "# read-only-stream\n\nwrap a readable/writable stream to be read-only\nto prevent mucking up the input side\n\n[![build status](https://secure.travis-ci.org/substack/read-only-stream.png)](http://travis-ci.org/substack/read-only-stream)\n\n# example\n\nSuppose you have a module that uses a readable/writable stream internally but\nwant to expose just the readable part of that internal stream. This is common if\nyou use the writable side internally and expose the readable side as the\ninterface.\n\nNow we can write some code like this with a `through` stream internally for\nconvenience:\n\n``` js\nvar through = require('through2');\nvar readonly = require('read-only-stream');\n\nmodule.exports = function () {\n var stream = through();\n stream.end('wooooo\\n');\n return readonly(stream);\n};\n```\n\nbut consumers won't be able to write to the input side and break the api:\n\n``` js\nvar wrap = require('./wrap.js');\nvar ro = wrap(); // can't write to `ro` and muck up internal state\nro.pipe(process.stdout);\n```\n\n# methods\n\n``` js\nvar readonly = require('read-only-stream')\n```\n\n## var ro = readonly(stream)\n\nReturn a readable stream `ro` that wraps the readable/writable `stream` argument\ngiven to only expose the readable side.\n\n`stream` can be a streams1 or streams2 stream.\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install read-only-stream\n```\n\n# license\n\nMIT\n",
"readmeFilename": "readme.markdown",
"bugs": {
"url": "https://github.com/substack/read-only-stream/issues"
},
"_id": "read-only-stream@1.1.1",
"_shasum": "5da77c799ed1388d3ef88a18471bb5924f8a0ba1",
"_from": "read-only-stream@>=1.1.1 <2.0.0",
"_resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz"
}