{"name":"bops","version":"1.0.1","description":"buffer operations","main":"index.js","scripts":{"test":"node test/index.js"},"browser":{"./copy.js":"./typedarray/copy.js","./create.js":"./typedarray/create.js","./from.js":"./typedarray/from.js","./join.js":"./typedarray/join.js","./mapped.js":"./typedarray/mapped.js","./read.js":"./typedarray/read.js","./subarray.js":"./typedarray/subarray.js","./to.js":"./typedarray/to.js","./is.js":"./typedarray/is.js","./write.js":"./typedarray/write.js"},"repository":{"type":"git","url":"git://github.com/chrisdickinson/bops.git"},"keywords":["buffer","operations","binary"],"author":{"name":"Chris Dickinson","email":"chris@neversaw.us"},"license":"MIT","gitHead":"11f41e69b1ab4507027ac162981913b268445b4a","devDependencies":{"tape":"~2.0.0"},"dependencies":{"base64-js":"1.0.2","to-utf8":"0.0.1"},"testling":{"files":"test/index.js","browsers":["firefox/15..nightly","chrome/20..canary","opera/11.6..latest","safari/4..latest","iphone/6","ipad/6"]},"bugs":{"url":"https://github.com/chrisdickinson/bops/issues"},"homepage":"https://github.com/chrisdickinson/bops#readme","_id":"bops@1.0.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.2","_npmUser":{"name":"chrisdickinson","email":"chris@neversaw.us"},"dist":{"integrity":"sha512-qCMBuZKP36tELrrgXpAfM+gHzqa0nLsWZ+L37ncsb8txYlnAoxOPpVp+g7fK0sGkMXfA0wl8uQkESqw3v4HNag==","shasum":"502aaf00ee119db1dbae088e3df4bea2e241dbcc","tarball":"http://registry-npm.ywwl.com/bops/download/bops-1.0.1.tgz","fileCount":34,"unpackedSize":40127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeat/CRA9TVsSAnZWagAA8wMP/jl6gGQqkaDkGU5dErjf\nCa8ipg9sJthoGM3+Q5zKWNQmx9w3gEJTKHabN8MwcmXd7PXrU4snzjqSllLR\nNSpk9xGa74xiLIAHxxgXV8USmi0vv/u3qUoEemlvtF4POmY/w74jAjl3lHJ2\nd103wFYjkZbz9BVzmka0ALHmpYV8Z1rAGQRmD6Iu7Pxj93PqVoxoDKw6tcYx\nO/aK7c7YEpZP/kdl2P3aUB8Ufh09kmkhuL8dzvCxbd+JD/8K4cUHdjmHALls\nLmf9iBhw9t0cugPsdid2uV8OmSt2jqZGRAJf5euzceR8ea8jmwjrGHvVfWwM\nJBoS0t6y0CT+HEbb5EVZONr+fHY0NKTCtrjBBZF4FcicMDLzl3H1xAdZhlV7\ndONebkOxDjVtGgw1W6xcdeugYO2Si/koSONLp6mp0DMXZJaL2KpHybtwGMMF\nIXFclEPZNxD4HxPsuHxUHsewGqDkPIu8I1jq8zMIEJ6goame3jFEf8okk079\nzd/c+tcz7r8Mbii8MYArZ2QrN0Xh+S0W282/Q3p25t7PmCerJ2ZhZi1pCwUc\np+GhKDku09eHB6ygqloZfiu0O41oFwlEhcWnhd/V7wopF1BZz/PwUU7Z0Lyf\nMsIH5qWj1U52XhMI5jd/bJHj21LG+KVvP8DQLUf/bAajQ0yRJebobhejh3KT\ns/yq\r\n=gYGN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjKwvCMPtLN5KyxwGN65fOJR/IQTbLTQcu2nhHbSoB0wIhAJK53bor/TOljN+Yn73vuwPXPkbjmHknNZEYKZ70535L"}],"size":9813,"noattachment":false,"key":"/bops/-/bops-1.0.1.tgz"},"maintainers":[{"name":"chrisdickinson","email":"chris@neversaw.us"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bops_1.0.1_1585032062991_0.5854014509930043"},"_hasShrinkwrap":false,"readme":"# bops\n\n[![Build Status](https://travis-ci.org/chrisdickinson/tar-parse.png)](https://travis-ci.org/chrisdickinson/tar-parse)\n[![TESTLING](https://ci.testling.com/chrisdickinson/bops.png)](https://ci.testling.com/chrisdickinson/bops)\n[![NPM](https://nodei.co/npm/bops.png?downloads=true&stars=true)](https://nodei.co/npm/bops/)\n\nbuffer/typed array agnostic buffer operations.\n\n`bops` presents a JavaScript API for working with binary data that will work exactly the same in supported browsers and in node. due to the way that `Buffer` is implemented in node it is impossible to take code written against the `Buffer` API and make it work on top of binary data structures (Array Buffers and Typed Arrays) in the browser.\n\ninstead you have to fake the API on top of `Object`, but `Object` isn't designed for holding raw binary data and will be really slow/memory inefficient for many common binary use cases (parsing files, writing files, etc).\n\nuse `bops` in place of `Buffer` or `Uint8Array` to make your binary JS code fast + portable.\n\n```javascript\nvar binary = require('bops')\n\nbinary.readUInt8(new Buffer(10), 0) // === 10\n\n```\n\nin browser, will default to using `Uint8Array` instances.\nin node, will default to using `Buffer` instances.\n\n## API\n\n> ## supported encodings\n> * utf8\n> * hex\n> * base64\n\n#### bops.from(str, encoding=\"utf8\") -> buf\n\ngiven a string (and optional encoding) return a native buffer instance.\nalso accepts arrays.\n\n#### bops.to(buf, encoding=\"utf8\") -> str\n\ngiven a native buffer (and optional encoding) return a string.\n\n#### bops.is(buf) -> bool\n\ngiven a native buffer returns true.  Returns false for other values.\n\n#### bops.subarray(buf, start[, end]) -> buf\n\nreturn a view onto the original buffer.\n\n#### bops.join([buf, buf, buf]) -> buf\n\ncompile several buffers into a single buffer.\n\n#### bops.create(size) -> buf\n\ncreate a native buffer instance of `size`.\n\n#### bops.copy(source, target, target_start, source_start, source_end)\n\nperform a fast copy from one native buffer to another.\n\n#### readUInt8(buf, at)\n#### readInt8(buf, at)\n#### readUInt16LE(buf, at)\n#### readUInt32LE(buf, at)\n#### readInt8(buf, at)\n#### readInt16LE(buf, at)\n#### readInt32LE(buf, at)\n#### readFloatLE(buf, at)\n#### readDoubleLE(buf, at)\n#### readUInt16BE(buf, at)\n#### readUInt32BE(buf, at)\n#### readInt16BE(buf, at)\n#### readInt32BE(buf, at)\n#### readFloatBE(buf, at)\n#### readDoubleBE(buf, at)\n\nread a value from a buffer at a given byte offset.\n\n#### writeUInt8(buf, value, at)\n#### writeInt8(buf, value, at)\n#### writeUInt16LE(buf, value, at)\n#### writeUInt32LE(buf, value, at)\n#### writeInt8(buf, value, at)\n#### writeInt16LE(buf, value, at)\n#### writeInt32LE(buf, value, at)\n#### writeFloatLE(buf, value, at)\n#### writeDoubleLE(buf, value, at)\n#### writeUInt16BE(buf, value, at)\n#### writeUInt32BE(buf, value, at)\n#### writeInt16BE(buf, value, at)\n#### writeInt32BE(buf, value, at)\n#### writeFloatBE(buf, value, at)\n#### writeDoubleBE(buf, value, at)\n\nwrite a value to a buffer at a given byte offset.\n\n# License\n\nMIT\n","publish_time":1585032063157,"_cnpm_publish_time":1585032063157,"dist-tags":{"latest":"1.0.1"}}