From d9b4e15f75497cf423bb7514dde5aa62b6fd8452 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 cea86c52d2ec4f..26eeae9bae11ac 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -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.