question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add async/await code examples for each method

See original GitHub issue

Hello! I think it’s great that each method includes an example of how to use it with callbacks and Promises.

Would y’all be interested in adding an async/await example below the Promise example for each method as well?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
rdmurphycommented, Nov 2, 2017

All right! If no one beats me to it, I’ll try to whip something up this weekend.

0reactions
LoganDarkcommented, Jun 17, 2018

@gsc-dev you aren’t using top-level await, are you? await-top would help with that (so you can await without being in an async function)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Async/await - The Modern JavaScript Tutorial
The async keyword before a function has two effects: ... The await keyword before a promise makes JavaScript wait until that promise settles,...
Read more >
async function - JavaScript - MDN Web Docs - Mozilla
Code after each await expression can be thought of as existing in a .then callback. In this way a promise chain is progressively...
Read more >
The Simplest Guide to Using Async/Await with forEach() in ...
Using async/await with forEach() does not need to be a nightmare! Here are 4 solutions to your problem.
Read more >
How to Use Async/Await in JavaScript with Example JS Code
Async means asynchronous. It allows a program to run a function without freezing the entire program. This is done using the Async/Await keyword....
Read more >
Using async/await with a forEach loop - Stack Overflow
Having await inside a real for loop will make sure all async calls are executed one by one. And the forEach + async...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found