{"name":"ipld-block","version":"0.10.0","description":"JavaScript Implementation of IPLD Block","leadMaintainer":"Volker Mische <volker.mische@gmail.com>","main":"src/index.js","scripts":{"lint":"aegir lint","build":"aegir build","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"},"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":"^25.0.0","uint8arrays":"^1.0.0"},"dependencies":{"cids":"^1.0.0","class-is":"^1.1.0"},"engines":{"node":">=6.0.0","npm":">=3.0.0"},"contributors":[{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"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":"Irakli Gozalishvili","email":"contact@gozala.io"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"}],"gitHead":"1a93204a0397b2e3ab4ba6dcf0cce33cf5cdf251","_id":"ipld-block@0.10.0","_nodeVersion":"14.6.0","_npmVersion":"6.14.6","dist":{"integrity":"sha512-2Bh2byWQdvBPvb/jXcOkMu0ejKgb13LrBOy2cC9z/qBD2W7Og6t6XA1Ui+xnxZeEHeDDcFnPLayL6n0bmT+1FA==","shasum":"9775edde29cd7c5390a3aa0d77c2bd7fd32716ae","tarball":"http://registry-npm.ywwl.com/ipld-block/download/ipld-block-0.10.0.tgz","fileCount":33,"unpackedSize":1635664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKYy2CRA9TVsSAnZWagAASMUP/1IJPiH0gz4/Y6sbJWu3\n3BaYGywE/d+baEjia/G1A7LZoG8MnAQDYGThBpb4x5xZASdyCXTM+P+Wtg9k\nsmD0YWL5ERjlIpOP9HXiO1aeyzyclfKgLijCQrTsGFBic4t/K48befIpO8tz\n/s7zDVSagQbSQSuMlMfgpo/0Br5uB75bkbAWBhO72N7iQz7o9UB07LTAeiqr\nk87DqVfw0R5K3XK7LyZ6w71PB0nux9DmYC3HgcUlp4rWCW64WBxcaSYzMMFz\nvnOR0d9WmjXfj08P3nCxbBJLZfOaEkBwopLlJZ6SDlfnuQONLRgq/CQBJRSF\nsudCyXO8eifm8YW+60KXMG9/r0RjNQoF5QuP+NiQneCzvkuKWvurs1NtEEra\niHeV11HK5vGJpEuERx2jKyqZYjumrd4hBappbEhwoSGZ6Q7yexAXvihVsKEu\nS0TuefCUwu47Ccsx0OUd+K+vs74fcVgmCogFAMKWdBbA2/qgR+WfwgTxzKTk\nhk5PCZwGEa0uWnJjOLVjHnjaObt36rQAv0C5GuCgpLv3Q5CezPlPsU3J2lcv\nKZ7hvanNCKbx43/MBs1aX8PecyuXArSKU0mSiB6M3xrVfUxX+p9K/o2k5Yr3\nEx7vYDL6NPAXnVHQRJSVdbeWoY2R9251JbqfICnWqzxBWsGBFMCPMGWlozmn\nGC4F\r\n=lUlA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfm/MCkxj9pPSWJqsPu4kSIkHF0dRDpgkSgA0N82vWbwIgWVvocw+0rkKOszU6wmGSwy17606rvnZWs3SLEaeVEZ8="}],"size":1237915,"noattachment":false,"key":"/ipld-block/-/ipld-block-0.10.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.10.0_1596558517507_0.8603701009208347"},"_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":1596558517849,"_cnpm_publish_time":1596558517849,"dist-tags":{"latest":"0.11.1"}}