{
  "name": "typedarray-to-buffer",
  "description": "Convert a typed array to a Buffer without a copy",
  "version": "1.0.2",
  "author": {
    "name": "Feross Aboukhadijeh",
    "email": "feross@feross.org",
    "url": "http://feross.org/"
  },
  "bugs": {
    "url": "https://github.com/feross/typedarray-to-buffer/issues"
  },
  "dependencies": {},
  "devDependencies": {
    "tape": "2.x"
  },
  "homepage": "http://feross.org",
  "keywords": [
    "buffer",
    "typed array",
    "convert",
    "no copy",
    "uint8array",
    "uint16array",
    "uint32array",
    "int16array",
    "int32array",
    "float32array",
    "float64array",
    "browser",
    "arraybuffer",
    "dataview"
  ],
  "license": "MIT",
  "main": "index.js",
  "repository": {
    "type": "git",
    "url": "git://github.com/feross/typedarray-to-buffer.git"
  },
  "scripts": {
    "test": "tape test/*.js"
  },
  "testling": {
    "files": "test/*.js",
    "browsers": [
      "ie/6..latest",
      "chrome/4..latest",
      "firefox/3..latest",
      "safari/5.1..latest",
      "opera/11.0..latest",
      "iphone/6",
      "ipad/6"
    ]
  },
  "readme": "# typedarray-to-buffer [![travis](https://img.shields.io/travis/feross/typedarray-to-buffer.svg)](https://travis-ci.org/feross/typedarray-to-buffer) [![npm](https://img.shields.io/npm/v/typedarray-to-buffer.svg)](https://npmjs.org/package/typedarray-to-buffer) [![gittip](https://img.shields.io/gittip/feross.svg)](https://www.gittip.com/feross/)\n\n#### Convert a typed array to a [Buffer](https://github.com/feross/buffer) without a copy.\n\n[![testling badge](https://ci.testling.com/feross/typedarray-to-buffer.png)](https://ci.testling.com/feross/typedarray-to-buffer)\n\nSay you're using the ['buffer'](https://github.com/feross/buffer) module on npm, or\n[browserify](http://browserify.org/) and you're working with lots of binary data.\n\nUnfortunately, sometimes the browser or someone else's API gives you an `ArrayBuffer`\nor typed array (`Uint8Array`, etc.) to work with and you need to convert it to a\n`Buffer`. What do you do?\n\nOf course: `new Buffer(uint8array)`\n\nBut, alas, every time you do `new Buffer(uint8array)`, the entire array gets **copied into\na new typed array**. This is expensive. The `Buffer` constructor does a copy; this is\ndefined by the [node docs](http://nodejs.org/api/buffer.html), so it can't be easily\nchanged and the 'buffer' module matches the node API exactly.\n\nSo, what can you do if you're\n[writing a performance critical application](https://github.com/feross/buffer/issues/22)\nand can't afford extra copies for no good reason?\n\n***Use this module, of course!***\n\n## install\n\n```bash\nnpm install typedarray-to-buffer\n```\n\n## usage\n\nTo convert a typed array to a `Buffer` **without a copy**, do this:\n\n```js\nvar toBuffer = require('typedarray-to-buffer')\n\nvar arr = new Uint8Array([1, 2, 3])\narr = toBuffer(arr)\n\n// arr is a buffer now!\n\narr.toString()  // '\\u0001\\u0002\\u0003'\narr.readUInt16BE(0)  // 258\n```\n\n## some advanced details\n\nIn the case that the browser actually supports typed arrays, you don't even need to use\nthe return value of `toBuffer` since **the original Uint8Array has been augmented**\nwith all the methods from `Buffer`. See\n[how does Buffer work?](https://github.com/feross/buffer#how-does-it-work) for why we do\nthis.\n\nIf the browser doesn't support typed arrays then the only way we can give a buffer is to\nreturn it you. So, just always use the return value if you want to support all browsers!\n\n## license\n\nMIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org).\n",
  "readmeFilename": "README.md",
  "_id": "typedarray-to-buffer@1.0.2",
  "_shasum": "9043c2293c03ff7a2299f89690fe1d9edc718e8e",
  "_from": "typedarray-to-buffer@^1.0.2",
  "_resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-1.0.2.tgz"
}
