{"name":"index-encoder","version":"3.3.1","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"Apache-2.0","_id":"index-encoder@3.3.1","homepage":"https://github.com/holepunchto/index-encoder","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"dist":{"shasum":"305ad280dd4c747c43df7bbbb25de2cea0d74d21","tarball":"http://registry-npm.ywwl.com/index-encoder/download/index-encoder-3.3.1.tgz","fileCount":7,"integrity":"sha512-0G4EcETTa9cc3YcPiZPFJJhf1RhAYsZ82vQardLTmCQp7LS1FfE/L4Pf50315G/0fh2GZ9GwZeq0oRf3qkfm9w==","signatures":[{"sig":"MEYCIQCuJX3GpH6/bpQkT1dR/9TdaumStiGIz7g+gbCHigpySgIhAJy7L0njWmpSgIIxIEXwdlGK7Dx6zY7LRsTQeSFANhjX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24373,"size":7454,"noattachment":false,"key":"/index-encoder/-/index-encoder-3.3.1.tgz"},"main":"index.js","gitHead":"8f1151a33ad492537addcb59c91d3c32d52c2a43","scripts":{"test":"standard && brittle test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/holepunchto/index-encoder.git","type":"git"},"_npmVersion":"10.7.0","description":"Encode multiple values into sorted keys","directories":{},"_nodeVersion":"20.11.1","dependencies":{"b4a":"^1.6.4"},"_hasShrinkwrap":false,"devDependencies":{"brittle":"^3.2.1","hyperbee":"^2.10.5","standard":"^17.0.0","hypercore":"^10.9.2","random-access-memory":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/index-encoder_3.3.1_1729239713564_0.1439179055145572","host":"s3://npm-registry-packages"},"readme":"# index-encoder\n\nEncode multiple values into sorted keys\n\n```\nnpm install index-encoder\n```\n\n## Usage\n\n``` js\nconst IndexEncoder = require('index-encoder')\n\nconst idx = new IndexEncoder([\n  IndexEncoder.STRING,\n  IndexEncoder.UINT\n])\n\nconst buf = idx.encode(['foo', 42])\nconsole.log(idx.decode(buf)) // ['foo', 42]\n\n// pass any compact encoding name to map it to the relevant encoding\nconst uintType = IndexEncoder.lookup('uint')\nconst bufferType = IndexEncoder.lookup('buffer')\nconst alsoBufferType = IndexEncoder.lookup('fixed32')\n```\n\n## License\n\nApache 2.0\n","publish_time":1729239713768,"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_cnpm_publish_time":1729239713768,"dist-tags":{"latest":"3.5.0"}}