{"name":"hamt-sharding","version":"3.0.1","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":{".":{"types":"./dist/src/index.d.ts","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":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","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":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","test:electron-main":"aegir test -t electron-main","lint":"aegir lint","dep-check":"aegir dep-check","release":"aegir release"},"dependencies":{"sparse-array":"^1.3.1","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.5.0","it-length":"^1.0.3","multihashing-async":"^2.1.0"},"gitHead":"ac2695a557e8f49b3f5f71b558b4b9d5654ae80c","_id":"hamt-sharding@3.0.1","_nodeVersion":"16.16.0","_npmVersion":"8.17.0","dist":{"integrity":"sha512-FHwY0686xg+GyM0TScJ0N62pROKv3QxkXmTPcdJnFNbBKCN9Bl6FemUuFRvpK9JdXHg8erfcFMmupDwvprCYfQ==","shasum":"ed840993d32520f8771d4b7ad97f54e1c2260e72","tarball":"http://registry-npm.ywwl.com/hamt-sharding/download/hamt-sharding-3.0.1.tgz","fileCount":23,"unpackedSize":50098,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICuyLBiXjoXa+IAsRdWRSZLRBSs2xbqClIUXClzPcK8IAiAESWbMfKD/KGryeRW6APJJwnIHm5BuUwwzXry6LvkOXQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9Q46ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrcbA//akkiFo/NJkVHiJFIiIY5QJ+KPbWUykgTXT9Pz4jA1ubWJgLZ\r\neozvlKgqFXuOHB5s36MetZnx123/qG3i912Kml0UiMWgT4JjbkBdK5VZgE5k\r\nQme1QTtMpN1S8hggoiskmnbGg6ZE0u2+JNh+lK0q8qcreeqzz5gZSIQGic8d\r\nk4kauOD0HE9xuOecgDGtdABpYQx536ZoqswErJdRgjaqvh9z9JzxoPsNM4ab\r\n1vA7Mvxp8/6mvVDNuf9dMq6Tn6JfrzmgONu+FPDfgi8+YCXjOPqj+wVKhQNb\r\nn+osNn/sHIreWUVuN95S7syZGvzFgViZMNeTm+p6giJ+gXUiOzND73XI38XU\r\nWXXygCcPAPVsUJlYplaAwu4iXPXtTPWTBAzIV/ptebto7JVPT1DlzRvP72q8\r\nhSLmy5OYX61S6/rHMnM8ruAcRi2tbc3ETS5R6ehySLmel4hQ7xK3C+z/wrHO\r\nZgi1rGRgLpDo9ldrGTDS782EvkeCMoUWDdEA1Mobd0gCaYbdb+A95qU0a/EP\r\ncwsH3ltlZGLuvsA8qBXqoMTHP+eO7RDHOgL55FzZOqbtiJqCBFhp4nEL7K86\r\n6kCb4g6fpCAn2CMLLFcy0ZFUnCBDL7zorTYszxccEyzjq+vxYI32cD3CQbxj\r\n+qtUlVo2s/UcEthLE7k3hGTR583QLioccYA=\r\n=uGQK\r\n-----END PGP SIGNATURE-----\r\n","size":12102,"noattachment":false,"key":"/hamt-sharding/-/hamt-sharding-3.0.1.tgz"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hamt-sharding_3.0.1_1660227130505_0.6384486627252259"},"_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":1660227130681,"_cnpm_publish_time":1660227130681,"dist-tags":{"latest":"3.0.8"}}