set-immediate-promise
Return a promise immediately resolved by setImmediate().
Installation
npm install --save set-immediate-promise
Usage
To avoid blocking the JavaScript event loop, it is sometimes useful to add a little "breath" inside long-running computations.
; { for let i = 0; i < 1000; i++ // heavy computation here... await ; // ... get a little breath! }
License
MIT