Tidbits tagged with #async (3)
I just learned about new AsyncFunction
which is the async version of new Function
. I had never heard of it before, but it is in the MDN docs.
Continue reading →
The callback-hell times are long over. We have better tools now. But which of the new kids on the block do you want to play with? In this meetup, last night we tried out async functions, also known by the name "async/await". It was a fun learning experience. Keep reading and get inspired.
Continue reading →
Don't promisify fs.exists
since this does not play by the rules of node style callback params, where the first one should be err and then data. It seems this does return only the data, which
promisify understands as an error and does throw right away. Instead do what the
node js docs suggest
too and use fs.access
instead, like so: promisify(fs.access)(aPath, fs.R_OK)
. See it in action [here in the cosmowiki].
Continue reading →