-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
59 lines (59 loc) · 3.31 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
{
"name": "concat-stream",
"version": "1.4.6",
"description": "writable stream that concatenates strings or binary data and calls a callback with the result",
"tags": [
"stream",
"simple",
"util",
"utility"
],
"author": {
"name": "Max Ogden",
"email": "max@maxogden.com"
},
"repository": {
"type": "git",
"url": "http://github.com/maxogden/concat-stream.git"
},
"bugs": {
"url": "http://github.com/maxogden/concat-stream/issues"
},
"engines": [
"node >= 0.8"
],
"main": "index.js",
"scripts": {
"test": "tape test/*.js test/server/*.js"
},
"license": "MIT",
"dependencies": {
"inherits": "~2.0.1",
"typedarray": "~0.0.5",
"readable-stream": "~1.1.9"
},
"devDependencies": {
"tape": "~2.3.2"
},
"testling": {
"files": "test/*.js",
"browsers": [
"ie/8..latest",
"firefox/17..latest",
"firefox/nightly",
"chrome/22..latest",
"chrome/canary",
"opera/12..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2..latest"
]
},
"readme": "# concat-stream\n\nWritable stream that concatenates strings or binary data and calls a callback with the result. Not a transform stream -- more of a stream sink.\n\n[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/)\n\n[![browser support](https://ci.testling.com/maxogden/concat-stream.png)](https://ci.testling.com/maxogden/concat-stream)\n\n### examples\n\n#### Buffers\n\n```js\nvar concat = require('concat-stream')\nvar fs = require('fs')\n \nvar read = fs.createReadStream('readme.md')\nvar write = concat(function(data) {\n // data is all of readme.md as a Buffer\n})\n \nread.pipe(write)\n```\n\n#### Arrays\n\n```js\nvar write = concat(function(data) {})\nwrite.write([1,2,3])\nwrite.write([4,5,6])\nwrite.end()\n// data will be [1,2,3,4,5,6] in the above callback\n```\n\n#### Uint8Arrays\n\n```js\nvar write = concat(function(data) {})\nvar a = new Uint8Array(3)\na[0] = 97; a[1] = 98; a[2] = 99\nwrite.write(a)\nwrite.write('!')\nwrite.end(Buffer('!!1'))\n```\n\nSee `test/` for more examples\n\n# methods\n\n```js\nvar concat = require('concat-stream')\n```\n\n## var writable = concat(opts={}, cb)\n\nReturn a `writable` stream that will fire `cb(data)` with all of the data that\nwas written to the stream. Data can be written to `writable` as strings,\nBuffers, arrays of byte integers, and Uint8Arrays. \n\nBy default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason.\n\n* `string` - get a string\n* `buffer` - get back a Buffer\n* `array` - get an array of byte integers\n* `uint8array`, `u8`, `uint8` - get back a Uint8Array\n* `object`, get back an array of Objects\n\nIf you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't int he list above), it will try to convert concat them into a `Buffer`.\n\n# license\n\nMIT LICENSE\n",
"readmeFilename": "readme.md",
"homepage": "https://github.com/maxogden/concat-stream",
"_id": "concat-stream@1.4.6",
"_from": "concat-stream@^1.4.1"
}