register.js
function tryAutoDetect(){
  var libs = [
      "es6-promise",
      "promise",
      "native-promise-only",
      "bluebird",
      "rsvp",
      "when",
      "q",
      "pinkie",
      "lie",
      "vow"]
  var i = 0, len = libs.length
  for(; i < len; i++){
    try {
      return loadImplementation(libs[i])
    } catch(e){}
  }
  return null
}
function tryAutoDetect(){
  var libs = [
      "es6-promise",
      "promise",
      "native-promise-only",
      "bluebird",
      "rsvp",
      "when",
      "q",
      "pinkie",
      "lie",
      "vow"]
  var i = 0, len = libs.length
  for(; i < len; i++){
    try {
      return loadImplementation(libs[i])
    } catch(e){}
  }
  return null
}
function tryAutoDetect ( ) { var libs = [ "es6-promise" , "promise" , "native-promise-only" , "bluebird" , "rsvp" , "when" , "q" , "pinkie" , "lie" , "vow" ] var i = 0 , len = libs . length for ( ; i < len ; i ++ ) { try { return loadImplementation ( libs [ i ] ) } catch ( e ) { } } return null }
Look for common libs as last resort there is no guarantee that
this will return a desired implementation or even be deterministic.
The priority is also nearly arbitrary. We are only doing this
for older versions of Node.js <0.12 that do not have a reasonable
global.Promise implementation and we the user has not registered
the preference. This preserves the behavior of any-promise <= 0.1
and may be deprecated or removed in the future
Look for common libs as last resort there is no guarantee that this will return a desired implementation or even be deterministic . The priority is also nearly arbitrary . We are only doing this for older versions of Node . js <0 . 12 that do not have a reasonable global . Promise implementation and we the user has not registered the preference . This preserves the behavior of any - promise < = 0 . 1 and may be deprecated or removed in the future