Skip to content

Commit d3ff554

Browse files
committed
Improve async warning
1 parent 94132c6 commit d3ff554

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,9 @@ async function createUser() {
210210

211211
Read more about entropy collection in [`crypto.randomBytes`] docs.
212212

213-
Unfortunately, you will lose Web Crypto API advantages in a browser
214-
if you use the asynchronous API. So, currently, in the browser, you are limited
215-
with either security (`nanoid`), asynchronous behavior (`nanoid/async`),
216-
or non-secure behavior (`nanoid/non-secure`) that will be explained
217-
in the next part of the documentation.
213+
Unfortunately, you will lose performance advantages in a browser
214+
if you use the asynchronous API, because Web Crypto API supports only
215+
synchronous mode.
218216

219217
[`crypto.randomBytes`]: https://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback
220218

0 commit comments

Comments
 (0)