Browse Source

doc: fix typo in Buffer.from(string, [encoding])

PR-URL: https://github.com/nodejs/node/pull/15013
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
canary-base
Michał Wadas 7 years ago
committed by Joyee Cheung
parent
commit
abced13e29
  1. 2
      doc/api/buffer.md

2
doc/api/buffer.md

@ -907,7 +907,7 @@ const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
console.log(buf2.toString()); console.log(buf2.toString());
``` ```
A `TypeError` will be thrown if `str` is not a string. A `TypeError` will be thrown if `string` is not a string.
### Class Method: Buffer.from(object[, offsetOrEncoding[, length]]) ### Class Method: Buffer.from(object[, offsetOrEncoding[, length]])
<!-- YAML <!-- YAML

Loading…
Cancel
Save