Skip to content

Commit d9b4e15

Browse files
WebReflectionFishrock123
authored andcommittedMar 22, 2016
doc: fix typo in synchronous randomBytes example
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]>
1 parent d8318c2 commit d9b4e15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎doc/api/crypto.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@ there is a problem generating the bytes.
12581258
// Synchronous
12591259
const buf = crypto.randomBytes(256);
12601260
console.log(
1261-
`${buf.length}` bytes of random data: ${buf.toString('hex')});
1261+
`${buf.length} bytes of random data: ${buf.toString('hex')}`);
12621262
```
12631263

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

0 commit comments

Comments
 (0)