lib/icomoon-phantomjs.js
function waitFor(checkFn, timeout, cb) {
  var start = Date.now();
  function runWaitFor() {
    if (checkFn()) {
      cb();
    } else if ((Date.now() - start) <= timeout) {
      setTimeout(runWaitFor, 100);
    } else {
      cb(new Error('Timeout of ' + timeout + 'ms reached. This usually means something went wrong. Please try your SVGs inside icomoon itself, https://icomoon.io/app-old'));
    }
  }
  runWaitFor();
}
function waitFor(checkFn, timeout, cb) {
  var start = Date.now();
  function runWaitFor() {
    if (checkFn()) {
      cb();
    } else if ((Date.now() - start) <= timeout) {
      setTimeout(runWaitFor, 100);
    } else {
      cb(new Error('Timeout of ' + timeout + 'ms reached. This usually means something went wrong. Please try your SVGs inside icomoon itself, https://icomoon.io/app-old'));
    }
  }
  runWaitFor();
}
function waitFor ( checkFn , timeout , cb ) { var start = Date . now ( ) ; function runWaitFor ( ) { if ( checkFn ( ) ) { cb ( ) ; } else if ( ( Date . now ( ) - start ) <= timeout ) { setTimeout ( runWaitFor , 100 ) ; } else { cb ( new Error ( 'Timeout of ' + timeout + 'ms reached. This usually means something went wrong. Please try your SVGs inside icomoon itself, https://icomoon.io/app-old' ) ) ; } } runWaitFor ( ) ; }
Run a check function every 100 ms
Run a check function every 100 ms