code: function unify(items, option = {}) {
    const { extractValue = false } = option;
  
    let result = Array.isArray(items) ? items : [items];
  
    if (extractValue) {
      result = result.map((res) => {
        if (Object.prototype.hasOwnProperty.call(res, 'value')) {
          return res.value;
        }
        return res;
      });
    }
  
    if (Array.isArray(result) && result.length === 1) {
      result = result[0];
    }
  
    return result;
  }
docs: Internal helper method to handle command results (similar behaviour as the unify function from WebDriverIO except it does not resolve promises)  @param  {object[]} items  list of items @param  {object} [option]  extractValue: set to try to return the .value property of the input items