From 825db166fb6a742111ade996c0b781f9eeacc556 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 3d7d896d0ae709..de51bb67f92f22 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -1243,7 +1243,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.