{"name":"bfs-buffer","version":"0.0.1","description":"The Buffer module, used in BrowserFS.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/jvilk/bfs-buffer.git"},"author":{"name":"John Vilk","email":"jvilk@cs.umass.edu"},"license":"MIT","bugs":{"url":"https://github.com/jvilk/bfs-buffer/issues"},"peerDependencies":{"browserfs":"~0.4"},"homepage":"https://github.com/jvilk/bfs-buffer#readme","gitHead":"11b916065946de7dbca03ade78017550b69eb95c","_id":"bfs-buffer@0.0.1","_shasum":"9296ff1b833d64031431d1c619360c0ab44ab2ce","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"jvilk","email":"jvilk@cs.umass.edu"},"dist":{"shasum":"9296ff1b833d64031431d1c619360c0ab44ab2ce","tarball":"http://registry-npm.ywwl.com/bfs-buffer/download/bfs-buffer-0.0.1.tgz","integrity":"sha512-A1tZV9vW6L1XDnWmzyUwxi5TuBSXV1b2Sy/RtEEHPAMBoA4SLNZx+FV19j6u+cSDcAspHJeC9VFXdOGM3u7k2Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpDUhChzeEo+JziWnVWexbWcEiQRd3Y6CHp8S+mryMCwIgA5vV6WCmFM4wC28gh/OAmy3FwW4fK1PvfuX3EzpcJV0="}],"size":1347,"noattachment":false,"key":"/bfs-buffer/-/bfs-buffer-0.0.1.tgz"},"maintainers":[{"name":"jvilk","email":"jvilk@cs.umass.edu"}],"readme":"# BrowserFS Buffer v0.1.7\n> An emulation of NodeJS's Buffer module. Used in [BrowserFS](https://github.com/jvilk/BrowserFS).\n\n## Features\n\n* Space-efficient binary representation across browsers.\n  * `ArrayBuffer` in modern browsers\n  * `CanvasPixelArray` in older browsers that do not support typed arrays, but support the canvas.\n  * `Array` of 32-bit ints in older browsers without the above.\n* Supports the entirety of the NodeJS `Buffer` API! (including string encoding)\n  * ...with a few exceptions, due to browser limitations (see below).\n* Well-tested! Passes all of Node's `Buffer` tests.\n  * The unit tests are located in the [BrowserFS](https://github.com/jvilk/BrowserFS) repository.\n\n## Use with Browserify\n\nThis module can be used with Browserify in place of its default `Buffer` module!\n\nHere's the relevant configuration:\n\n```{js}\n{\n    builtins:\n    {\n        \"buffer\": require.resolve('bfs-buffer')\n    },\n    insertGlobalVars: {\n        \"Buffer\": function() { return \"require('bfs-buffer').Buffer\" }\n    }\n}\n```\n\n## Limitations\n\n* **Does not support array indexing.** e.g. you cannot do `buff[0] = 3`.\n  * Browsers do not let you implement custom arrays, and merely setting the prototype of `Buffer` to `Uint8Array`, as in the official Node implementation of `Buffer`, is not portable across browsers.\n","publish_time":1434933958470,"_cnpm_publish_time":1434933958470,"dist-tags":{"latest":"0.1.7"}}