Skip to content
Myr

Update code example in Chinese docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andrey Sitnik · committed by Andrey Sitnik · parent b12a81e · Browse files · 1 file+4 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−3 removed

  • other:+4 added−3 removed

1 file+4 added−3 removed

modified:README-cn.md+4 added-3 removed
125 unmodified lines
126为了生成硬件随机字节,CPU 将会收集电磁噪音。在收集期间,CPU 会停止工作。所以如果我们使用异步的硬件随机生成器接口,你的其他代码也可以在收集期间执行。127128```js129const nanoid = require('nanoid/async')130nanoid.then(id => {131 model.id = id132})130131async function createUser () {132 user.id = await nanoid()133}134```135136不幸的事,在浏览器里你无法这么做,因为 Web Crypto API 没有异步接口。137
78 unmodified lines