Skip to content
This repository was archived by the owner on Dec 6, 2022. It is now read-only.

Commit 5a3bbde

Browse files
committed
feat: this module is now named ipld-block
This module was previously called `ipfs-block`. It is now maintained within IPLD. BREAKING CHANGE: The symbol for comparing blocks changed This means that if you are a user of this module, updating to this version is also a breaking change for your module. Don't forgot to make the corresponding version bump on your next release.
1 parent 878c6d9 commit 5a3bbde

File tree

3 files changed

+27
-26
lines changed

3 files changed

+27
-26
lines changed

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# IPFS Block JavaScript Implementation
1+
# IPLD Block JavaScript Implementation
22

33
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
4-
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
5-
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
4+
[![](https://img.shields.io/badge/project-IPLD-blue.svg?style=flat-square)](http://ipld.io/)
5+
[![](https://img.shields.io/badge/freenode-%23ipld-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipld)
66
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
7-
[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs-block)](https://travis-ci.com/ipfs/js-ipfs-block)
8-
[![Coverage Status](https://coveralls.io/repos/github/ipfs/js-ipfs-block/badge.svg?branch=master)](https://coveralls.io/github/ipfs/js-ipfs-block?branch=master)
9-
[![Dependency Status](https://david-dm.org/ipfs/js-ipfs-block.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-block)
7+
[![Travis CI](https://flat.badgen.net/travis/ipld/js-ipld-block)](https://travis-ci.com/ipld/js-ipld-block)
8+
[![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)
9+
[![Dependency Status](https://david-dm.org/ipld/js-ipld-block.svg?style=flat-square)](https://david-dm.org/ipld/js-ipld-block)
1010
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
1111
![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square)
1212
![](https://img.shields.io/badge/Node.js-%3E%3D4.0.0-orange.svg?style=flat-square)
1313

14-
> [IPFS][ipfs] implementation of the Block data structure in JavaScript.
14+
> [IPLD][ipld] implementation of the Block data structure in JavaScript.
1515
16-
**Block** - A block is a blob of binary data.
16+
**Block** - A block is a blob of binary data combined with a [CID].
1717

1818
## Lead Maintainer
1919

@@ -41,21 +41,21 @@
4141
### npm
4242

4343
```sh
44-
> npm install ipfs-block
44+
> npm install ipld-block
4545
```
4646

4747
## Usage
4848

4949
### Node.js
5050

5151
```js
52-
const Block = require('ipfs-block')
52+
const Block = require('ipld-block')
5353
```
5454

5555
#### Example
5656

5757
```js
58-
const Block = require('ipfs-block')
58+
const Block = require('ipld-block')
5959

6060
// create a block
6161
const block = new Block(new Buffer('hello world'), cid)
@@ -70,24 +70,24 @@ it and use with your favourite bundler without having to adjust asset management
7070
process.
7171

7272
```js
73-
const Block = require('ipfs-block')
73+
const Block = require('ipld-block')
7474
```
7575

7676
### Browser: `<script>` Tag
7777

78-
Loading this module through a script tag will make the `IpfsBlock` obj available in
78+
Loading this module through a script tag will make the `IpldBlock` obj available in
7979
the global namespace.
8080

8181
```html
82-
<script src="https://unpkg.com/ipfs-block/dist/index.min.js"></script>
82+
<script src="https://unpkg.com/ipld-block/dist/index.min.js"></script>
8383
<!-- OR -->
84-
<script src="https://unpkg.com/ipfs-block/dist/index.js"></script>
84+
<script src="https://unpkg.com/ipld-block/dist/index.js"></script>
8585
```
8686

8787
## API
8888

8989
```js
90-
const Block = require('ipfs-block')
90+
const Block = require('ipld-block')
9191
```
9292

9393
### Block
@@ -106,12 +106,13 @@ The raw data of the block. Its format matches whatever was provided in its const
106106

107107
The cid of the block.
108108

109-
[ipfs]: https://ipfs.io
110-
[multihash]: https://github.com/jbenet/js-multihash
109+
[ipld]: https://ipld.io/
110+
[multihash]: https://github.com/multiformats/js-multihash
111+
[CID]: https://github.com/multiformats/js-cid
111112

112113
## Contribute
113114

114-
Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-block/issues)!
115+
Feel free to join in. All welcome. Open an [issue](https://github.com/ipld/js-ipld-block/issues)!
115116

116117
This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
117118

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "ipfs-block",
2+
"name": "ipld-block",
33
"version": "0.8.0",
4-
"description": "JavaScript Implementation of IPFS Block",
4+
"description": "JavaScript Implementation of IPLD Block",
55
"leadMaintainer": "Volker Mische <[email protected]>",
66
"main": "src/index.js",
77
"scripts": {
@@ -23,16 +23,16 @@
2323
],
2424
"repository": {
2525
"type": "git",
26-
"url": "git+https://github.com/ipfs/js-ipfs-block.git"
26+
"url": "git+https://github.com/ipld/js-ipld-block.git"
2727
},
2828
"keywords": [
29-
"IPFS"
29+
"IPLD"
3030
],
3131
"license": "MIT",
3232
"bugs": {
33-
"url": "https://github.com/ipfs/js-ipfs-block/issues"
33+
"url": "https://github.com/ipld/js-ipld-block/issues"
3434
},
35-
"homepage": "https://github.com/ipfs/js-ipfs-block#readme",
35+
"homepage": "https://github.com/ipld/js-ipld-block#readme",
3636
"devDependencies": {
3737
"aegir": "^18.2.0",
3838
"chai": "^4.2.0"

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ class Block {
5454
}
5555
}
5656

57-
module.exports = withIs(Block, { className: 'Block', symbolName: '@ipfs/js-ipfs-block/block' })
57+
module.exports = withIs(Block, { className: 'Block', symbolName: '@ipld/js-ipld-block/block' })

0 commit comments

Comments
 (0)