{"name":"bfs-buffer","version":"0.1.6","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":{"typescript":"^1.8.0"},"gitHead":"0a71c10d204d27a19476e78cdccff42c30708478","_id":"bfs-buffer@0.1.6","_shasum":"313f82f3e2810896c855340205c4c12926ed929b","_from":".","_npmVersion":"3.5.3","_nodeVersion":"4.2.1","_npmUser":{"name":"jvilk","email":"jvilk@cs.umass.edu"},"dist":{"shasum":"313f82f3e2810896c855340205c4c12926ed929b","tarball":"http://registry-npm.ywwl.com/bfs-buffer/download/bfs-buffer-0.1.6.tgz","integrity":"sha512-t1lbT+uu1EURmQluHUheh+D6DeWm3TNYANJPGDSjymmCMWA6mgnDbzRyM5LkMPeCqSG5NC0L62kZf40J/Cc3yA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICh0/aCfJNXXjoXha9HnduBpWKoZPLPU1lWs+L44lLjDAiAKFSPzx8zZGH76mnJ1KUtvILN0w7uO67v+kDf1S9GBxA=="}],"size":96912,"noattachment":false,"key":"/bfs-buffer/-/bfs-buffer-0.1.6.tgz"},"maintainers":[{"name":"jvilk","email":"jvilk@cs.umass.edu"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/bfs-buffer-0.1.6.tgz_1456799652118_0.41854485077783465"},"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":1456799655951,"_cnpm_publish_time":1456799655951,"dist-tags":{"latest":"0.1.7"}}