{"name":"hamt-sharding","version":"2.0.1","description":"JavaScript implementation of sharding using hash array mapped tries","leadMaintainer":"Alex Potsides <alex.potsides@protocol.ai>","main":"src/index.js","scripts":{"test":"aegir test","prepare":"aegir build --no-bundle","lint":"aegir ts -p check && aegir lint","release":"aegir release","release-minor":"aegir release --type minor","release-major":"aegir release --type major","coverage":"aegir coverage"},"repository":{"type":"git","url":"git+https://github.com/ipfs-shipyard/js-hamt-sharding.git"},"keywords":["IPFS","hamt","sharding"],"license":"MIT","bugs":{"url":"https://github.com/ipfs-shipyard/js-hamt-sharding/issues"},"engines":{"node":">=10.0.0","npm":">=6.0.0"},"homepage":"https://github.com/ipfs-shipyard/js-hamt-sharding#readme","devDependencies":{"aegir":"^35.0.2","it-length":"^1.0.3","multihashing-async":"^2.1.0","util":"^0.12.4"},"dependencies":{"sparse-array":"^1.3.1","uint8arrays":"^3.0.0"},"contributors":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"types":"dist/src/index.d.ts","gitHead":"acbd5a3e5b6801325f5b305a2d1b7924f2e1d533","_id":"hamt-sharding@2.0.1","_nodeVersion":"16.6.1","_npmVersion":"7.20.3","dist":{"integrity":"sha512-vnjrmdXG9dDs1m/H4iJ6z0JFI2NtgsW5keRkTcM85NGak69Mkf5PHUqBz+Xs0T4sg0ppvj9O5EGAJo40FTxmmA==","shasum":"f45686d0339e74b03b233bee1bde9587727129b6","tarball":"http://registry-npm.ywwl.com/hamt-sharding/download/hamt-sharding-2.0.1.tgz","fileCount":36,"unpackedSize":462568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhI4OqCRA9TVsSAnZWagAAmnIP/2gwsS/0R618IVuEH2Zy\nftqMiNMDc6l+gAIOHKVkFDUmIWBMMjglM4wtZ1JToL8kLMifsVeawhu7UR2S\n/SUY85KUXSloTSrVjb5YY/erSA7K5HsHmqnc8QesxE4djKitHo3iN3B10khn\nIZl9Q26/yPHNkg7PlfEKZuyooGo8pr5Up1hWgznsJa+upHE809TSTJLuD6PD\ny+K8xYvbsl7JwXTA0VVtFvJ9Z43GlIlAzYrXQlUomkpI4Bjgq+bwLBynoXRt\n80BIFTMIPYtCu9NxjgVocjD9RjNCVpcN/aVvQJa102vWyD1ozds9V9m4qkO5\nHF+GDhVpWR1O/NAUgCw0UUzQ1L7FHqNj2lLmPLjGxQ+LQIzkPxKBUJZrnN3A\n0bjZmzc8IRniSzU2o2kMiYHvl//oC5QSqtoHpYzbuWPRpf+BrQX37h+Jue43\n4qK+2qoIAx8D9NAMQP9hlaqAmHazsyL8020dkGaKuP8sgNYIej2uPlj1XDso\nibG/CzRp0+/Judz2QaITt+0S3mx2B5r+8fnWzQeHTCd35+unKxkf8rTB4JaS\nhbbBHRQSVKWK15kSX5RJ8JCTP9SSfUBxXAyM1IR8KVZQThwZIIlzqtjSOv8w\nWtDi+wj1BzMWnL+6SPRMz6SSba6zaTvKy27Pn0OBRYteCibY8ZL+nGXjQ0Ou\nRMJ3\r\n=/GO8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDu7j4AdnVlEQ6DUVOsj0t4KwIsw7PysjacndQaoX9gAIhALosjw04Zqm6hIl4lQF0mWoLfn9fZROIS0Ba0QOgz6gf"}],"size":87254,"noattachment":false,"key":"/hamt-sharding/-/hamt-sharding-2.0.1.tgz"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hamt-sharding_2.0.1_1629717418759_0.09705006696121443"},"_hasShrinkwrap":false,"readme":"# hamt-sharding <!-- omit in toc -->\n\n[![codecov](https://img.shields.io/codecov/c/github/ipfs-shipyard/js-hamt-sharding.svg?style=flat-square)](https://codecov.io/gh/ipfs-shipyard/js-hamt-sharding)\n[![CI](https://img.shields.io/github/actions/workflow/status/ipfs-shipyard/js-hamt-sharding/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/ipfs/js-hamt-sharding/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> JavaScript implementation of sharding using hash array mapped tries\n\n# About\n\nA [Hash Mapped Trie](https://en.wikipedia.org/wiki/Hash_array_mapped_trie) implementation for JavaScript.\n\nThis is used by [@helia/unixfs](https://www.npmjs.com/package/@helia/unixfs) for it's HAMT-sharded directory implementation.\n\n## Example\n\n```TypeScript\nimport { createHAMT } from 'hamt-sharding'\nimport crypto from 'crypto-promise'\n\n// decide how to hash buffers made from keys, can return a Promise\nconst hashFn = async (buf) => {\n  return crypto\n    .createHash('sha256')\n    .update(buf)\n    .digest()\n}\n\nconst bucket = createHAMT({\n  hashFn: hashFn\n})\n\nawait bucket.put('key', 'value')\n\nconst output = await bucket.get('key')\n// output === 'value'\n```\n\n# Install\n\n```console\n$ npm i hamt-sharding\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `HamtSharding` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/hamt-sharding/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://ipfs-shipyard.github.io/js-hamt-sharding>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","publish_time":1629717418901,"_cnpm_publish_time":1629717418901,"dist-tags":{"latest":"3.0.8"}}