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 Fishrock123 committed Mar 22, 2016
1 parent d8318c2 commit d9b4e15
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 @@ -1258,7 +1258,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 d9b4e15

Please sign in to comment.