diff options
Diffstat (limited to 'node_modules/p-limit/readme.md')
-rw-r--r-- | node_modules/p-limit/readme.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/node_modules/p-limit/readme.md b/node_modules/p-limit/readme.md index c7a10deb6..90129925c 100644 --- a/node_modules/p-limit/readme.md +++ b/node_modules/p-limit/readme.md @@ -6,7 +6,7 @@ ## Install ``` -$ npm install --save p-limit +$ npm install p-limit ``` @@ -23,10 +23,11 @@ const input = [ limit(() => doSomething()) ]; -// only one promise is run at once -Promise.all(input).then(result => { +(async () => { + // Only one promise is run at once + const result = await Promise.all(input); console.log(result); -}); +})(); ``` |