Skip to content

Commit 461c961

Browse files
committed
docs: fix example
1 parent bd83027 commit 461c961

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

examples/mfs-example.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
'use strict'
22

3-
var ipfsBlobStore = require('../index.js')
4-
var store = ipfsBlobStore().mfs
3+
var ipfsBlobStore = require('../src')
54

6-
/*
7-
process.stdin.pipe(store.createWriteStream('test/2/3/4', function (err, metadata) {
8-
if (err) {
9-
// console.log(err)
10-
}
5+
ipfsBlobStore().then(store => {
6+
/*
7+
process.stdin.pipe(store.createWriteStream('test/2/3/4', function (err, metadata) {
8+
if (err) {
9+
// console.log(err)
10+
}
1111
12-
console.log(metadata)
13-
}))
14-
*/
15-
16-
store.createReadStream('test/2/3/4').pipe(process.stdout)
12+
console.log(metadata)
13+
}))
14+
*/
15+
store.createReadStream('test/2/3/4').pipe(process.stdout)
16+
})

0 commit comments

Comments
 (0)