Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 0eed526

Browse files
wandererdignifiedquire
wanderer
authored andcommitted
docs(readme): update examples
1 parent 41e4099 commit 0eed526

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,22 @@ const BlockService = require('ipfs-block-service')
6464
const BlockService = require('ipfs-block-service')
6565
const Block = require('ipfs-block')
6666
const IPFSRepo = require('ipfs-repo') // storage repo
67-
const Store = require(interface-pull-blob-store') // in-memory store
67+
const Store = require('interface-pull-blob-store') // in-memory store
6868

6969
// setup a repo
7070
var repo = new IPFSRepo('example', { stores: Store })
7171

7272
// create a block
73-
const block = new Block('hello world)
73+
const block = new Block('hello world')
7474
console.log(block.data)
7575
console.log(block.key)
7676

7777
// create a service
7878
const bs = new BlockService(repo)
7979

8080
// add the block, then retrieve it
81-
bs.addBlock(block, function (err) {
82-
bs.getBlock(block.key, function (err, b) {
81+
bs.put(block, function (err) {
82+
bs.get(block.key, function (err, b) {
8383
console.log(block.data.toString() === b.data.toString())
8484
})
8585
})

0 commit comments

Comments
 (0)