code: function _pick(obj, properties) {
    return properties.reduce((newObj, prop, i) => {
      if (typeof prop === 'function') {
        return newObj;
      }
  
      let newProp = prop;
      let match = prop.match(/^(.+?)\sas\s(.+?)$/i);
  
      if (match) {
        prop = match[1];
        newProp = match[2];
      }
  
      let value = obj[prop];
      if (typeof properties[i + 1] === 'function') {
        value = properties[i + 1](value, newObj);
      }
      if (typeof value !== 'undefined') {
        newObj[newProp] = value;
      }
  
      return newObj;
    }, {});
  }
docs: basically lodash#pick that also allows transformation functions and property renaming