Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit d10d824

Browse files
authored
Merge pull request #869 from enricomarino/patch-5
docs: remove promisify (since already promisified) on example
2 parents bd44b8f + d59e875 commit d10d824

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

examples/basics/index-es6.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
const fs = require('fs')
44
const os = require('os')
55
const path = require('path')
6-
const promisify = require('promisify-es6')
76
// const IPFS = require('../../src/core')
87
// replace this by line below if you are using ipfs as a dependency of your
98
// project
@@ -39,16 +38,14 @@ node.version()
3938
* Initialize the repo for this node
4039
*/
4140
.then(() => {
42-
// we need to promisify node.init to return a promise
43-
return promisify(node.init)({ emptyRepo: true, bits: 2048 })
41+
return node.init({ emptyRepo: true, bits: 2048 })
4442
})
4543

4644
/*
4745
* Take the node online (bitswap, network and so on)
4846
*/
4947
.then(() => {
50-
// we need to promisify node.start to return a promise
51-
return promisify(node.start)()
48+
return node.start()
5249
})
5350

5451
/*

0 commit comments

Comments
 (0)