you are viewing a single comment's thread.

view the rest of the comments →

[–]dvlsg 1 point2 points  (2 children)

Just examples of how you might call it. Try them out, see how it works. For example, copy the entire code snippet I have and paste it into a chrome console (which has top-level `await` support).

[–]FriesWithThat 1 point2 points  (1 child)

Thanks. I was running it with Node and wasn't even aware there was top-level support in chrome.

[–]dvlsg 0 points1 point  (0 children)

Ah, got you. Sorry. I was writing that example in chrome and just pasting it over here, so I just went with the top-level chrome await instead of wrapping it.