Comment on 'Do' More with 'Run'Comments−tln3yI like it! Another one-liner I'm constantly adding is const wait = ms => new Promise(resolve => setTimeout(resolve, ms)) Whatever runs the main function should probably do more, like handling rejections.−mgreenwOP3ySame, I've written this so many times. Node just added this as a built-in utility FWIWhttps://nodejs.org/api/timers.html#timerspromisessettimeoutd...
Comments
I like it! Another one-liner I'm constantly adding is
Whatever runs the main function should probably do more, like handling rejections.Same, I've written this so many times. Node just added this as a built-in utility FWIW
https://nodejs.org/api/timers.html#timerspromisessettimeoutd...