DEV Community


Discussion on: Making Await More Functional in JavaScript

craigmichaelmartin profile image
craig martin Author

Hm? fa takes a promise, so it's all good. In the example, saveUser is returning a promise - no try/catch necessary there. You can check out the source (12 lines) and the tests to see examples

seangwright profile image
Sean G. Wright

Derp! Yup, I forgot it takes a promise, even when it was shown right above saveUser returns a promise :)

Nice utility 👍