{"_id":"str2buf","_rev":"8-21428562ae38c18c21d65b39ce48d305","name":"str2buf","description":"isomorphic string <=> buffer in 198 bytes","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"str2buf","version":"1.0.0","description":"isomorphic string <=> buffer in 215 bytes","main":"node/str2buf.js","browser":"dist/str2buf.js","module":"node/str2buf.mjs","scripts":{"build":"microbundle --entry browser.mjs --output dist && microbundle --entry node.mjs --output node && microbundle --entry browser-fast.mjs --output fast","prepublish":"npm run build","pretest":"npm run build","test":"node test","release":"npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/kevlened/str2buf.git"},"keywords":["string","buffer"],"license":"MIT","bugs":{"url":"https://github.com/kevlened/str2buf/issues"},"files":["dist","fast","node"],"homepage":"https://github.com/kevlened/str2buf#readme","devDependencies":{"microbundle":"^0.2.4"},"gitHead":"972393c859f41db13230b04c6199b7e0777cd039","_id":"str2buf@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"kevlened","email":"boyettel@gmail.com"},"dist":{"integrity":"sha512-GEWJjnRMg4GJw0LuCuYeyQhC2RsGornij68EbJjTNCaDlG06NpoKKizbGV/cXMX3r3my1NnqUcHsM7x5Mv3q8A==","shasum":"5056bcf0d8befa5b4cdd8f8c7087b3c3dc1abdd9","tarball":"https://registry.npmjs.org/str2buf/-/str2buf-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDqIVIdMI1v+i/jjvBlHqjZvf8lfrzV8IPKHmYhWV2KuAiAS1BI0rGIHajV3+IvK3zlfBKvODLA1NCJve+invdTU6w=="}]},"maintainers":[{"name":"kevlened","email":"boyettel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/str2buf-1.0.0.tgz_1515267309852_0.1610609833151102"},"directories":{}},"1.1.0":{"name":"str2buf","version":"1.1.0","description":"isomorphic string <=> buffer in 215 bytes","main":"node/str2buf.js","module":"node/str2buf.mjs","browser":{"./node/str2buf.js":"./dist/str2buf.js","./node/str2buf.mjs":"./dist/str2buf.mjs"},"scripts":{"build":"microbundle --entry browser.mjs --output dist && microbundle --entry node.mjs --output node && microbundle --entry browser-fast.mjs --output fast","prepublish":"npm run build","pretest":"npm run build","test":"node test","release":"npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/kevlened/str2buf.git"},"keywords":["string","buffer"],"license":"MIT","bugs":{"url":"https://github.com/kevlened/str2buf/issues"},"files":["dist","fast","node"],"homepage":"https://github.com/kevlened/str2buf#readme","devDependencies":{"microbundle":"^0.2.4"},"gitHead":"9fe1d629b0b291b54f11e7b3d37bdffb6045bcc2","_id":"str2buf@1.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"kevlened","email":"boyettel@gmail.com"},"dist":{"integrity":"sha512-SQnVO7LFwtXUOz8VrTsMPWonPdniPP2Er5ZHmruKvp5/GXPCIfs2fz7Nw49aNtGjWZHTNBRpF6NdIAz5Nx3CDw==","shasum":"d13a1200d28a52e70096ffbfa86e7246fbdb9b59","tarball":"https://registry.npmjs.org/str2buf/-/str2buf-1.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGSrpay8i9lPEeQBsBa6jLMrC/uXnc+bJ+mVFehNqfdcAiAk4KGeD/tB6ZfeULctZvjHT01R25QAloY4fskg39rfcA=="}]},"maintainers":[{"name":"kevlened","email":"boyettel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/str2buf-1.1.0.tgz_1515307386633_0.2511145614553243"},"directories":{}},"1.1.1":{"name":"str2buf","version":"1.1.1","description":"isomorphic string <=> buffer in 215 bytes","main":"node/str2buf.js","module":"node/str2buf.mjs","browser":{"./node/str2buf.js":"./dist/str2buf.js","./node/str2buf.mjs":"./dist/str2buf.mjs"},"scripts":{"build":"microbundle --entry browser.mjs --output dist && microbundle --entry node.mjs --output node && microbundle --entry browser-fast.mjs --output fast","prepublish":"npm run build","pretest":"npm run build","test":"node test","release":"npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/kevlened/str2buf.git"},"keywords":["string","buffer"],"license":"MIT","bugs":{"url":"https://github.com/kevlened/str2buf/issues"},"files":["dist","fast","node"],"homepage":"https://github.com/kevlened/str2buf#readme","devDependencies":{"microbundle":"^0.2.4"},"gitHead":"be9c2fb867b7f9059e6d25df6d271b09f84e5376","_id":"str2buf@1.1.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"kevlened","email":"boyettel@gmail.com"},"dist":{"integrity":"sha512-xMNmcNIX3VlkG8dJhwJQYVp+23UGVlqZ/gKQdy+VS287q2quj9v5ejYsn/bbeqApoFGxvBQ4VulPfWTd/bSd4Q==","shasum":"45c634f1f528a2e91b7cfe6e5ce5a67c08140980","tarball":"https://registry.npmjs.org/str2buf/-/str2buf-1.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFnPnaaXCfuMH/phRfX06sVmMWwKMOtD1hjSrZO+SBhMAiEAuQvf830H08x5M2m2dPumAentXU883wr7CgM8xeqrDMg="}]},"maintainers":[{"name":"kevlened","email":"boyettel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/str2buf-1.1.1.tgz_1515308380799_0.08217908628284931"},"directories":{}},"1.2.0":{"name":"str2buf","version":"1.2.0","description":"isomorphic string <=> buffer in 183 bytes","main":"node/str2buf.js","module":"node/str2buf.mjs","browser":{"./node/str2buf.js":"./dist/str2buf.js","./node/str2buf.mjs":"./dist/str2buf.mjs"},"scripts":{"build":"microbundle --entry browser.mjs --output dist && microbundle --entry node.mjs --output node && microbundle --entry browser-fast.mjs --output fast","prepublish":"npm run build","pretest":"npm run build","test":"node test","release":"npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/kevlened/str2buf.git"},"keywords":["string","buffer"],"license":"MIT","bugs":{"url":"https://github.com/kevlened/str2buf/issues"},"files":["dist","fast","node"],"homepage":"https://github.com/kevlened/str2buf#readme","devDependencies":{"microbundle":"^0.2.4"},"gitHead":"71d067093a9a9f0c73ac6087ca6db5a7d5dd3ac4","_id":"str2buf@1.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"kevlened","email":"boyettel@gmail.com"},"dist":{"integrity":"sha512-CLxbnsmbiEPpVe4NkK6wKuB8AgSuUXMSpeN225towwOzt6+V/fLqbFcWcZb7lTp6xEpL8X49jwZ4JgKgnqMcJQ==","shasum":"e9486bfcc34eba679f8b3ea07189dbcf4781a29b","tarball":"https://registry.npmjs.org/str2buf/-/str2buf-1.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHnTK6Yqgpg5OOsjxCV2fdfzbsHWhkJboB+KN5XbHfmDAiEA3xxq0qWwTEP0fPTjKgKXnwhKGHlVGeaIhvIKNXDTSHc="}]},"maintainers":[{"name":"kevlened","email":"boyettel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/str2buf-1.2.0.tgz_1515379728503_0.440736289601773"},"directories":{}},"1.2.1":{"name":"str2buf","version":"1.2.1","description":"isomorphic string <=> buffer in 183 bytes","main":"node/str2buf.js","module":"node/str2buf.mjs","browser":{"./node/str2buf.js":"./dist/str2buf.js","./node/str2buf.mjs":"./dist/str2buf.mjs"},"scripts":{"build":"microbundle --entry browser.mjs --output dist && microbundle --entry node.mjs --output node && microbundle --entry browser-fast.mjs --output fast","prepublish":"npm run build","pretest":"npm run build","test":"node test","release":"npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/kevlened/str2buf.git"},"keywords":["string","buffer"],"license":"MIT","bugs":{"url":"https://github.com/kevlened/str2buf/issues"},"files":["dist","fast","node"],"homepage":"https://github.com/kevlened/str2buf#readme","devDependencies":{"microbundle":"^0.2.4"},"gitHead":"e2b8740a13d6fd2727f9c93c9cdc65886d079472","_id":"str2buf@1.2.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"kevlened","email":"boyettel@gmail.com"},"dist":{"integrity":"sha512-LVtQI19oIaUcEWTkwldBYYpit1nzt7xsrxmuXlu0Fv8oY4YBYAPUJAB+9/4OHQzIxe9VaS/wbVlQktaufwPAaw==","shasum":"4600e81c69171ac6f25f3eae7705f759ce8e442b","tarball":"https://registry.npmjs.org/str2buf/-/str2buf-1.2.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDndMYd/rwTZYySFB+WD7PzzUUNKUuAi5T94g9CjFfdcgIgLJ1i2uMYvVY2qHTiZVwFOFHBxpW9/Ve+6LkhkcCDZNo="}]},"maintainers":[{"name":"kevlened","email":"boyettel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/str2buf-1.2.1.tgz_1516763862335_0.1657272365409881"},"directories":{}},"1.2.2":{"name":"str2buf","version":"1.2.2","description":"isomorphic string <=> buffer in 183 bytes","main":"node/str2buf.js","module":"node/str2buf.mjs","browser":{"./node/str2buf.js":"./dist/str2buf.js","./node/str2buf.mjs":"./dist/str2buf.mjs"},"scripts":{"build":"microbundle --entry browser.mjs --output dist && microbundle --entry node.mjs --output node && microbundle --entry browser-fast.mjs --output fast","prepublish":"npm run build","pretest":"npm run build","test":"node test","release":"npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/kevlened/str2buf.git"},"keywords":["string","buffer"],"license":"MIT","bugs":{"url":"https://github.com/kevlened/str2buf/issues"},"files":["dist","fast","node"],"homepage":"https://github.com/kevlened/str2buf#readme","devDependencies":{"microbundle":"^0.2.4"},"gitHead":"08c003563691fb9496b5f00547126d0ea209988f","_id":"str2buf@1.2.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"kevlened","email":"boyettel@gmail.com"},"dist":{"integrity":"sha512-uSHgxRNfEYWWM6dQzbRwM8T9Zdgxy7erA7k4Hf0MM7ezi5/ZhVfUFkCa4mpSI4KteH7iQL+v1stwWEYwkPr1cw==","shasum":"df88601148bf554a1f6cc8741ec4f9142f504aa3","tarball":"https://registry.npmjs.org/str2buf/-/str2buf-1.2.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDJf93JuSoebVrVVfZF1VbCSm6dEB9UuCIDLoTj+9ziaAiBmUgtCjHaQUn0GR4sTnI5WO+GpKLxBYHaf6QwtYVFeTw=="}]},"maintainers":[{"name":"kevlened","email":"boyettel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/str2buf-1.2.2.tgz_1516764177366_0.7125165681354702"},"directories":{}},"1.3.0":{"name":"str2buf","version":"1.3.0","description":"isomorphic string <=> buffer in 198 bytes","main":"node/str2buf.js","module":"node/str2buf.mjs","browser":{"./node/str2buf.js":"./dist/str2buf.js","./node/str2buf.mjs":"./dist/str2buf.mjs"},"scripts":{"build":"microbundle --entry browser.mjs --output dist && microbundle --entry node.mjs --output node","prepublish":"npm run build","pretest":"npm run build","test":"node test","release":"npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/kevlened/str2buf.git"},"keywords":["string","buffer"],"license":"MIT","bugs":{"url":"https://github.com/kevlened/str2buf/issues"},"files":["dist","fast","node"],"homepage":"https://github.com/kevlened/str2buf#readme","devDependencies":{"microbundle":"^0.2.4"},"gitHead":"362dac0c9ce431aba41de8f229881190fb40aea6","_id":"str2buf@1.3.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"kevlened","email":"boyettel@gmail.com"},"dist":{"integrity":"sha512-xIBmHIUHYZDP4HyoXGHYNVmxlXLXDrtFHYT0eV6IOdEj3VO9ccaF1Ejl9Oq8iFjITllpT8FhaXb4KsNmw+3EuA==","shasum":"a4172afff4310e67235178e738a2dbb573abead0","tarball":"https://registry.npmjs.org/str2buf/-/str2buf-1.3.0.tgz","fileCount":15,"unpackedSize":6956,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGr2WVIPyimqtOsuFJwXaIKZGbNv7v4uKiGpjILdUZomAiBvHanj6PcuBcN1xK+lUPgswqPMh9JaSlggs/zuKGHnVg=="}]},"maintainers":[{"name":"kevlened","email":"boyettel@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/str2buf_1.3.0_1518058366639_0.47515411820666853"},"_hasShrinkwrap":false}},"readme":"# str2buf [![NPM](https://img.shields.io/npm/v/str2buf.svg)](https://npmjs.com/package/str2buf) [![Build](https://travis-ci.org/kevlened/str2buf.svg?branch=master)](https://travis-ci.org/kevlened/str2buf)\nisomorphic string <=> buffer in 198 bytes\n\n## Install\n\n`npm install str2buf`\n\n## Usage\n\nYou must provide strings where each character is represented by a single byte (also known as the binary string format). For example, the output of a `atob` operation or any ASCII string would be allowed.\n\n```javascript\nconst str2buf = require('str2buf')\n\nstr2buf.toUint8Array('hello')\n// new Uint8Array([104,101,108,108,111])\n\nstr2buf.fromUint8Array(new Uint8Array([104,101,108,108,111]))\n// 'hello'\n\nstr2buf.toBuffer('hello')\n// ArrayBuffer\n\nstr2buf.fromBuffer(new Uint8Array([104,101,108,108,111]).buffer)\n// 'hello'\n```\n\n## Can it be smaller?\n\nIf you use ES6 imports with a bundler that supports tree-shaking, yes!\n\n```javascript\nimport { fromUint8Array } from 'str2buf'\n```\n\n#### Perf profile\n\n```\n⏱ browser performance on 1000 arrays or strings of size 25003:\nstr2buf.fromUint8Array: 245.842ms\nstr2buf.toUint8Array: 165.240ms\nstr2buf.fromBuffer: 234.920ms\nstr2buf.toBuffer: 160.021ms\n\n⏱ node performance on 1000 arrays or strings of size 25003:\nstr2buf.fromUint8Array: 20.213ms\nstr2buf.toUint8Array: 15.655ms\nstr2buf.fromBuffer: 32.880ms\nstr2buf.toBuffer: 21.514ms\n```\n\n## License\n\nMIT","maintainers":[{"name":"kevlened","email":"boyettel@gmail.com"}],"time":{"modified":"2022-05-18T19:24:11.420Z","created":"2018-01-06T19:35:09.982Z","1.0.0":"2018-01-06T19:35:09.982Z","1.1.0":"2018-01-07T06:43:06.756Z","1.1.1":"2018-01-07T06:59:40.885Z","1.2.0":"2018-01-08T02:48:48.576Z","1.2.1":"2018-01-24T03:17:42.419Z","1.2.2":"2018-01-24T03:22:57.442Z","1.3.0":"2018-02-08T02:52:46.720Z"},"homepage":"https://github.com/kevlened/str2buf#readme","keywords":["string","buffer"],"repository":{"type":"git","url":"git+https://github.com/kevlened/str2buf.git"},"bugs":{"url":"https://github.com/kevlened/str2buf/issues"},"license":"MIT","readmeFilename":"README.md"}