{"name":"ipld-block","version":"0.11.0","description":"JavaScript Implementation of IPLD Block","leadMaintainer":"Volker Mische <volker.mische@gmail.com>","main":"src/index.js","scripts":{"lint":"aegir lint","check":"tsc --noEmit --noErrorTruncation","build":"npm run build:js && npm run build:types","build:js":"aegir build","build:types":"tsc --emitDeclarationOnly --declarationDir dist","test":"aegir test","test:node":"aegir test --target node","test:browser":"aegir test --target browser","release":"aegir release --docs","release-minor":"aegir release --type minor --docs","release-major":"aegir release --type major --docs","coverage":"aegir coverage","coverage-publish":"aegir coverage --provider coveralls","docs":"aegir docs","prepare":"npm run build:types"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/ipld/js-ipld-block.git"},"keywords":["IPLD"],"license":"MIT","bugs":{"url":"https://github.com/ipld/js-ipld-block/issues"},"homepage":"https://github.com/ipld/js-ipld-block#readme","devDependencies":{"aegir":"^27.0.0","uint8arrays":"^1.0.0","typescript":"^4.0.3"},"dependencies":{"cids":"^1.0.0"},"engines":{"node":">=6.0.0","npm":">=3.0.0"},"typesVersions":{"*":{"*":["dist/*"]}},"contributors":[{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Irakli Gozalishvili","email":"contact@gozala.io"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ","email":"victorbjelkholm@gmail.com"},{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Charlie","email":"the_charlie_daly@hotmail.co.uk"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"e7696f9c47c821561f7bd00d2a16d5ffbbda595b","_id":"ipld-block@0.11.0","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Kk56OOPmlWAjXfBJXvx2jX5RA6R9qUrcc2JXwF7Y4IL9mlmxcxTNkgcsJYR78DbyMllQbi7yreghjGjtCTYKaw==","shasum":"71b24b70f4d867b0609a738efa4872ef4df84c7a","tarball":"http://registry-npm.ywwl.com/ipld-block/download/ipld-block-0.11.0.tgz","fileCount":37,"unpackedSize":1623662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkF5fCRA9TVsSAnZWagAAhX8P/inlo/vFdmnF1bcqKmQ+\nR0vlAAGbKUx00MLbtg3LkNu5qVB+3FKBdEbUpIPWzDoM5ymWr0/c/lXCPNim\nD2eQPDWYsJ1/mwhwg306uzG0/rf3QLy+DPkALr4uX0bV7sohmfVqB8Wg3K1t\nUY/Rx+JlAnyUQgzVB4GVt5USStwUD4wsX0dEbHtogkU6za+ZyzqzzjFjqTDe\nyvvz8elRtIaCP+fJaUEo0ekOHfnkxV0LO3MMztfJvvsVTDxI9vc11xbJ1unO\nyz0Dt6uyEo+2Sn6I8UOl/Z38cF/BU9XkNex+x7NQlSnydlS3IA4nEQacEyU3\nQ687k/VStSe1HFXXJa6ewHn0I6qDhNypVe19MC94rST7KhD50Yv684oJjS4t\nzwo+saKnFj4KfG4zpQxegl5rxa7wmU9WBjyhrKbmk9Y26KYuQeD6BI0l/VIG\nUuPCoU0r3tiF1f9XPca5eJsiHbEVUMJOIgygvVS9/0Hd8x8goBQC7jEA69Wz\n2Xc6tSYxP9pOQLszO7WlLtmdSyxe8cxzg+BjEP10a+MGMIDsOQSzrcFLMaOy\nAela/4sO02VSZLKD80Uf8np9/cr4hkXpRD91y3sg3oyvIWVMUBE/OqC+gOQr\npz/eujNY10kiT+tsTL0og+ziJBfy6j9nqAZpuZEF5Vaji/PkZnOa7OWnnvld\nnETd\r\n=tQvl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHvCkkvQJYpBEPDObbx2MeRRYHu/P4S78uhIkQYmBA9IAiAB+CVG65g9WQ1REY/27jv1UsZ14+YG9YxjHjIZsmH0sg=="}],"size":1232496,"noattachment":false,"key":"/ipld-block/-/ipld-block-0.11.0.tgz"},"maintainers":[{"name":"vmx","email":"volker.mische@gmail.com"}],"_npmUser":{"name":"vmx","email":"volker.mische@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipld-block_0.11.0_1603296862468_0.237206603175788"},"_hasShrinkwrap":false,"readme":"# IPLD Block JavaScript Implementation\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-IPLD-blue.svg?style=flat-square)](http://ipld.io/)\n[![](https://img.shields.io/badge/freenode-%23ipld-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipld)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Travis CI](https://flat.badgen.net/travis/ipld/js-ipld-block)](https://travis-ci.com/ipld/js-ipld-block)\n[![Coverage Status](https://coveralls.io/repos/github/ipld/js-ipld-block/badge.svg?branch=master)](https://coveralls.io/github/ipld/js-ipld-block?branch=master)\n[![Dependency Status](https://david-dm.org/ipld/js-ipld-block.svg?style=flat-square)](https://david-dm.org/ipld/js-ipld-block)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square)\n![](https://img.shields.io/badge/Node.js-%3E%3D4.0.0-orange.svg?style=flat-square)\n\n> [IPLD][ipld] implementation of the Block data structure in JavaScript.\n\n**Block** - A block is a blob of binary data combined with a [CID].\n\n## Lead Maintainer\n\n[Volker Mische](https://github.com/vmx)\n\n## Table of Contents\n\n- [IPLD Block JavaScript Implementation](#ipld-block-javascript-implementation)\n  - [Lead Maintainer](#lead-maintainer)\n  - [Table of Contents](#table-of-contents)\n  - [Install](#install)\n    - [npm](#npm)\n  - [Usage](#usage)\n    - [Node.js](#nodejs)\n      - [Example](#example)\n    - [Browser: Browserify, Webpack, other bundlers](#browser-browserify-webpack-other-bundlers)\n    - [Browser: `<script>` Tag](#browser-script-tag)\n  - [API](#api)\n    - [Block](#block)\n      - [`new Block(data, cid)`](#new-blockdata-cid)\n      - [`block.data`](#blockdata)\n      - [`block.cid`](#blockcid)\n  - [Contribute](#contribute)\n  - [License](#license)\n\n## Install\n\n### npm\n\n```sh\n> npm install ipld-block\n```\n\n## Usage\n\n### Node.js\n\n```js\nconst Block = require('ipld-block')\n```\n\n#### Example\n\n```js\nconst Block = require('ipld-block')\nconst encoder = new TextEncoder('utf8')\n\n// create a block\nconst block = new Block(encoder.encode('hello world'), cid)\nconsole.log(block.data.toString())\n```\n\n### Browser: Browserify, Webpack, other bundlers\n\nThe code published to npm that gets loaded on require is in fact a ES5\ntranspiled version with the right shims added. This means that you can require\nit and use with your favourite bundler without having to adjust asset management\nprocess.\n\n```js\nconst Block = require('ipld-block')\n```\n\n### Browser: `<script>` Tag\n\nLoading this module through a script tag will make the `IpldBlock` obj available in\nthe global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipld-block/dist/index.min.js\"></script>\n<!-- OR -->\n<script src=\"https://unpkg.com/ipld-block/dist/index.js\"></script>\n```\n\n## API\n\n```js\nconst Block = require('ipld-block')\n```\n\n### Block\n\n#### `new Block(data, cid)`\n\n- `data: Uint8Array`\n\nCreates a new block with raw data `data`.\n\n#### `block.data`\n\nThe raw data of the block. Its format matches whatever was provided in its constructor.\n\n#### `block.cid`\n\nThe cid of the block.\n\n[ipld]: https://ipld.io/\n[multihash]: https://github.com/multiformats/js-multihash\n[CID]: https://github.com/multiformats/js-cid\n\n## Contribute\n\nFeel free to join in. All welcome. Open an [issue](https://github.com/ipld/js-ipld-block/issues)!\n\nThis repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\n[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1603296862720,"_cnpm_publish_time":1603296862720,"dist-tags":{"latest":"0.11.1"}}