{"name":"hamt-sharding","version":"3.0.0","description":"JavaScript implementation of sharding using hash array mapped tries","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-hamt-sharding#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-hamt-sharding.git"},"bugs":{"url":"https://github.com/ipfs/js-hamt-sharding/issues"},"keywords":["IPFS","hamt","sharding"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"chore","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Trivial Changes"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"build":"tsc","pretest":"npm run build","test":"aegir test -f ./dist/test/*.js -f ./dist/test/**/*.js","test:node":"npm run test -- -t node","test:chrome":"npm run test -- -t browser","test:chrome-webworker":"npm run test -- -t webworker","test:firefox":"npm run test -- -t browser -- --browser firefox","test:firefox-webworker":"npm run test -- -t webworker -- --browser firefox","test:electron-main":"npm run test -- -t electron-main","prepare":"npm run build","lint":"aegir lint","dep-check":"aegir dep-check dist/src/**/*.js dist/test/**/*.js","release":"semantic-release"},"dependencies":{"sparse-array":"^1.3.1","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.1.3","it-length":"^1.0.3","multihashing-async":"^2.1.0"},"gitHead":"de3a82c64df3238560601fa6b1f9bd433f3da4cc","_id":"hamt-sharding@3.0.0","_nodeVersion":"16.14.0","_npmVersion":"7.24.2","dist":{"integrity":"sha512-xSmTZHEkQGJk5rJFhF86IyO+XQW4lONVG5B84p5pO3jq/0wVot19a4VNyz3ZP83EpGRGqXjhQgmHb9/LxMOgwA==","shasum":"862f2818d6d23bc6cc561e079a4b7c543aff1448","tarball":"http://registry-npm.ywwl.com/hamt-sharding/download/hamt-sharding-3.0.0.tgz","fileCount":23,"unpackedSize":50082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiE6iXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKbw/5AQGqi9aXBGl18LTYM6tZaBk4Q1no3qu60brWHEfUbxKnXy2Y\r\nAM+ejU0GHiRKxL4dWTzJtC4T4zfjLegLn0A6fv0cCOIh/y0fG5psyAVLiVl9\r\nsVHVqSFKUjvJ0I5H+5RyuG8LqGdm34fm14Z9b5nc29GTFQ3QtrEBxi4dLP3X\r\nAdlli4qpPgjXKASD9nQqNijy6P/kpnyNjBq6Vf+7jip7ZEGG8gXWiANANU6y\r\ngK/E2q6GVSE5/kJLNayrUW1M2W557fi84NIfTEILN2wxp8c4bPzW6dWVsqVc\r\n7atQrfxj5Fy52qM0mS0rNNQtL7mrsbenf4MGJp8dcuYTwriALh7L44agjzuj\r\nB+vW2Phsj6cy4K1AGCQLhfIuf0kql8NgOiGnXgDCCg7KxyenarPOUz1EWmbc\r\ncMLP+EfN/RxVX88I6PbVfh7Nlm6/GELm9P1DcJnqWNE+/fBjTgS7cGlQydTl\r\nAPlxdykDuVsOg/ufSljzsO5jDClmwSqWJdA41Ux+7dp+G5JyfCfdrhZ7hdaj\r\n7YaDFI8aBBC6maf2aCChdAb2JByaRt1N5ETiDXdyNR6aM/Uwnehr6BR8dDvE\r\nEpxJetjSOsY5Ot7kT3u6lB5d2kQqeT6VtvjLs02CLZGNUs9GK6w5C5+BFe7o\r\nWwKyiec9ecAOPCI0633JJC/JFVzi+S4kUzw=\r\n=VrNc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCa2C5ggiEPaSCDDZTl9t2b3ICatTPgCGA9HbupjDNemAIhAN7VE5aKjaPoTGaer16Ag5d9JTecmhRcIZrLgMzasBLF"}],"size":12122,"noattachment":false,"key":"/hamt-sharding/-/hamt-sharding-3.0.0.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_3.0.0_1645455511496_0.21836634237191244"},"_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":1645455511891,"_cnpm_publish_time":1645455511891,"dist-tags":{"latest":"3.0.8"}}