Skip to content

Commit

Permalink
doc: fix typo in synchronous randomBytes example
Browse files Browse the repository at this point in the history
The string template was closed after `${buf.length}`
causing a syntax error within the example.

PR-URL: #5781
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
WebReflection authored and jasnell committed Mar 18, 2016
1 parent 545b8fd commit ac6af73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/crypto.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ there is a problem generating the bytes.
// Synchronous
const buf = crypto.randomBytes(256);
console.log(
`${buf.length}` bytes of random data: ${buf.toString('hex')});
`${buf.length} bytes of random data: ${buf.toString('hex')}`);
```

The `crypto.randomBytes()` method will block until there is sufficient entropy.
Expand Down

0 comments on commit ac6af73

Please sign in to comment.