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

Commit 7e21054

Browse files
authored
Merge pull request #867 from enricomarino/patch-4
feat: promisify node.start
2 parents 8dd84d0 + 0c956d2 commit 7e21054

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/components/start.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ const series = require('async/series')
44
const Bitswap = require('ipfs-bitswap')
55
const FloodSub = require('libp2p-floodsub')
66
const setImmediate = require('async/setImmediate')
7+
const promisify = require('promisify-es6')
78

89
module.exports = (self) => {
9-
return (callback) => {
10+
return promisify((callback) => {
1011
callback = callback || function noop () {}
1112

1213
const done = (err) => {
@@ -56,5 +57,5 @@ module.exports = (self) => {
5657
done()
5758
}
5859
})
59-
}
60+
})
6061
}

0 commit comments

Comments
 (0)