UNPKG

yieldtomain

Version:

A utility function to yield to the main thread in JavaScript

3 lines (2 loc) 223 B
var yieldToMain=function(){"use strict";return function(){const e=globalThis.scheduler;return e&&"function"==typeof e.yield?e.yield():new Promise((e=>{setTimeout(e,0)}))}}(); //# sourceMappingURL=yieldToMain.browser.js.map