register.js
function shouldPreferGlobalPromise(implementation){
  if(implementation){
    return implementation === 'global.Promise'
  } else if(typeof global.Promise !== 'undefined'){
    // Load global promise if implementation not specified
    // Versions < 0.11 did not have global Promise
    // Do not use for version < 0.12 as version 0.11 contained buggy versions
    var version = (/v(\d+)\.(\d+)\.(\d+)/).exec(process.version)
    return !(version && +version[1] == 0 && +version[2] < 12)
  }

  // do not have global.Promise or another implementation was specified
  return false
}
function shouldPreferGlobalPromise(implementation){
  if(implementation){
    return implementation === 'global.Promise'
  } else if(typeof global.Promise !== 'undefined'){
    // Load global promise if implementation not specified
    // Versions < 0.11 did not have global Promise
    // Do not use for version < 0.12 as version 0.11 contained buggy versions
    var version = (/v(\d+)\.(\d+)\.(\d+)/).exec(process.version)
    return !(version && +version[1] == 0 && +version[2] < 12)
  }

  // do not have global.Promise or another implementation was specified
  return false
}
function shouldPreferGlobalPromise ( implementation ) { if ( implementation ) { return implementation === 'global.Promise' } else if ( typeof global . Promise !== 'undefined' ) { // Load global promise if implementation not specified // Versions < 0.11 did not have global Promise // Do not use for version < 0.12 as version 0.11 contained buggy versions var version = ( / v(\d+)\.(\d+)\.(\d+) / ) . exec ( process . version ) return ! ( version && + version [ 1 ] == 0 && + version [ 2 ] < 12 ) } // do not have global.Promise or another implementation was specified return false }
Determines if the global.Promise should be preferred if an implementation
has not been registered.
Determines if the global . Promise should be preferred if an implementation has not been registered .