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

Commit ec0ea04

Browse files
authored
misc: change "new Buffer" to "Buffer.from()"
1 parent ad70c2c commit ec0ea04

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)