Welcome to mirror list, hosted at ThFree Co, Russian Federation.

package.json « stringstream « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 890b0ae3d0084d4685938efdb486bc1a1dfc91ee (plain)
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
{
  "_args": [
    [
      "stringstream@~0.0.4",
      "/Users/rebecca/code/npm/node_modules/request"
    ]
  ],
  "_from": "stringstream@>=0.0.4 <0.1.0",
  "_id": "stringstream@0.0.4",
  "_inCache": true,
  "_location": "/stringstream",
  "_npmUser": {
    "email": "michael.hart.au@gmail.com",
    "name": "hichaelmart"
  },
  "_npmVersion": "1.2.0",
  "_phantomChildren": {},
  "_requested": {
    "name": "stringstream",
    "raw": "stringstream@~0.0.4",
    "rawSpec": "~0.0.4",
    "scope": null,
    "spec": ">=0.0.4 <0.1.0",
    "type": "range"
  },
  "_requiredBy": [
    "/request"
  ],
  "_resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.4.tgz",
  "_shasum": "0f0e3423f942960b5692ac324a57dd093bc41a92",
  "_shrinkwrap": null,
  "_spec": "stringstream@~0.0.4",
  "_where": "/Users/rebecca/code/npm/node_modules/request",
  "author": {
    "email": "michael.hart.au@gmail.com",
    "name": "Michael Hart",
    "url": "http://github.com/mhart"
  },
  "dependencies": {},
  "description": "Encode and decode streams into string streams",
  "devDependencies": {},
  "directories": {},
  "dist": {
    "shasum": "0f0e3423f942960b5692ac324a57dd093bc41a92",
    "tarball": "http://registry.npmjs.org/stringstream/-/stringstream-0.0.4.tgz"
  },
  "keywords": [
    "base64",
    "gzip",
    "stream",
    "string"
  ],
  "license": "MIT",
  "main": "stringstream.js",
  "maintainers": [
    {
      "name": "hichaelmart",
      "email": "michael.hart.au@gmail.com"
    }
  ],
  "name": "stringstream",
  "optionalDependencies": {},
  "readme": "# Decode streams into strings The Right Way(tm)\n\n```javascript\nvar fs   = require('fs')\nvar zlib = require('zlib')\nvar strs = require('stringstream')\n\nvar utf8Stream = fs.createReadStream('massiveLogFile.gz')\n  .pipe(zlib.createGunzip())\n  .pipe(strs('utf8'))\n```\n\nNo need to deal with `setEncoding()` weirdness, just compose streams\nlike they were supposed to be!\n\nHandles input and output encoding:\n\n```javascript\n// Stream from utf8 to hex to base64... Why not, ay.\nvar hex64Stream = fs.createReadStream('myFile')\n  .pipe(strs('utf8', 'hex'))\n  .pipe(strs('hex', 'base64'))\n```\n\nAlso deals with `base64` output correctly by aligning each emitted data\nchunk so that there are no dangling `=` characters:\n\n```javascript\nvar stream = fs.createReadStream('myFile').pipe(strs('base64'))\n\nvar base64Str = ''\n\nstream.on('data', function(data) { base64Str += data })\nstream.on('end', function() {\n  console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding()\n  console.log('Original file is: ' + new Buffer(base64Str, 'base64'))\n})\n```\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "https://github.com/mhart/StringStream.git"
  },
  "version": "0.0.4"
}