-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
82 lines (82 loc) · 5.86 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"_args": [
[
{
"raw": "memory-streams@https://registry.npmjs.org/memory-streams/-/memory-streams-0.1.2.tgz",
"scope": null,
"escapedName": "memory-streams",
"name": "memory-streams",
"rawSpec": "https://registry.npmjs.org/memory-streams/-/memory-streams-0.1.2.tgz",
"spec": "https://registry.npmjs.org/memory-streams/-/memory-streams-0.1.2.tgz",
"type": "remote"
},
"/Users/jennyphan/AngularToolingSamples/Angular4/aboutMe-app/functions/node_modules/firebase-admin"
]
],
"_from": "memory-streams@https://registry.npmjs.org/memory-streams/-/memory-streams-0.1.2.tgz",
"_id": "memory-streams@0.1.2",
"_inCache": true,
"_location": "/firebase-admin/memory-streams",
"_phantomChildren": {
"core-util-is": "1.0.2",
"inherits": "2.0.3"
},
"_requested": {
"raw": "memory-streams@https://registry.npmjs.org/memory-streams/-/memory-streams-0.1.2.tgz",
"scope": null,
"escapedName": "memory-streams",
"name": "memory-streams",
"rawSpec": "https://registry.npmjs.org/memory-streams/-/memory-streams-0.1.2.tgz",
"spec": "https://registry.npmjs.org/memory-streams/-/memory-streams-0.1.2.tgz",
"type": "remote"
},
"_requiredBy": [
"/firebase-admin",
"/firebase-admin/npm-run-all"
],
"_resolved": "https://registry.npmjs.org/memory-streams/-/memory-streams-0.1.2.tgz",
"_shasum": "273ff777ab60fec599b116355255282cca2c50c2",
"_shrinkwrap": null,
"_spec": "memory-streams@https://registry.npmjs.org/memory-streams/-/memory-streams-0.1.2.tgz",
"_where": "/Users/jennyphan/AngularToolingSamples/Angular4/aboutMe-app/functions/node_modules/firebase-admin",
"author": {
"name": "Paul Jackson",
"url": "http://jaaco.uk/"
},
"bugs": {
"url": "https://github.com/paulja/memory-streams-js/issues"
},
"dependencies": {
"readable-stream": "~1.0.2"
},
"description": "Simple implmentation of Stream.Readable and Stream.Writable holding the data in memory.",
"devDependencies": {
"should": "~1.2.2"
},
"directories": {
"test": "test"
},
"homepage": "https://github.com/paulja/memory-streams-js",
"keywords": [
"stream",
"string",
"memory",
"Readable",
"Writable"
],
"license": "MIT",
"main": "index.js",
"name": "memory-streams",
"optionalDependencies": {},
"readme": "# Memory Streams JS\n_Memory Streams JS_ is a light-weight implementation of the `Stream.Readable` and `Stream.Writable` abstract classes from node.js. You can use the classes provided to store the result of reading and writing streams in memory. This can be useful when you need pipe your test output for later inspection or to stream files from the web into memory without have to use temporary files on disk.\n\n## Installation\nInstall with:\n\n```bash\nnpm install memory-streams --save\n```\n\n## Usage\nSample usage, using the `ReadableStream` class and piping:\n\n```js\nvar streams = require('memory-streams');\n\n// Initialize with the string\nvar reader = new streams.ReadableStream('Hello World\\n');\n\n// Send all output to stdout\nreader.pipe(process.stdout); // outputs: \"Hello World\\n\"\n\n// Add more data to the stream\nreader.append('Hello Universe\\n'); // outputs \"Hello Universe\\n\";\n```\n\nUsing the `ReadableStream` class and reading manually:\n\n```js\nvar streams = require('memory-streams');\n\n// Initialize with the string\nvar reader = new streams.ReadableStream('Hello World\\n');\n\n// Add more data to the stream\nreader.append('Hello Universe\\n'); // outputs \"Hello Universe\\n\";\n\n// Read the data out\nconsole.log(reader.read().toString()); // outputs: \"Hello World\\nHello Universe\\n\"\n```\n \nUsing the `WritableStream` class and piping the contents of a file:\n\n```js\nvar streams = require('memory-streams')\n , fs = require('fs');\n\n// Pipe \nvar reader = fs.createReadStream('index.js');\nvar writer = new streams.WritableStream();\nreader.pipe(writer);\nreader.on('readable', function() {\n\n // Output the content as a string\n console.log(writer.toString());\n \n // Output the content as a Buffer\n console.log(writer.toBuffer());\n});\n```\n \nYou can also call the `write` method directly to store data to the stream:\n\n```js\nvar streams = require('memory-streams');\n\n// Write method\nvar writer = new streams.WritableStream();\nwriter.write('Hello World\\n');\n\n// Output the content as a string\nconsole.log(writer.toString()); // Outputs: \"Hello World\\n\"\n```\n\nFor more examples you can look at the tests for the module.\n\n## License\nMIT\n\nCopyright (c) 2017 Paul Jackson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/paulja/memory-streams-js.git"
},
"scripts": {
"test": "node ./test/test-readablestream.js && node ./test/test-writablestream.js"
},
"typings": "index.d.ts",
"version": "0.1.2"
}