examples/dropdown/dist/index.js
function checkPromise(index) {
      var res = cb(callbacks[index]); // actually calling callback
      if (res instanceof Promise) {
        res.then(function (cbRes) {
          if (cbRes !== false) {
            // keep going
            if (index > 0) {
              checkPromise(index - 1);
            }
          }
        });
      } else {
        if (res !== false) {
          // keep going
          if (index > 0) {
            checkPromise(index - 1);
          }
        }
      }
    }
function checkPromise(index) {
      var res = cb(callbacks[index]); // actually calling callback
      if (res instanceof Promise) {
        res.then(function (cbRes) {
          if (cbRes !== false) {
            // keep going
            if (index > 0) {
              checkPromise(index - 1);
            }
          }
        });
      } else {
        if (res !== false) {
          // keep going
          if (index > 0) {
            checkPromise(index - 1);
          }
        }
      }
    }
function checkPromise ( index ) { var res = cb ( callbacks [ index ] ) ; // actually calling callback if ( res instanceof Promise ) { res . then ( function ( cbRes ) { if ( cbRes !== false ) { // keep going if ( index > 0 ) { checkPromise ( index - 1 ) ; } } } ) ; } else { if ( res !== false ) { // keep going if ( index > 0 ) { checkPromise ( index - 1 ) ; } } } }
process each promise in direct order if promise returns false, do not execute further promises
process each promise in direct order if promise returns false do not execute further promises