Message from JavaScript talks

April 2017

— Sure


Sorry, I forget about this case. But what about this:

Promise.resolve().then(() => fs.readFileSync(filename))


— That would immediately run the then method

— With no data

— Wouldn't return the data

— Oh wait, SYNC

— Lol

— Im not sure how or why you would want that in a promise if it's sync either

— Yes, but it's an alternative to the callback version of the fs.readFile

— Well, bigger problems when using Sync

— Should note it isn't in the promise

— This is the same as just directly calling the function supplied