code: function _resolvePromises (opts, val) {
    opts = opts || {}
    var duplicate = opts.duplicate
    if (is(Array, val)) {
      return Promise.all(duplicate ? concat([], val) : val)
    } else if (duplicate && is(Object, val) && !is(Function, val.then)) {
      return Object.assign({}, val)
    }
    return val
  }
docs: Calls Promise.all on passed value if it is an array
  Duplicates value if required.
  @param  {Object} opts - options
  @param  {*} val - value to resolve
  @return {*} - if val is an array, a promise for all resolved elements, else the original value