{"name":"bfs-buffer","version":"0.1.2","description":"The Buffer module, used in BrowserFS.","main":"js/buffer.js","typings":"js/buffer","scripts":{"prepublish":"node prepublish"},"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"},"homepage":"https://github.com/jvilk/bfs-buffer#readme","devDependencies":{"tsd":"^0.6.5","typescript":"^1.6.2"},"gitHead":"1a5fa75955eb48f7ffd3e0ac365577c28ba355be","_id":"bfs-buffer@0.1.2","_shasum":"bf7a6892f7ec6cbdccf107de0bdf4df6ed941a52","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"jvilk","email":"jvilk@cs.umass.edu"},"dist":{"shasum":"bf7a6892f7ec6cbdccf107de0bdf4df6ed941a52","tarball":"http://registry-npm.ywwl.com/bfs-buffer/download/bfs-buffer-0.1.2.tgz","integrity":"sha512-6S1D5Bjpd0E2iww54d6IGRGmht3A32RmXtDkDXaReNdsuYMNCEeEqZxIn2grGNlKF6vIFya+tyepifzjVLh+0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID8CdaXoKzb0IKJP5D7fLQo6YcyvLhQrQXFdQqbwbPG0AiEA3atx5pfRdNeZRkPuBBcfYIzmpX6mKzuYi3uFnt+eXUA="}],"size":99092,"noattachment":false,"key":"/bfs-buffer/-/bfs-buffer-0.1.2.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":1447174161499,"_cnpm_publish_time":1447174161499,"dist-tags":{"latest":"0.1.7"}}