Skip to content

Commit

Permalink
buffer: fix a typo in Buffer example code
Browse files Browse the repository at this point in the history
fixes `Buffer(.from[1, 2, 3])` into `Buffer.from(...)` (v5.x only)

https://nodejs.org/dist/latest-v5.x/docs/api/buffer.html

Commented in:
c1534e7#commitcomment-17228215

PR-URL: #6361
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
c0b authored and claudiorodriguez committed Apr 26, 2016
1 parent ca215b9 commit 9992048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function:
Buffers can be iterated over using the ECMAScript 2015 (ES6) `for..of` syntax:

```js
const buf = Buffer(.from[1, 2, 3]);
const buf = Buffer.from([1, 2, 3]);

for (var b of buf)
console.log(b)
Expand Down

0 comments on commit 9992048

Please sign in to comment.