{"name":"index-encoder","version":"3.3.2","description":"Encode multiple values into sorted keys","main":"index.js","dependencies":{"b4a":"^1.6.4"},"devDependencies":{"brittle":"^3.2.1","hyperbee":"^2.10.5","hypercore":"^10.9.2","random-access-memory":"^6.2.0","standard":"^17.0.0"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/index-encoder.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"homepage":"https://github.com/holepunchto/index-encoder","_id":"index-encoder@3.3.2","gitHead":"d9c6b0361f2f96606cf414ae660d0d07392cbe23","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-47q0gkBcF+aGM997RePrALMCfj6/5dVNqdLckHKBP7NhOnDPENVgDwWnsUbv1XCveWVQ+SXoZ8gXk+aOZspTTg==","shasum":"36a489383a13ab37cb86e7e4a690d72c2825eb4e","tarball":"http://registry-npm.ywwl.com/index-encoder/download/index-encoder-3.3.2.tgz","fileCount":7,"unpackedSize":24250,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGnTnZjDaKEy8ith4zvphNU6pnW3Djk85pYuj/3rinjtAiEAlWI906sVwmadCFzyiPsWUvmOv4hmNVwdPxCPzB6Kf9A="}],"size":7480,"noattachment":false,"key":"/index-encoder/-/index-encoder-3.3.2.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/index-encoder_3.3.2_1735561443636_0.6896737853105193"},"_hasShrinkwrap":false,"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":1735561443820,"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_cnpm_publish_time":1735561443820,"dist-tags":{"latest":"3.5.0"}}