{"_id":"index-encoder","_rev":"12-0c79457049a111b64c1af885cd765a0f","name":"index-encoder","dist-tags":{"latest":"3.5.0"},"versions":{"1.0.0":{"name":"index-encoder","version":"1.0.0","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"MIT","_id":"index-encoder@1.0.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/index-encoder","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"dist":{"shasum":"72a81c0d76d8ad25c5ca4c221f4d195a7355b9e5","tarball":"https://registry.npmjs.org/index-encoder/-/index-encoder-1.0.0.tgz","fileCount":5,"integrity":"sha512-e2ZQgSFTAMlOEF+gK/i4hyMBUYiWt8+NHBWTFCUlMBZJMi+HIlyqMC52Q9nQxWXBjZqnCeORt0ReWhJNH8nkqw==","signatures":[{"sig":"MEYCIQCfhaIxuil+MzBTbGdz/KJb0v9MiZEVCUN5hwiUxTFh/gIhAJjvGUYqDJ0B4hKC6C5riNcidjgtuho7psLOyYIhWoiM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6535},"main":"index.js","gitHead":"1988d7bdb25adee64789e107f0ec1440a0cd90af","scripts":{"test":"standard"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/holepunchto/index-encoder.git","type":"git"},"_npmVersion":"8.15.0","description":"Encode multiple values into sorted keys","directories":{},"_nodeVersion":"16.17.0","dependencies":{"b4a":"^1.6.4"},"_hasShrinkwrap":false,"devDependencies":{"standard":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/index-encoder_1.0.0_1683380076034_0.6369764806631593","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"index-encoder","version":"2.0.0","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"MIT","_id":"index-encoder@2.0.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/index-encoder","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"dist":{"shasum":"660eefb0e16fe4b669ddc0ff8e194901a6bdf188","tarball":"https://registry.npmjs.org/index-encoder/-/index-encoder-2.0.0.tgz","fileCount":6,"integrity":"sha512-Mzrc97T7TPnYJozdVZQCUk4QffeGZLch8ibh5FGQpMGzALZSrlqvZwXhyuLvvuTZDvrnhg6rPHyBTX6aRyFiUw==","signatures":[{"sig":"MEUCIAMlxutsyV0gXmjOGOqRYwzutl+RxiBJrLuRnC0u1AhbAiEAvnw800TGUdMJsByWD++BM+1mBLYopF2OReDpzDbMoI8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8847},"main":"index.js","gitHead":"989d30630ec706136b61f54c8a265ae92530592d","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":"8.15.0","description":"Encode multiple values into sorted keys","directories":{},"_nodeVersion":"16.17.0","dependencies":{"b4a":"^1.6.4"},"_hasShrinkwrap":false,"devDependencies":{"brittle":"^3.2.1","standard":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/index-encoder_2.0.0_1683579513727_0.5864986617217121","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"index-encoder","version":"3.0.0","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"MIT","_id":"index-encoder@3.0.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/index-encoder","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"dist":{"shasum":"b4193535171a18843b27706f34f65c6b8aad10aa","tarball":"https://registry.npmjs.org/index-encoder/-/index-encoder-3.0.0.tgz","fileCount":6,"integrity":"sha512-Pwhl0nKx0ik8MfMK9u+GfVMObBFep0uCCUjMNZ5eLiN5k5Dv+4bF6z4itQQJY854EtPprICE/bS/f3F7ohklsw==","signatures":[{"sig":"MEQCIFEEwzvx9TtbAsEFWNNorJNqJhJ9cDH4DVYEHwTR9PjNAiBlJf4/DZMFs02AstOeVeLXC1KVqI7N9u+ydoqUnF8XGg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9920},"main":"index.js","gitHead":"8771f18755ffce9aa2c6c5d4b852fdcf1d6ff7c9","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":"8.15.0","description":"Encode multiple values into sorted keys","directories":{},"_nodeVersion":"16.17.0","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.0.0_1684783108027_0.4129768561292977","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"index-encoder","version":"3.0.1","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"Apache-2.0","_id":"index-encoder@3.0.1","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/index-encoder","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"dist":{"shasum":"966a7d33380463e6071d606a5f936438648f11d3","tarball":"https://registry.npmjs.org/index-encoder/-/index-encoder-3.0.1.tgz","fileCount":7,"integrity":"sha512-kcNP9Wo02/4K6ahONo3DPtpQpDIhKlDNIHqRbCAXhR9yzaEJ4dWROxBq1g9FZf91kpyVZRuhcbravTvN3hWB2A==","signatures":[{"sig":"MEUCIADH9seMErAGEVV9VVR7HyfXW1/R1862qUUHOkOACuzDAiEAvXwE0VeeqMeqHpu0ogK0fU6+JUtT8F19PjS/xq00oRU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20755},"main":"index.js","gitHead":"e9b0ef90cd0145158de3b32318f955a6bf45f772","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":"8.15.0","description":"Encode multiple values into sorted keys","directories":{},"_nodeVersion":"16.17.0","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.0.1_1685305979304_0.02727596683120148","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"index-encoder","version":"3.1.0","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"Apache-2.0","_id":"index-encoder@3.1.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/index-encoder","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"dist":{"shasum":"2b1ebc2a2a7b05c64db46b61862ed00f90140529","tarball":"https://registry.npmjs.org/index-encoder/-/index-encoder-3.1.0.tgz","fileCount":7,"integrity":"sha512-Qgd70wFKpphdG3Yfuuf5MYys9MVs4Bv1nYpoFVBDHZInEv4u9QRDikjTDNYnKXEEDP7w8oppsIpz0qrsHr6rKw==","signatures":[{"sig":"MEYCIQDIifOiPrGB7oJs8LPywqC5TjV15DBeXK1mskLsslIXwgIhANOyV9Ojof2Gw1kpK0WbNSKP3hBYN7EMPwAklHR+oGHE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21858},"main":"index.js","gitHead":"5ca7d15a8415cb4b23172c9425c2162adc947a26","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.1.0_1724921977778_0.8463316517808734","host":"s3://npm-registry-packages"}},"3.2.0":{"name":"index-encoder","version":"3.2.0","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"Apache-2.0","_id":"index-encoder@3.2.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/index-encoder","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"dist":{"shasum":"e7ffecc89a42321625940efaaf5e23c215031cf7","tarball":"https://registry.npmjs.org/index-encoder/-/index-encoder-3.2.0.tgz","fileCount":7,"integrity":"sha512-O6ELbkoO9dawN6xTMGuaoA+8cmlMObomBHql93z3yAWEmaIyUc64IK7JR3T5zEvnmNaSfbKpRIWqnVD0A0NXhQ==","signatures":[{"sig":"MEUCIG5kQN7Q6gixcg6k5qvoyVw5TWnKjTzGSQPExx0laYe2AiEAk9X0miXZByj/aim4W06yyf8Vqiit0Itp+PU0fnMHEjA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22755},"main":"index.js","gitHead":"5273c94d6f59f6f4449994ec70f71b90e0aa634a","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.2.0_1725366384019_0.01545441823517546","host":"s3://npm-registry-packages"}},"3.2.1":{"name":"index-encoder","version":"3.2.1","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"Apache-2.0","_id":"index-encoder@3.2.1","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/index-encoder","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"dist":{"shasum":"d04f018dc48a85a812f041983786e0a84fabe60e","tarball":"https://registry.npmjs.org/index-encoder/-/index-encoder-3.2.1.tgz","fileCount":7,"integrity":"sha512-gTKCPSwQpMJBTvkFwykQ7TKZCC0f0Q54teKV9Snfsi5fiX5oyel1/UloXe9invo6rpJ5nITzCEnt4HWtK8v0VA==","signatures":[{"sig":"MEUCIQDmVnQV8Ga7lwGdB1UPCA6gwTeObrDHCx759bAk8cU6FgIgeUUCbaCerpX2HQYoK+5OT5se+i4t4Ih/8QtYODuh6sg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22757},"main":"index.js","gitHead":"33c97e300c09e23ccf685b263356868c48ee8d3a","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.2.1_1726512410851_0.9804920084367377","host":"s3://npm-registry-packages"}},"3.3.0":{"name":"index-encoder","version":"3.3.0","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"Apache-2.0","_id":"index-encoder@3.3.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/index-encoder","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"dist":{"shasum":"9b776d5af6df4286dbfa2370a4bf0c5947945273","tarball":"https://registry.npmjs.org/index-encoder/-/index-encoder-3.3.0.tgz","fileCount":7,"integrity":"sha512-EIboWBi4Tf/kjNtU/zHqYELuJ0h4oKxTxY9ZKW3wgWI0BmSX+TlKo2YJijcCkTh6Yv5dp4EeBf+173+fxcmzyg==","signatures":[{"sig":"MEUCIQC2SqK3fnxAJzkmAdDW8OVoicrc29Zb/jjlrJ3JEcmbaAIgWKc0giAoEuhdLIHDg+GwE4kNvC4x4HbRtuENmC7TKlM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24623},"main":"index.js","gitHead":"ded54c05a92a98dbc25e62d7d5cc461226521e58","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.0_1728999340995_0.41798207629708695","host":"s3://npm-registry-packages"}},"3.3.1":{"name":"index-encoder","version":"3.3.1","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"Apache-2.0","_id":"index-encoder@3.3.1","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/index-encoder","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"dist":{"shasum":"305ad280dd4c747c43df7bbbb25de2cea0d74d21","tarball":"https://registry.npmjs.org/index-encoder/-/index-encoder-3.3.1.tgz","fileCount":7,"integrity":"sha512-0G4EcETTa9cc3YcPiZPFJJhf1RhAYsZ82vQardLTmCQp7LS1FfE/L4Pf50315G/0fh2GZ9GwZeq0oRf3qkfm9w==","signatures":[{"sig":"MEYCIQCuJX3GpH6/bpQkT1dR/9TdaumStiGIz7g+gbCHigpySgIhAJy7L0njWmpSgIIxIEXwdlGK7Dx6zY7LRsTQeSFANhjX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24373},"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"}},"3.3.2":{"name":"index-encoder","version":"3.3.2","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"Apache-2.0","_id":"index-encoder@3.3.2","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/index-encoder","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"dist":{"shasum":"36a489383a13ab37cb86e7e4a690d72c2825eb4e","tarball":"https://registry.npmjs.org/index-encoder/-/index-encoder-3.3.2.tgz","fileCount":7,"integrity":"sha512-47q0gkBcF+aGM997RePrALMCfj6/5dVNqdLckHKBP7NhOnDPENVgDwWnsUbv1XCveWVQ+SXoZ8gXk+aOZspTTg==","signatures":[{"sig":"MEUCIGnTnZjDaKEy8ith4zvphNU6pnW3Djk85pYuj/3rinjtAiEAlWI906sVwmadCFzyiPsWUvmOv4hmNVwdPxCPzB6Kf9A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24250},"main":"index.js","gitHead":"d9c6b0361f2f96606cf414ae660d0d07392cbe23","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.9.0","description":"Encode multiple values into sorted keys","directories":{},"_nodeVersion":"22.12.0","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.2_1735561443636_0.6896737853105193","host":"s3://npm-registry-packages-npm-production"}},"3.4.0":{"name":"index-encoder","version":"3.4.0","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"Apache-2.0","_id":"index-encoder@3.4.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/index-encoder","bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"dist":{"shasum":"cfb8974d472b3bc62a2bfd6a39e0a407c575adc7","tarball":"https://registry.npmjs.org/index-encoder/-/index-encoder-3.4.0.tgz","fileCount":7,"integrity":"sha512-k3+ENtseFYI9ZPOIZzVH8LlONUvXAcd4jvCPo+Nob/T/2t5R5Rfh8XiFXBG++gHHuVby7HBDp/3YbyEmE481cg==","signatures":[{"sig":"MEQCIG7OHZytiUKRBRzHOnpnLAAXgJ/pqviU57Bf2MHfnK6lAiBPnAlvFLA3va4zevXPdcVy0yZ73bypfuecl4gtwzd6og==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27151},"main":"index.js","gitHead":"af50f7c1920fdef58493b12e0c07b8044c675fd1","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.9.0","description":"Encode multiple values into sorted keys","directories":{},"_nodeVersion":"22.12.0","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.4.0_1745227736278_0.5398116477450818","host":"s3://npm-registry-packages-npm-production"}},"3.5.0":{"name":"index-encoder","version":"3.5.0","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":"^11.0.0","lunte":"^1.0.0","prettier":"^3.6.2","prettier-config-holepunch":"^2.0.0"},"scripts":{"format":"prettier --write .","lint":"prettier --check . && lunte","test":"npm run test:node && npm run test:bare","test:node":"brittle-node test.js","test:bare":"brittle-bare 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","gitHead":"c7bbb900a83309089f20ba41d32158acd11beb7d","_id":"index-encoder@3.5.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-idZ1cxtZz2dRV6rUiaP9Xo99UjXbSzjcMacoQmxUMu/A7fEQcNPngvwDJYeWelQUS5XFlY71/or70lKn6XnwbQ==","shasum":"11dc1cb2b32b3c156ad722e5da8079a390939b39","tarball":"https://registry.npmjs.org/index-encoder/-/index-encoder-3.5.0.tgz","fileCount":9,"unpackedSize":35276,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC5KAj+rcLoYzzC+hB3+Ku7DSGlYahHJh0Zha3VIBbNPQIgNfW7TojB8+rIZCVAa1ji6mbfTqG0cwbLDWvcyC8h1cI="}]},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/index-encoder_3.5.0_1772400460161_0.4057396367319994"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-06T13:34:36.033Z","modified":"2026-03-01T21:27:40.436Z","1.0.0":"2023-05-06T13:34:36.357Z","2.0.0":"2023-05-08T20:58:33.949Z","3.0.0":"2023-05-22T19:18:28.201Z","3.0.1":"2023-05-28T20:32:59.474Z","3.1.0":"2024-08-29T08:59:37.926Z","3.2.0":"2024-09-03T12:26:24.208Z","3.2.1":"2024-09-16T18:46:50.970Z","3.3.0":"2024-10-15T13:35:41.191Z","3.3.1":"2024-10-18T08:21:53.768Z","3.3.2":"2024-12-30T12:24:03.820Z","3.4.0":"2025-04-21T09:28:56.454Z","3.5.0":"2026-03-01T21:27:40.316Z"},"bugs":{"url":"https://github.com/holepunchto/index-encoder/issues"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"Apache-2.0","homepage":"https://github.com/holepunchto/index-encoder","repository":{"type":"git","url":"git+https://github.com/holepunchto/index-encoder.git"},"description":"Encode multiple values into sorted keys","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"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([IndexEncoder.STRING, IndexEncoder.UINT])\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## API\n\n#### `const idx = new IndexEncoder(encodings, { prefix = -1 })`\n\nCreate an index encoder using the array of `encodings`. The index encoder will produce a buffer encoding in the same order as `encodings`. A `prefix` can be defined to differentiate encoded buffers with the same `encodings`.\n\n#### `const buf = idx.encode(keys)`\n\nEncode the provided `keys` as a buffer. `keys` must be in the same order as the `encodings` when constructing the index encoder. `keys` can have less elements than the defined `encodings` to create a prefix buffer. When used with [`hyperbee`](https://github.com/holepunchto/hyperbee), this can be used to search for only a subset of the total keys.\n\n#### `const range = idx.encodeRange(query)`\n\nEncodes the `query` object values into their buffer equivalent values. Useful for creating range queries for [`hyperbee`](https://github.com/holepunchto/hyperbee?tab=readme-ov-file#const-stream--dbcreatereadstreamrange-options) based on the index encoder.\n\nThe `query` specifies the range you want to read:\n\n```\n{\n  gt,  // Return values only > than this\n  gte, // Return values >= than this\n  lt,  // Return values < than this\n  lte: // Return values <= than this\n}\n```\n\nReturned query will be bounded by the `prefix` if defined and the query is unbounded. This ensures ranges only query ranges with the same `prefix`.\n\n#### `const values = idx.decode(buffer)`\n\nDecode the `buffer` into the original values. `values` will be in the same order as the defined `encodings`. Buffers encoded with a subset of keys will return the values encoded with remaining values being `0` filled if encoded with `UNIT` else `null`:\n\n```\nconst idx = new IndexEncoder([\n  IndexEncoder.STRING,\n  IndexEncoder.UINT,\n  IndexEncoder.STRING\n])\n\nconst buf = idx.encode(['foo'])\nconsole.log(idx.decode(buf)) // ['foo', 0, null]\n```\n\n## Encoding Types\n\nThe following are the types for `encodings` are supported provided as static properties on the `IndexEncoder` class:\n\n- `IndexEncoder.BUFFER` : Encodes a buffer.\n- `IndexEncoder.STRING` : Encodes a string.\n- `IndexEncoder.UINT` : Encodes an unsigned integer.\n- `IndexEncoder.INT` : Encodes an signed integer.\n- `IndexEncoder.DATE` : Encodes a date.\n- `IndexEncoder.BOOL` : Encodes a boolean.\n\n#### `const enc = IndexEncoder.lookup(c)`\n\nReturns the encoding type for a given compact encoding name (`c`). If `c` is not supported, it will throw an `Unknown type` error.\n\n## License\n\nApache 2.0\n","readmeFilename":"README.md"}