ares-ide
Version:
A browser-based code editor and UI designer for Enyo 2 projects
48 lines (47 loc) • 2.68 kB
JSON
{
"name": "base64-stream",
"description": "Contains new Node.js v0.10 style stream classes for encoding / decoding Base64 data",
"keywords": [
"Base64",
"stream",
"streaming",
"piping",
"node",
"node.js",
"encode",
"decode"
],
"author": {
"name": "Ross Johnson",
"email": "ross@mazira.com"
},
"version": "0.1.2",
"repository": {
"type": "git",
"url": "http://github.com/mazira/base64-stream"
},
"scripts": {
"test": "mocha --reporter spec"
},
"dependencies": {
"readable-stream": "1.0.2"
},
"devDependencies": {
"mocha": "*",
"should": "*"
},
"license": "MIT",
"engine": "node >= 0.8.0",
"readme": "# Introduction\n\nWhile Node.js has built-in support for Base64 data, it does not come with the ability to encode / decode data in a stream.\n\nThis library contains a streaming Base64 encoder and a streaming Base64 decoder for use with Node.js. These classes are written using the new Node.js v0.10 [stream interfaces](http://nodejs.org/api/stream.html) and are well covered with unit tests.\n\n# Usage\n\n## Installation\n\nTo install base64-stream\n\n npm install base64-stream\n \n## Examples\nThis example encodes an image and pipes it to stdout.\n\n```javascript\nvar http = require('http');\nvar base64 = require('base64-stream');\n\nvar img = 'http://farm3.staticflickr.com/2433/3973241798_86ddfa642b_o.jpg';\nhttp.get(img, function(res) {\n if (res.statusCode === 200)\n res.pipe(base64.encode()).pipe(process.stdout);\n});\n```\n\nThis example takes in Base64 encoded data on stdin, decodes it, an pipes it to stdout.\n```javascript\nvar base64 = require('base64-stream');\nprocess.stdin.pipe(base64.decode()).pipe(process.stdout);\n```\n\nYou may also treat `encode` / `decode` as classes, so the following is also valid:\n```javascript\nvar Base64Decode = require('base64-stream').decode;\nvar stream = new Base64Decode();\n...\n```\n\n# Requirements\n\nThis module currently requires Node v0.8 or higher. Support for versions prior to v0.10 is made possible by using the [readable-stream](https://github.com/isaacs/readable-stream) module.\n\n# Testing\n\nTo run the unit tests\n\n npm test\n\n# License\nMIT\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/mazira/base64-stream/issues"
},
"homepage": "https://github.com/mazira/base64-stream",
"_id": "base64-stream@0.1.2",
"dist": {
"shasum": "aad746573218cc642303d3370a43711acbc67b92"
},
"_from": "https://registry.npmjs.org/base64-stream/-/base64-stream-0.1.2.tgz",
"_resolved": "https://registry.npmjs.org/base64-stream/-/base64-stream-0.1.2.tgz"
}