Skip to content

Commit f188ea6

Browse files
authored
Update README.md
Documented necessity to submit BigInt as argument to UnixFS instance.addBlockSize().
1 parent bf060cd commit f188ea6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/ipfs-unixfs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ The UnixFS spec can be found in the [ipfs/specs repository](http://github.com/ip
3232

3333
```JavaScript
3434
const data = new UnixFS({ type: 'file' })
35-
data.addBlockSize(256) // add the size of each block
36-
data.addBlockSize(256)
35+
data.addBlockSize(256n) // add the size of each block
36+
data.addBlockSize(256n)
3737
// ...
3838
```
3939

@@ -68,7 +68,7 @@ const data = new UnixFS([options])
6868
## Example - Add and remove a block size to the block size list
6969

7070
```JavaScript
71-
data.addBlockSize(<size in bytes>)
71+
data.addBlockSize(<size in BigInt(bytes)>)
7272
```
7373

7474
```JavaScript

0 commit comments

Comments
 (0)