| 1 |
{ |
| 2 |
"_id": "stringstream", |
| 3 |
"_rev": "22-aabfb0461307e1a886d319d41af9b956", |
| 4 |
"name": "stringstream", |
| 5 |
"description": "Encode and decode streams into string streams", |
| 6 |
"dist-tags": { |
| 7 |
"latest": "1.0.0" |
| 8 |
}, |
| 9 |
"versions": { |
| 10 |
"0.0.0": { |
| 11 |
"name": "stringstream", |
| 12 |
"version": "0.0.0", |
| 13 |
"description": "Encode and decode data streams into string streams", |
| 14 |
"main": "stringstream.js", |
| 15 |
"scripts": { |
| 16 |
"test": "echo \"Error: no test specified\" && exit 1" |
| 17 |
}, |
| 18 |
"homepage": "https://github.com/mhart/StringStream", |
| 19 |
"repository": { |
| 20 |
"url": "https://github.com/mhart/StringStream.git" |
| 21 |
}, |
| 22 |
"author": { |
| 23 |
"name": "Michael Hart", |
| 24 |
"email": "[email protected]" |
| 25 |
}, |
| 26 |
"license": "BSD", |
| 27 |
"_id": "[email protected]", |
| 28 |
"dist": { |
| 29 |
"shasum": "4228912fb3a96ca3254b233359df50f9da804e1e", |
| 30 |
"tarball": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.0.tgz" |
| 31 |
}, |
| 32 |
"maintainers": [ |
| 33 |
{ |
| 34 |
"name": "hichaelmart", |
| 35 |
"email": "[email protected]" |
| 36 |
} |
| 37 |
], |
| 38 |
"directories": {} |
| 39 |
}, |
| 40 |
"0.0.1": { |
| 41 |
"name": "stringstream", |
| 42 |
"version": "0.0.1", |
| 43 |
"description": "Encode and decode streams into string streams", |
| 44 |
"main": "stringstream.js", |
| 45 |
"scripts": { |
| 46 |
"test": "echo \"Error: no test specified\" && exit 1" |
| 47 |
}, |
| 48 |
"homepage": "https://github.com/mhart/StringStream", |
| 49 |
"repository": { |
| 50 |
"url": "https://github.com/mhart/StringStream.git" |
| 51 |
}, |
| 52 |
"author": { |
| 53 |
"name": "Michael Hart", |
| 54 |
"email": "[email protected]" |
| 55 |
}, |
| 56 |
"license": "BSD", |
| 57 |
"_id": "[email protected]", |
| 58 |
"dist": { |
| 59 |
"shasum": "93c24069089395a0a095222ce032aaf453d71f45", |
| 60 |
"tarball": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.1.tgz" |
| 61 |
}, |
| 62 |
"maintainers": [ |
| 63 |
{ |
| 64 |
"name": "hichaelmart", |
| 65 |
"email": "[email protected]" |
| 66 |
} |
| 67 |
], |
| 68 |
"directories": {} |
| 69 |
}, |
| 70 |
"0.0.2": { |
| 71 |
"name": "stringstream", |
| 72 |
"version": "0.0.2", |
| 73 |
"description": "Encode and decode streams into string streams", |
| 74 |
"main": "stringstream.js", |
| 75 |
"scripts": { |
| 76 |
"test": "echo \"Error: no test specified\" && exit 1" |
| 77 |
}, |
| 78 |
"homepage": "https://github.com/mhart/StringStream", |
| 79 |
"repository": { |
| 80 |
"url": "https://github.com/mhart/StringStream.git" |
| 81 |
}, |
| 82 |
"author": { |
| 83 |
"name": "Michael Hart", |
| 84 |
"email": "[email protected]" |
| 85 |
}, |
| 86 |
"license": "BSD", |
| 87 |
"_id": "[email protected]", |
| 88 |
"dist": { |
| 89 |
"shasum": "663f1171cd94d7951b14074037a622b92bde8669", |
| 90 |
"tarball": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.2.tgz" |
| 91 |
}, |
| 92 |
"maintainers": [ |
| 93 |
{ |
| 94 |
"name": "hichaelmart", |
| 95 |
"email": "[email protected]" |
| 96 |
} |
| 97 |
], |
| 98 |
"directories": {} |
| 99 |
}, |
| 100 |
"0.0.3": { |
| 101 |
"name": "stringstream", |
| 102 |
"version": "0.0.3", |
| 103 |
"description": "Encode and decode streams into string streams", |
| 104 |
"main": "stringstream.js", |
| 105 |
"scripts": { |
| 106 |
"test": "echo \"Error: no test specified\" && exit 1" |
| 107 |
}, |
| 108 |
"homepage": "https://github.com/mhart/StringStream", |
| 109 |
"repository": { |
| 110 |
"url": "https://github.com/mhart/StringStream.git" |
| 111 |
}, |
| 112 |
"author": { |
| 113 |
"name": "Michael Hart", |
| 114 |
"email": "[email protected]" |
| 115 |
}, |
| 116 |
"license": "BSD", |
| 117 |
"_id": "[email protected]", |
| 118 |
"dist": { |
| 119 |
"shasum": "db9412bd6d349058a437dd483dfabc65b4578b48", |
| 120 |
"tarball": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.3.tgz" |
| 121 |
}, |
| 122 |
"maintainers": [ |
| 123 |
{ |
| 124 |
"name": "hichaelmart", |
| 125 |
"email": "[email protected]" |
| 126 |
} |
| 127 |
], |
| 128 |
"directories": {} |
| 129 |
}, |
| 130 |
"0.0.4": { |
| 131 |
"name": "stringstream", |
| 132 |
"version": "0.0.4", |
| 133 |
"description": "Encode and decode streams into string streams", |
| 134 |
"author": { |
| 135 |
"name": "Michael Hart", |
| 136 |
"email": "[email protected]", |
| 137 |
"url": "http://github.com/mhart" |
| 138 |
}, |
| 139 |
"main": "stringstream.js", |
| 140 |
"keywords": [ |
| 141 |
"string", |
| 142 |
"stream", |
| 143 |
"base64", |
| 144 |
"gzip" |
| 145 |
], |
| 146 |
"repository": { |
| 147 |
"type": "git", |
| 148 |
"url": "https://github.com/mhart/StringStream.git" |
| 149 |
}, |
| 150 |
"license": "MIT", |
| 151 |
"_id": "[email protected]", |
| 152 |
"dist": { |
| 153 |
"shasum": "0f0e3423f942960b5692ac324a57dd093bc41a92", |
| 154 |
"tarball": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.4.tgz" |
| 155 |
}, |
| 156 |
"_npmVersion": "1.2.0", |
| 157 |
"_npmUser": { |
| 158 |
"name": "hichaelmart", |
| 159 |
"email": "[email protected]" |
| 160 |
}, |
| 161 |
"maintainers": [ |
| 162 |
{ |
| 163 |
"name": "hichaelmart", |
| 164 |
"email": "[email protected]" |
| 165 |
} |
| 166 |
], |
| 167 |
"directories": {} |
| 168 |
}, |
| 169 |
"0.0.5": { |
| 170 |
"name": "stringstream", |
| 171 |
"version": "0.0.5", |
| 172 |
"description": "Encode and decode streams into string streams", |
| 173 |
"author": { |
| 174 |
"name": "Michael Hart", |
| 175 |
"email": "[email protected]", |
| 176 |
"url": "http://github.com/mhart" |
| 177 |
}, |
| 178 |
"main": "stringstream.js", |
| 179 |
"keywords": [ |
| 180 |
"string", |
| 181 |
"stream", |
| 182 |
"base64", |
| 183 |
"gzip" |
| 184 |
], |
| 185 |
"repository": { |
| 186 |
"type": "git", |
| 187 |
"url": "git+https://github.com/mhart/StringStream.git" |
| 188 |
}, |
| 189 |
"license": "MIT", |
| 190 |
"gitHead": "1efe3bf507bf3a1161f8473908b60e881d41422b", |
| 191 |
"bugs": { |
| 192 |
"url": "https://github.com/mhart/StringStream/issues" |
| 193 |
}, |
| 194 |
"homepage": "https://github.com/mhart/StringStream#readme", |
| 195 |
"_id": "[email protected]", |
| 196 |
"scripts": {}, |
| 197 |
"_shasum": "4e484cd4de5a0bbbee18e46307710a8a81621878", |
| 198 |
"_from": ".", |
| 199 |
"_npmVersion": "2.14.8", |
| 200 |
"_nodeVersion": "4.2.1", |
| 201 |
"_npmUser": { |
| 202 |
"name": "hichaelmart", |
| 203 |
"email": "[email protected]" |
| 204 |
}, |
| 205 |
"maintainers": [ |
| 206 |
{ |
| 207 |
"name": "hichaelmart", |
| 208 |
"email": "[email protected]" |
| 209 |
} |
| 210 |
], |
| 211 |
"dist": { |
| 212 |
"shasum": "4e484cd4de5a0bbbee18e46307710a8a81621878", |
| 213 |
"tarball": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz" |
| 214 |
}, |
| 215 |
"directories": {} |
| 216 |
}, |
| 217 |
"0.0.6": { |
| 218 |
"name": "stringstream", |
| 219 |
"version": "0.0.6", |
| 220 |
"description": "Encode and decode streams into string streams", |
| 221 |
"author": { |
| 222 |
"name": "Michael Hart", |
| 223 |
"email": "[email protected]", |
| 224 |
"url": "http://github.com/mhart" |
| 225 |
}, |
| 226 |
"main": "stringstream.js", |
| 227 |
"keywords": [ |
| 228 |
"string", |
| 229 |
"stream", |
| 230 |
"base64", |
| 231 |
"gzip" |
| 232 |
], |
| 233 |
"repository": { |
| 234 |
"type": "git", |
| 235 |
"url": "git+https://github.com/mhart/StringStream.git" |
| 236 |
}, |
| 237 |
"license": "MIT", |
| 238 |
"gitHead": "fee31c5c4a5efc7c7cc2fde4aee633dedefd6d67", |
| 239 |
"bugs": { |
| 240 |
"url": "https://github.com/mhart/StringStream/issues" |
| 241 |
}, |
| 242 |
"homepage": "https://github.com/mhart/StringStream#readme", |
| 243 |
"_id": "[email protected]", |
| 244 |
"_npmVersion": "6.0.1", |
| 245 |
"_nodeVersion": "8.11.1", |
| 246 |
"_npmUser": { |
| 247 |
"name": "hichaelmart", |
| 248 |
"email": "[email protected]" |
| 249 |
}, |
| 250 |
"dist": { |
| 251 |
"integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", |
| 252 |
"shasum": "7880225b0d4ad10e30927d167a1d6f2fd3b33a72", |
| 253 |
"tarball": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", |
| 254 |
"fileCount": 6, |
| 255 |
"unpackedSize": 6242, |
| 256 |
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa/VftCRA9TVsSAnZWagAA6KMP/ieCrg0R0w4OF+ptEu5Z\nMatSI7T+xoZAKA+/dHPcLuEBfBT5Dilim5ryW6l7iqnQpBxfLnmSaqLJo5Jg\n9hBb4ojhblFC1FKmL1tSwqCQt9yQN/PHLi5+iWpRSfSubaqSMG5Ryi2HP4Ek\nssanBMdfB++umdRa6KzXHvyxrUnJ2qK1wDV55qnsVR2tBm4H8TO38mRryedE\n4WMd+XQrTICRvGiAsxOBNYylajvZdAKVdP59yNP5C0EzFpXLxd5wtyHYaewL\nVwdUNNYiRkRXSSeV7IWBzaVCf7m/NF7hm9pRXm7k1He3XBeMzlUiLe3h9rw3\nadrGevZdIkuxuddOV57q6bE2ZSWLZjY/7hmuXMPlGxLMxY2sz8UdT5XHS2Ej\nZfmLexQHr+b83I0xkLTDZrV/Ul+xV2gXa+OdFDMakupsB9lOMUlwzt+drE6G\nEKUBnQ8gtXq00z8EWJiPK2s72I4m/3MWztyHKLU7Xh9wOjaZE0YbsUEBZrOD\ndFdkcyU8BwJVpTHR1pnfwMx8xPzeXGsozQkdnCz9MCe8slrI2zGJiaO8WX1h\nLZlUbTGkmQdow1Tr16KMroipZr4Occ9ywvcdRJZ82ZMbK6mZQVPxPOiTM2is\nlHgSChWwuEO/HDwuSJVU02VFEyQAsYdly7EBD2ghYprVFvb9qYJnsINwU2LF\nuIDd\r\n=TTH/\r\n-----END PGP SIGNATURE-----\r\n" |
| 257 |
}, |
| 258 |
"maintainers": [ |
| 259 |
{ |
| 260 |
"name": "hichaelmart", |
| 261 |
"email": "[email protected]" |
| 262 |
} |
| 263 |
], |
| 264 |
"directories": {}, |
| 265 |
"_npmOperationalInternal": { |
| 266 |
"host": "s3://npm-registry-packages", |
| 267 |
"tmp": "tmp/stringstream_0.0.6_1526552557136_0.20062352033275022" |
| 268 |
} |
| 269 |
}, |
| 270 |
"1.0.0": { |
| 271 |
"name": "stringstream", |
| 272 |
"version": "1.0.0", |
| 273 |
"description": "Encode and decode streams into string streams", |
| 274 |
"repository": { |
| 275 |
"type": "git", |
| 276 |
"url": "git+https://github.com/mhart/StringStream.git" |
| 277 |
}, |
| 278 |
"author": { |
| 279 |
"name": "Michael Hart", |
| 280 |
"email": "[email protected]" |
| 281 |
}, |
| 282 |
"license": "MIT", |
| 283 |
"main": "stringstream.js", |
| 284 |
"engines": { |
| 285 |
"node": ">=4.0.0" |
| 286 |
}, |
| 287 |
"scripts": { |
| 288 |
"test": "node test.js" |
| 289 |
}, |
| 290 |
"gitHead": "8d330f20101c9fb3a0f979e1cf3993606918d895", |
| 291 |
"bugs": { |
| 292 |
"url": "https://github.com/mhart/StringStream/issues" |
| 293 |
}, |
| 294 |
"homepage": "https://github.com/mhart/StringStream#readme", |
| 295 |
"_id": "[email protected]", |
| 296 |
"_npmVersion": "6.4.0", |
| 297 |
"_nodeVersion": "10.9.0", |
| 298 |
"_npmUser": { |
| 299 |
"name": "hichaelmart", |
| 300 |
"email": "[email protected]" |
| 301 |
}, |
| 302 |
"dist": { |
| 303 |
"integrity": "sha512-qplWI1mgLqGLV2vMTHi6gvfsZxuOSTf5VLfX9k1n3D9vORh3lJnbjD0+cTQqH63Ed1TLcN30zaoMB+g0T7CJZw==", |
| 304 |
"shasum": "2f0b37e8beae208166560e75700a656beb379ab6", |
| 305 |
"tarball": "https://registry.npmjs.org/stringstream/-/stringstream-1.0.0.tgz", |
| 306 |
"fileCount": 7, |
| 307 |
"unpackedSize": 11112, |
| 308 |
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfwv2CRA9TVsSAnZWagAAyHoP/jrx0b9HWxrDzD3gVU2d\njSOKpOPHaZZByf/5RXVtk3vglAqd5DdRNLiZ9n8hZpfYTtadQmqz9NnYDlIg\n6xdBIthEOi2CA1W4B/j6XuxV+bGsOBqoGyA5PMTtCVTHIuTBgZv42Ht37yCO\nVMpc4lNf6bxRNA9zWYAIG5HV7jKqmxms7x0UqSRgNBXGbx/3hAbAO06ZjxuW\nNdkff/HSHIduydsdh+cSlddAAoCgkrZRipKuNTQYJM0kw7s24jFA2KZvn6FK\no51zNzI3zduJo4L6R1+BMBpq/t3mleAG6ZdPVyQUGayFz/NXHQPjrtzthuVn\nmXQWdvk+4ist05MDK+fYNQL+xrsLFFBnWC53F0vzg0EzxGy3ozQTVUdIGR7L\n4E9Hml3ioB5gkikotGTrzAYRRkn2ZrjnMh42x1diqA3pEujPfyv1k1NEJkdE\nl03DEPWgrA+93FmkVGqwCmzRQrh04fmhkGkjkhFsmycbZ3bshzUhiPCBKv4h\ny8HdqIBSMEKzdMCOkmpz6oQxnuH5c0rCPgEZcSPVUpmap+TtpciYNFwFQZQa\n/f6LFmr9/DHvpPkWSUiubd3oWeJuQ/tsHLrGrvIsgcVMcVhc3HCgD9rUZRKm\nS3jhok4QK0NlIlMi3BTJbRWYddwncr95UqxVtsBlJPKdFjUwWKERgE7csnYh\nc91V\r\n=vgMr\r\n-----END PGP SIGNATURE-----\r\n" |
| 309 |
}, |
| 310 |
"maintainers": [ |
| 311 |
{ |
| 312 |
"name": "hichaelmart", |
| 313 |
"email": "[email protected]" |
| 314 |
} |
| 315 |
], |
| 316 |
"directories": {}, |
| 317 |
"_npmOperationalInternal": { |
| 318 |
"host": "s3://npm-registry-packages", |
| 319 |
"tmp": "tmp/stringstream_1.0.0_1535052790288_0.9718936037465251" |
| 320 |
} |
| 321 |
} |
| 322 |
}, |
| 323 |
"readme": "# Decode streams into strings without setEncoding\n\n```js\nconst fs = require('fs')\nconst zlib = require('zlib')\nconst strs = require('stringstream')\n\nconst utf8Stream = fs.createReadStream('massiveLogFile.gz')\n .pipe(zlib.createGunzip())\n .pipe(strs('utf8'))\n\nutf8Stream.on('data', str => console.log(`This will be a string: ${str}`))\n```\n\n## API\n\n - `strs(to, [options])` – creates a transform stream that converts the input into strings in `to` encoding (eg, `utf8`, `hex`, `base64`)\n - `strs(from, to, [options])` – creates a transform stream converts the input from strings in `from` encoding to strings in `to` encoding\n\n`options` can be anything compatible with the standard Node.js [`new stream.Transform([options])` constructor](https://nodejs.org/api/stream.html#stream_new_stream_transform_options)\n\n## NB: This library was originally written before Node.js [correctly encoded base64 strings from streams](https://github.com/nodejs/node/commit/061f2075cf81017cdb40de80533ba18746743c94)\n\nBack in the day, calling `.setEncoding('base64')` on a readable stream didn't\nalign correctly, which was one of the main reasons I wrote this library –\nhowever this hasn't been the case for a long time, so this library is\nnow really only useful in scenarios where you don't want to call\n`.setEncoding()` for whatever reason.\n\nIt also handles input and output text encodings:\n\n```js\n// Stream from utf8 to hex to base64... Why not, ay.\nconst hex64Stream = fs.createReadStream('myFile.txt')\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```js\nconst stream = fs.createReadStream('myFile.jpg').pipe(strs('base64'))\n\nlet base64Str = ''\n\nstream.on('data', data => base64Str += data)\nstream.on('end', () => {\n console.log('My base64 encoded file is: ' + base64Str)\n console.log('Original file is: ' + Buffer.from(base64Str, 'base64'))\n})\n```\n", |
| 324 |
"maintainers": [ |
| 325 |
{ |
| 326 |
"name": "hichaelmart", |
| 327 |
"email": "[email protected]" |
| 328 |
} |
| 329 |
], |
| 330 |
"time": { |
| 331 |
"modified": "2018-08-23T19:33:15.242Z", |
| 332 |
"created": "2012-06-23T01:34:19.097Z", |
| 333 |
"0.0.0": "2012-06-23T01:34:23.318Z", |
| 334 |
"0.0.1": "2012-06-23T03:22:41.897Z", |
| 335 |
"0.0.2": "2012-06-24T12:45:44.493Z", |
| 336 |
"0.0.3": "2012-06-27T05:23:45.522Z", |
| 337 |
"0.0.4": "2013-01-21T06:26:03.334Z", |
| 338 |
"0.0.5": "2015-10-25T23:27:18.102Z", |
| 339 |
"0.0.6": "2018-05-17T10:22:37.212Z", |
| 340 |
"1.0.0": "2018-08-23T19:33:10.411Z" |
| 341 |
}, |
| 342 |
"author": { |
| 343 |
"name": "Michael Hart", |
| 344 |
"email": "[email protected]" |
| 345 |
}, |
| 346 |
"repository": { |
| 347 |
"type": "git", |
| 348 |
"url": "git+https://github.com/mhart/StringStream.git" |
| 349 |
}, |
| 350 |
"users": { |
| 351 |
"jakemiller": true, |
| 352 |
"mojaray2k": true, |
| 353 |
"shanewholloway": true, |
| 354 |
"ganeshkbhat": true |
| 355 |
}, |
| 356 |
"homepage": "https://github.com/mhart/StringStream#readme", |
| 357 |
"bugs": { |
| 358 |
"url": "https://github.com/mhart/StringStream/issues" |
| 359 |
}, |
| 360 |
"license": "MIT", |
| 361 |
"readmeFilename": "README.md", |
| 362 |
"_attachments": {} |
| 363 |
} |