function filterObject( obj, keys ) {
  if ( typeof obj !== "object" ) {
    return {};
  }
  return keys.reduce( ( carry, key ) => {
    if ( key in obj && typeof obj[ key ] !== "undefined" ) {
      carry[ key ] = obj[ key ];
    }
    return carry;
  }, {});
}
@param {Object} obj
@param {String[]} keys
@returns {Object}