{"name":"hamt-sharding","version":"0.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","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","build":"aegir build","lint":"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":"^17.0.0","chai":"^4.2.0","dirty-chai":"^2.0.1"},"dependencies":{"sparse-array":"^1.3.1"},"contributors":[{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"achingbrain","email":"alex@achingbrain.net"}],"gitHead":"c09db30278b63cd8e53837c8664f4e6576e31078","_id":"hamt-sharding@0.0.1","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"dist":{"integrity":"sha512-nmmLor2+Z8iTaLzINUiKpt3lFZEx0A/4D0plbccR10IHMLvZSHpcEWqs4tUloJhlWS5eFw2m/sRKHBR6Ori0wA==","shasum":"59bf051a923973cd9db365aa20cb2d1667e7bbe2","tarball":"http://registry-npm.ywwl.com/hamt-sharding/download/hamt-sharding-0.0.1.tgz","fileCount":10,"unpackedSize":47157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9Z3QCRA9TVsSAnZWagAAP5wQAIz1hEpGDxvm+6SQKGiv\nD8aKAtYd8vJrixp3os3GN3IJoJwHSL+dM5OHMwB9icjYp5QKk9TGGl+17S9G\nKVKWL1wucYrGvkWPdF3IrcyEkDRhat31iQCPY2/F3fO6DM7VlbCyCMAUIPek\nn6NP/4g+EoCIUf/lI4EhW4M2EXmzlr58t0Mo8+nW3T7ojw/o6qMwUkyJ5vwx\ncrApv9IBnoX40LGm3loc7RITvzxCKGuRk87oGOLBIzKnAKbFLj6AftlInJhW\npif1wqj0PkylHfKqL8LVOamixlzK2P4sphL4hp99Ag5MW+n/4VtdDyeRP7kk\ntkkWMKl3ZVTUE1rpw+DFfiDCDoVgA/X/bZtpEm/U/G1RpBVCXwNCbBd5oQJd\nxGKXchkMBQuduEpupKWExKr5CxVAOinYeSPflsvznNskOtI30fhLIvmGU3rP\nckUAAQyqAoQ461pnRAJvU2BGyDBFXrm1UWv1HF1uNxESaBHYhHTjE6NfyNr6\nQa0byEuIX3mFgRULXlRmL9UwPCAun38a8r/Nz/zREEysBHyqmZvvRxmEz8Vf\nyGE9U1ZWNR05wbPVT9FGKDASSK/BbCKqu10auf9oHDd8UaAiAph7XK0GVn/l\nm9NZA6MbmEfCu7ZBpUQwYHWYg3WROHwAojFkY+AgY7Vn9Cc5B2bCYY+/YsVt\nK/AX\r\n=ZUPn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCMa2a0gStZoKAUY7DMh7vkshm/CT62CnqwujdyaNh1gIhAOiAhOFSrQG1acK0/M9qPIaazW6BlVWim3H/FGZORrg3"}],"size":10613,"noattachment":false,"key":"/hamt-sharding/-/hamt-sharding-0.0.1.tgz"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hamt-sharding_0.0.1_1542823375532_0.814836639519334"},"_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":1542823375749,"_cnpm_publish_time":1542823375749,"dist-tags":{"latest":"3.0.8"}}