{"name":"bfs-buffer","version":"0.1.4","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":"d356846505f5e74ceec19abcfafd74220e89a18f","_id":"bfs-buffer@0.1.4","_shasum":"d39340494284c1bb81e583cf085d96b1a359a774","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"jvilk","email":"jvilk@cs.umass.edu"},"dist":{"shasum":"d39340494284c1bb81e583cf085d96b1a359a774","tarball":"http://registry-npm.ywwl.com/bfs-buffer/download/bfs-buffer-0.1.4.tgz","integrity":"sha512-AIcu8tsSXVH4hSMtMvdBjHBJG8JVncPJm3eNjpPQ4H2Y8JWVB8/jSmWh42QEPjgxcNzkSLluuuYdQFBTdXv6vQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICVaGqv5FC+q6r4pfzXlDDfQKNjaxt7b1S3iQntqdBooAiEA4GDtfeEfC/NKshKWfKSZyTWQ7yXhuygAMo09Ti84pfQ="}],"size":100201,"noattachment":false,"key":"/bfs-buffer/-/bfs-buffer-0.1.4.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":1450036132692,"_cnpm_publish_time":1450036132692,"dist-tags":{"latest":"0.1.7"}}