UNPKG

time-slicing

Version:

Break down long tasks into smaller tasks, avoid blocking the main process.

2 lines (1 loc) 192 B
var ts=function(){'use strict';function a(a){typeof a==='function'&&(a=a());if(!a||typeof a.next!=='function')return;!function b(){let c=a.next();if(c.done)return;setTimeout(b)}()}return a}()