Skip to content

Commit 825db16

Browse files
WebReflectionMyles Borins
authored and
Myles Borins
committed
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 d8a5a31 commit 825db16

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
@@ -1243,7 +1243,7 @@ there is a problem generating the bytes.
12431243
// Synchronous
12441244
const buf = crypto.randomBytes(256);
12451245
console.log(
1246-
`${buf.length}` bytes of random data: ${buf.toString('hex')});
1246+
`${buf.length} bytes of random data: ${buf.toString('hex')}`);
12471247
```
12481248

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

0 commit comments

Comments
 (0)