Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Commit

Permalink
fix: use Buffer.from instead of the deprecated new Buffer (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
satazor authored and hugomrdias committed Jan 8, 2019
1 parent f7142c9 commit 7f9c6d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ You will need to use Node.js `Buffer` API compatible, if you are running inside

```js
const multihashing = require('multihashing-async')
const buf = new Buffer('beep boop')
const buf = Buffer.from('beep boop')

multihashing(buf, 'sha1', (err, multihash) => {
// by default calls back with a multihash.
Expand All @@ -109,7 +109,7 @@ h(buf, (err, digest) => {

```js
> const multihashing = require('multihashing-async')
> const buf = new Buffer('beep boop')
> const buf = Buffer.from('beep boop')

> multihashing(buf, 'sha1', (err, mh) => console.log(mh))
// => <Buffer 11 14 7c 83 57 57 7f 51 d4 f0 a8 d3 93 aa 1a aa fb 28 86 3d 94 21>
Expand Down

0 comments on commit 7f9c6d1

Please sign in to comment.