{"name":"hamt-sharding","version":"1.0.0","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":"^20.5.0","chai":"^4.2.0","dirty-chai":"^2.0.1"},"dependencies":{"sparse-array":"^1.3.1"},"contributors":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"gitHead":"446ff21dde50f3efd46e44604b29e3d15346476e","_id":"hamt-sharding@1.0.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-jDk8N1U8qprvSt3KopOrrP46zUogxeZY+znDHP196MLBQKldld0TQFTneT1bxOFDw8vttbAQy1bG7L3/pzYorg==","shasum":"8c7cccb068cd871d721c21e6f09219e5e66383d1","tarball":"http://registry-npm.ywwl.com/hamt-sharding/download/hamt-sharding-1.0.0.tgz","fileCount":39,"unpackedSize":1914988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFempCRA9TVsSAnZWagAA8YgP/04HzDQhDFFMIyGWCLJx\nZQurTjfr+N58x0B/7jxBQsVblCzzjxYp/l/IibNKcWbSPwgmLGyLZbI/IFUT\n1U2gTRB0S9Q7+OMfb79lszGP0gmMSQ+cpPsmCtB7yLNDDorV3g7lVLQ4Xe2x\nzXp0wtFaBFDo4Tk/I6oZX3EbNOeKkPF6wzFkEq9JkqEy6dRbONzi7/6180v+\nQtFpO1S5JxaJfq9KWsMtzPBo+sFiQ5q+e7qdyhRPGa17o3l03x09nm+dY4at\nQ5ruZ2POpEdx3KT1pUrOYh8frfEjv3HtJsQhgfoJu4E464qyAxvrijEA0k4F\nE10lXUs8UJby4ZAJD1NnWv6uhy8yKSSlZswsq2dBjE63n9PHVV6cadiO3d85\nWw3rh1G8rY/+qK6M64hw0RnCRohux/E4fU7jrK/ZUkoq9nMZoesMgRujBNQh\nxQARveoipAroz3QNxkMJFDBAa7Ip7kQxpa63i4bMDbydwnimKiqpPANFnIDQ\nfd4zmbS/3QIojZIFPcvYUVRid8VebEQdtkfdghNoQI1i62RP3wrxoo6JCA8l\n0q33ysrxuimTxHnLe5lTRBkMc397QIk3lRovd6xT26fmiFSJ91DeOdVtLLmT\nl+17O7qP9Xgagj9MXyIkJxNgARVnePggDvT4KyY66m4am8z+QnKbmdXD/zzX\nkTaF\r\n=DOzm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4pcYuo5SGjEGgAi80mgIyJ4NxsvAv9JQGje1D/isBdAIgAhGCCLp+O/0+7tEVenL2bHjvn+dci2Lecq8z/zpgBhI="}],"size":1305996,"noattachment":false,"key":"/hamt-sharding/-/hamt-sharding-1.0.0.tgz"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hamt-sharding_1.0.0_1578494377245_0.0713076317774135"},"_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":1578494377459,"_cnpm_publish_time":1578494377459,"dist-tags":{"latest":"3.0.8"}}