MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-

View on GitHub
src/renderer/windows/GPMWebView/interface/voiceControls/utils/waitFor.js

Summary

Maintainability
A
0 mins
Test Coverage
export default function (fn) {
  return new Promise((resolve) => {
    const wait = setInterval(() => {
      if (fn()) {
        clearInterval(wait);
        resolve();
      }
    }, 10);
  });
}