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>
v6
Vse Mozhet Byt 8 years ago
committed by Anna Henningsen
parent
commit
39ed512d8a
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  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