▲ How to implement sleep function in JavaScript at www.geekabyte.io▼1 up and 1 down, posted by geekabyte_io 1281 days ago 2 comments
tracker1 1278 days ago. link parent 1 point ▲ ▼was about to post the same... tfa's example is more verbose than necessary. I put this inlined at the top of anywhere I need it... usually when stubbing out requests in tests or while shimming api clients until the backing service is ready.