-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
85 lines (85 loc) · 4.29 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
83
84
85
{
"_args": [
[
{
"raw": "first-chunk-stream@https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
"scope": null,
"escapedName": "first-chunk-stream",
"name": "first-chunk-stream",
"rawSpec": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
"spec": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
"type": "remote"
},
"/Users/jennyphan/AngularToolingSamples/Angular4/aboutMe-app/functions/node_modules/firebase-admin"
]
],
"_from": "first-chunk-stream@https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
"_id": "first-chunk-stream@1.0.0",
"_inCache": true,
"_location": "/firebase-admin/first-chunk-stream",
"_phantomChildren": {},
"_requested": {
"raw": "first-chunk-stream@https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
"scope": null,
"escapedName": "first-chunk-stream",
"name": "first-chunk-stream",
"rawSpec": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
"spec": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
"type": "remote"
},
"_requiredBy": [
"/firebase-admin",
"/firebase-admin/strip-bom",
"/firebase-admin/strip-bom-stream"
],
"_resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
"_shasum": "59bfb50cd905f60d7c394cd3d9acaab4e6ad934e",
"_shrinkwrap": null,
"_spec": "first-chunk-stream@https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
"_where": "/Users/jennyphan/AngularToolingSamples/Angular4/aboutMe-app/functions/node_modules/firebase-admin",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/first-chunk-stream/issues"
},
"dependencies": {},
"description": "Transform the first chunk in a stream",
"devDependencies": {
"concat-stream": "^1.4.5",
"mocha": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/first-chunk-stream#readme",
"keywords": [
"buffer",
"stream",
"streams",
"transform",
"first",
"chunk",
"size",
"min",
"minimum"
],
"license": "MIT",
"name": "first-chunk-stream",
"optionalDependencies": {},
"readme": "# first-chunk-stream [![Build Status](https://travis-ci.org/sindresorhus/first-chunk-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/first-chunk-stream)\n\n> Transform the first chunk in a stream\n\nUseful if you want to do something to the first chunk.\n\nYou can also set the minimum size of that chunk.\n\n\n## Install\n\n```sh\n$ npm install --save first-chunk-stream\n```\n\n\n## Usage\n\n```js\nvar fs = require('fs');\nvar concat = require('concat-stream');\nvar firstChunk = require('first-chunk-stream');\n\n// unicorn.txt => unicorn rainbow\n// `highWaterMark: 1` means it will only read 1 byte at the time\nfs.createReadStream('unicorn.txt', {highWaterMark: 1})\n\t.pipe(firstChunk({minSize: 7}, function (chunk, enc, cb) {\n\t\tthis.push(chunk.toUpperCase());\n\t\tcb();\n\t}))\n\t.pipe(concat(function (data) {\n\t\tconsole.log(data);\n\t\t//=> UNICORN rainbow\n\t}));\n```\n\n\n## API\n\n### firstChunk([options], transform)\n\n#### options.minSize\n\nType: `number`\n\nThe minimum size of the first chunk.\n\n#### transform(chunk, encoding, callback)\n\n*Required* \nType: `function`\n\nThe [function](http://nodejs.org/docs/latest/api/stream.html#stream_transform_transform_chunk_encoding_callback) that gets the first chunk.\n\n### firstChunk.ctor()\n\nInstead of returning a [stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform_1) instance, `firstChunk.ctor()` returns a constructor for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n",
"readmeFilename": "readme.md",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/first-chunk-stream.git"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.0"
}