index.js
function handleAny (obj) {
    if (isPromiseAlike(obj)) {
      return obj.then(handleAny)
    } else if (isPlainObject(obj)) {
      return handleObject(obj)
    } else if (Object.prototype.toString.call(obj) === '[object Array]') {
      return handleArray(obj)
    } else {
      return new Promise(function (resolve, reject) {
        return resolve(obj)
      })
    }
  }
function handleAny (obj) {
    if (isPromiseAlike(obj)) {
      return obj.then(handleAny)
    } else if (isPlainObject(obj)) {
      return handleObject(obj)
    } else if (Object.prototype.toString.call(obj) === '[object Array]') {
      return handleArray(obj)
    } else {
      return new Promise(function (resolve, reject) {
        return resolve(obj)
      })
    }
  }
function handleAny ( obj ) { if ( isPromiseAlike ( obj ) ) { return obj . then ( handleAny ) } else if ( isPlainObject ( obj ) ) { return handleObject ( obj ) } else if ( Object . prototype . toString . call ( obj ) === '[object Array]' ) { return handleArray ( obj ) } else { return new Promise ( function ( resolve , reject ) { return resolve ( obj ) } ) } }
Return a promise for an object, array, or other value, with all internal promises resolved.
@param {*} obj
@returns {Promise<*>}
@private
Return a promise for an object array or other value with all internal promises resolved .