Browse Source

doc: add a variable declaration in the buffer.md

PR-URL: https://github.com/nodejs/node/pull/9795
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
v7.x
Vse Mozhet Byt 8 years ago
committed by Jeremiah Senkpiel
parent
commit
30340388f1
  1. 2
      doc/api/buffer.md

2
doc/api/buffer.md

@ -2328,6 +2328,8 @@ The transcoding process will use substitution characters if a given byte
sequence cannot be adequately represented in the target encoding. For instance:
```js
const buffer = require('buffer');
const newBuf = buffer.transcode(Buffer.from('€'), 'utf8', 'ascii');
console.log(newBuf.toString('ascii'));
// Prints: '?'

Loading…
Cancel
Save