mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
10 lines
174 B
JavaScript
10 lines
174 B
JavaScript
/** @babel */
|
|
|
|
export function conditionPromise(predicate) {
|
|
return new Promise(resolve => {
|
|
setInterval(() => {
|
|
if (predicate()) resolve();
|
|
}, 100);
|
|
});
|
|
}
|