Skip to content

Commit

Permalink
doc: add a variable declaration in the buffer.md
Browse files Browse the repository at this point in the history
PR-URL: nodejs#9795
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
vsemozhetbyt authored and Jonathan Darling committed Dec 8, 2016
1 parent ed74256 commit aa29de0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: '?'
Expand Down

0 comments on commit aa29de0

Please sign in to comment.