nolanlawson/blob-util

promises

lstkz opened this issue · 1 comments

lstkz commented

Almost all API methods return a promise even if the whole code is synchronous.
Is there any reason why force to use promises?

In my current code, I had a forEach loop, and I had to refactor it to Promise.map and use async/await.
I think it's not a good practice to wrap everything in promises. A synchronous code is always easier to read than asynchronous.

I find it simpler that every API returns a promise and you don't have to remember which ones do and which ones won't.