{"name":"hamt-sharding","version":"3.0.2","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":"^4.0.2"},"devDependencies":{"aegir":"^37.5.0","it-length":"^2.0.0","multihashing-async":"^2.1.0"},"gitHead":"44b6e6b20872200a16342a14592ed79b9660d996","_id":"hamt-sharding@3.0.2","_nodeVersion":"16.17.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-f0DzBD2tSmLFdFsLAvOflIBqFPjerbA7BfmwO8mVho/5hXwgyyYhv+ijIzidQf/DpDX3bRjAQvhGoBFj+DBvPw==","shasum":"a3fba1e4e6b58469388a0e1458768c78c0cd95f6","tarball":"http://registry-npm.ywwl.com/hamt-sharding/download/hamt-sharding-3.0.2.tgz","fileCount":23,"unpackedSize":50439,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDpkwJKiCD1c4rnMF73NI0Cr3ARU7GC8x3feACzA6lOwIhAJse2P0lK3nK0ffCTW1jQZBE6DcPIIst1obmOGGfmsjK"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTnu6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpgvhAAgjkW5VjoHCvIPBXY4cKwmvVq5SjBy8UZpsrZbSbKWLgZ94NK\r\nNih/p7U2SWJqg2UnreWp4Y0/jUujd6wD2DfP7e+7NHybWq1B/YrN41rZNdCy\r\nB50VFwEZzRqOxUjiEaNmJMci++/RbMIhI3lVd+SHYr3Iby9XWKs7ym9hL8ed\r\nd9S7tfr81hB4FoYJMNgTHRuJzHJShfHSDv3okMXtAvXOmKhCWgjbjIdMTRIr\r\nWNXPgG1PmtxnrG+qdjgz79UfhqmYhIHHfFVNi9Rjk8YmoeUu8lSSP00nzm97\r\nK1l+OGiKFm7trTKMELfO+CAxvXI7jMXBGMiikhOq4YaClVGtxiyNrtCYGmL9\r\niwBPxMfwg/SSPR1w6aOuuhFJkXr9P7jueDpsVGB0NYRZrfm5gsGx7v+dK+NB\r\nsxvyOBN0Ntb+9OSL9/XqD2XJ6UZAcCgiomEKbSWVyVZoQbTwMvqPanWfDQtI\r\nZhwbokoEdyPpCmYF8lxgshu47YZw88Gl5IfIpLe6bPIs9HIVylpbe30HD3Tl\r\nOgivowt2mmwOv1QdnHPpzj7XqVx1oz5FQjc8uxqvZPAj3ftkAZudeBq9i+yl\r\nH/sBtGc5wW3gUVCvzXY/CQZcfGS8xusTkU6mRtnQKbVOtRS3cGYKEXK0BQ+T\r\nPE0BhAUsX3gs9kIeBdB8kjtpqN0sUE54o7s=\r\n=c4aE\r\n-----END PGP SIGNATURE-----\r\n","size":12286,"noattachment":false,"key":"/hamt-sharding/-/hamt-sharding-3.0.2.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.2_1666087866763_0.5297265802729709"},"_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":1666087866904,"_cnpm_publish_time":1666087866904,"dist-tags":{"latest":"3.0.8"}}