quill-delta-to-html
Version:
Converts Quill's delta ops to HTML
25 lines (21 loc) • 563 B
text/typescript
function callWhenAlltrue(statuses: boolean[], cb: any) {
var interval: NodeJS.Timer;
interval = setInterval(function () {
var isdone = statuses.reduce((pv: any, v: any) => pv && v, true);
if (isdone) {
clearInterval(interval);
cb();
}
}, 10);
}
function callWhenXEqualY({ x, y }: { x: any; y: any }, cb: any) {
var interval: NodeJS.Timer;
interval = setInterval(function () {
var isdone = x === y;
if (isdone) {
clearInterval(interval);
cb();
}
}, 10);
}
export { callWhenAlltrue, callWhenXEqualY };