From ac6af73a6dc0bf0dd034a5dced094690018c3f70 Mon Sep 17 00:00:00 2001 From: Andrea Giammarchi Date: Fri, 18 Mar 2016 12:22:22 +0000 Subject: [PATCH] doc: fix typo in synchronous randomBytes example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The string template was closed after `${buf.length}` causing a syntax error within the example. PR-URL: https://github.com/nodejs/node/pull/5781 Reviewed-By: Michaƫl Zasso Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- doc/api/crypto.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index 56e4a4628ff5b5..294095dc16401b 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -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.