{"name":"hamt-sharding","version":"0.0.2","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":"achingbrain","email":"alex@achingbrain.net"}],"gitHead":"fe532cfdc9aa3c94932c87fd087c94b2adc1c9fe","_id":"hamt-sharding@0.0.2","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"dist":{"integrity":"sha512-0pUBRvsdM1G6RgXfJASUMLwk++LQMNoXx2n2iMZiSzV43lBNesSz130wkGSP2D6d/8DYIWABLL1Vqb4PpcUcvQ==","shasum":"53691f72122f1929a92a4688c7bb59545a8998ac","tarball":"http://registry-npm.ywwl.com/hamt-sharding/download/hamt-sharding-0.0.2.tgz","fileCount":15,"unpackedSize":297296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb+C70CRA9TVsSAnZWagAAVIMP/AwXBY5FzZgbKlwVJs63\n1FpUFSjlgab9mUQ8IWAHoZ3VjGoeF0sh0ju+L0tZXEosivkfRdxMiAQsvxJb\nVqadRc/CQFKRoutEEj8DdiJ7I06nCYCXabJNO9zpVtlsHiVSwLv/SPOTwE4D\nhvj4LX/CMJRIkvV3Q9B+slmsln6rBY/2JMKvHaPtZT9k5uvfphCYFotSNtdz\ndK2E7fBsC08NvrPoeZde6V2Y6b72y1OHFYG0JiBrQrJERsTMuWB4cfpCyA1i\ne1sexRqlS05z2rPtq3OtEbBjyu6CX+rallXCvy1PcbNxoVXyyzt4GMvyhuAv\n9+wv5jZ7BdjHP4JM+GDF/+botVgFHKNzTI0XuQmW685tLVXkJQP1YcOtybw4\nIhkoXmps9xXvCsHfR03vZutklCOt/4Vli8tJ0Ly8ikmdYBDyC13d7eg7gIJQ\nM/e/tWGPWz0fOwcYBBBv8gp9kBnNo5/p7Cu91i/LIZA5V2hm2zZnSaB83RII\ni3VRIsD5f1jYj1dHBUfjy+snTD4jnWUj2z6wlyB9NsPCsLVgyz83BMB1UPyd\nNKSvARq2B5/A1xqJRHjjhlWsDOD87uxICkGiWdA5VIB7OdH9iB0KuVlZGJ+c\ndQOL60yjXkVHlQDU3eCqGJp+LSXx//8SUEwWTt4lZZ+6wRQc9TkGj0giVRLJ\no3uR\r\n=G585\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2B19UWz/LzTFg8g+6El5MFDB3MjNzOeqTM7MEQXypCQIhALQ355dQprT93Y3vygOg11xuyRo5rRYwiAGxW36SlCu8"}],"size":74169,"noattachment":false,"key":"/hamt-sharding/-/hamt-sharding-0.0.2.tgz"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hamt-sharding_0.0.2_1542991603244_0.8623714819270185"},"_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":1542991603419,"_cnpm_publish_time":1542991603419,"dist-tags":{"latest":"3.0.8"}}