{"name":"multihashes","version":"0.2.2","description":"multihash implementation","main":"lib/index.js","jsnext:main":"src/index.js","scripts":{"test:node":"aegir-test node","lint":"aegir-lint","test:browser":"aegir-test browser","build":"aegir-build","test":"aegir-test","release":"aegir-release","coverage":"aegir-coverage","coverage-publish":"aegir-coverage publish"},"pre-commit":["lint","test"],"standard":{"ignore":["dist"]},"repository":{"type":"git","url":"git://github.com/jbenet/js-multihash.git"},"keywords":["multihash"],"author":{"name":"Juan Benet","email":"juan@benet.ai","url":"http://juan.benet.ai/"},"license":"MIT","bugs":{"url":"https://github.com/jbenet/js-multihash/issues"},"dependencies":{"bs58":"^3.0.0"},"devDependencies":{"aegir":"^3.0.1","buffer-equal":"1.0.0","chai":"^3.5.0","pre-commit":"^1.1.2"},"contributors":[{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Juan Benet","email":"juan@benet.ai"},{"name":"William Cotton","email":"williamcotton@gmail.com"},{"name":"dignifiedquire","email":"dignifiedquire@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"}],"gitHead":"cc80d887757c91ad19b24bd8eb61620696ee2f36","homepage":"https://github.com/jbenet/js-multihash#readme","_id":"multihashes@0.2.2","_shasum":"8ccf2e3ba3d041e1146728de0d8a4da9e8b18251","_from":".","_npmVersion":"3.8.7","_nodeVersion":"4.3.2","_npmUser":{"name":"daviddias","email":"daviddias.p@gmail.com"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"},{"name":"jbenet","email":"juan@benet.ai"}],"dist":{"shasum":"8ccf2e3ba3d041e1146728de0d8a4da9e8b18251","tarball":"http://registry-npm.ywwl.com/multihashes/download/multihashes-0.2.2.tgz","integrity":"sha512-44Xp3q/qwyvNrsAGnPlSyqBVysWbri4MdKm9X73h7wK78w16t37n1/iBCKlu6v/snT89hjj14KA/JNBvweO9Dg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCHwxMwlZFi30uvaUArv70fuxJtaFjnvEV24F9yCosOP0CIHBz/NxvxevCa+BAaCuy2Zc7LBrP2i6B7dWPyO1Tk6xB"}],"size":149941,"noattachment":false,"key":"/multihashes/-/multihashes-0.2.2.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/multihashes-0.2.2.tgz_1463382767557_0.3908476603683084"},"directories":{},"readme":"# js-multihash <!-- omit in toc -->\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)\n[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats)\n[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/multiformats/js-multihash.svg?style=flat-square)](https://codecov.io/gh/multiformats/js-multihash)\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/multiformats/js-multihash/ci?label=ci&style=flat-square)](https://github.com/multiformats/js-multihash/actions?query=branch%3Amaster+workflow%3Aci+)\n\n> multihash implementation in node.js\n\nThis is the [multihash](//github.com/multiformats/multihash) implementation in Node.\nIt is extended by [js-multihashing](https://github.com/multiformats/js-multihashing)\nand [js-multihashing-async](https://github.com/multiformats/js-multihashing-async),\nso give those a look as well.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Hugo Dias](http://github.com/hugomrdias/)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Using npm](#using-npm)\n  - [Using a `<script>` tag](#using-a-script-tag)\n- [Usage](#usage)\n- [API](#api)\n- [Update Constants](#update-constants)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n### Using npm\n\n```bash\n> npm install multihashes # NOTE: The name of the module is multihashes!\n```\n\n### Using a `<script>` tag\n\nLoading this module through a script tag will make the `Multihashes` obj available in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/multihashes/dist/index.min.js\"></script>\n```\n\n## Usage\n\n```js\n> var multihash = require('multihashes')\n> var bytes = Uint8Array.from([0, 1, 2, 3...])\n\n> var encoded = multihash.encode(bytes, 'sha1')\n> console.log(encoded)\n<Uint8Array 11 14 0b ee c7 b5 ea 3f 0f db c9 5d 0d d4 7f 3c 5b c2 75 da 8a 33>\n\n> multihash.decode(encoded)\n{ code: 17,\n  name: 'sha1',\n  length: 20,\n  digest: <Uint8Array 0b ee c7 b5 ea 3f 0f db c9 5d 0d d4 7f 3c 5b c2 75 da 8a 33> }\n```\n\n## API\n\nhttps://multiformats.github.io/js-multihash/\n\n## Update Constants\n\nTo update the constants table run the command below. This will fetch the main codec list from https://raw.githubusercontent.com/multiformats/multicodec/master/table.csv and filter only the multihash codecs and update the `constants.js` file in this repo.\n\n```sh\nnpm run update-constants\n```\n\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/multiformats/js-multihash/issues).\n\nCheck out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\nSmall note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\n[MIT](LICENSE) © Protocol Labs Inc.\n","publish_time":1463382769600,"_cnpm_publish_time":1463382769600,"dist-tags":{"latest":"4.0.3","next":"3.1.3-next.2"}}