Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 9b28498

Browse files
authored
Merge pull request #291 from mkg20001/patch-1
misc: change "new Buffer" to "Buffer.from()"
2 parents ad70c2c + ec0ea04 commit 9b28498

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SPEC/PUBSUB.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ If no `callback` is passed, a promise is returned.
108108

109109
```JavaScript
110110
const topic = 'fruit-of-the-day'
111-
const msg = new Buffer('banana')
111+
const msg = Buffer.from('banana')
112112

113113
ipfs.pubsub.publish(topic, msg, (err) => {
114114
if (err) {

0 commit comments

Comments
 (0)