function applyFilter(filterString, objValues = []) {
  // Short-circuit return true if there is no filterString
  if (!filterString) return true;

  /*
   * The filter string is a name-value pair of the form `filterType=values`.
   * For example, aspect filterString `INCLUDE=Temperature,Humidity` has
   * filterType `INCLUDE` and aspect values `Temperature` and `Humidity`.
   * The "value" part of the name-value pair will be empty if the filter is not
   * set in the perspective.
   */
  const nvp = filterString.split(constants.fieldTypeFieldSeparator);

  /*
   * Short-circuit return true if the filterString is not a name-value pair
   * with an "=" separator.
   */
  if (nvp.length < 2) return true;

  // Get filter type (INCLUDE/EXCLUDE). Short-circuit return true if invalid.
  const filterType = nvp[0];
  if (!constants.validFilterTypes.includes(filterType)) return true;

  const filterValueSet = new Set(nvp[1].split(constants.valuesSeparator));
  const objValuesArr = Array.isArray(objValues) ? objValues : [objValues];
  const valueIsPresent = isPresent(filterValueSet, objValuesArr);

  if (filterType === constants.filterTypeInclude) return valueIsPresent;
  return !valueIsPresent; // otherwise it's an EXCLUDE filter
} // applyFilter
/**
 * The filterString is used to extract the filterType and filter values and the
 * object is compared against the extracted filter to check if the field of the
 * object matches the filter criteria.
 *
 * @param  {String} filterString - String of the form filterType=values.
 * @param  {String|Array} objValues - The values of the object to be matched
 *  against filter criteria (empty array if none)
 * @returns {Boolean} - true if the object matches the filter criteria
 */
The filterString is used to extract the filterType and filter values and the
object is compared against the extracted filter to check if the field of the
object matches the filter criteria.

@param  {String} filterString - String of the form filterType=values.
@param  {String|Array} objValues - The values of the object to be matched
against filter criteria (empty array if none)
@returns {Boolean} - true if the object matches the filter criteria
The filterString is used to extract the filterType and filter values and the object is compared against the extracted filter to check if the field of the object matches the filter criteria . @param { String } filterString - String of the form filterType = values . @param { String|Array } objValues - The values of the object to be matched against filter criteria ( empty array if none ) @returns { Boolean } - true if the object matches the filter criteria
function applyFilter(filterString, objValues = []) {
  if (!filterString) return true;
  const nvp = filterString.split(constants.fieldTypeFieldSeparator);
  if (nvp.length < 2) return true;
  const filterType = nvp[0];
  if (!constants.validFilterTypes.includes(filterType)) return true;
  const filterValueSet = new Set(nvp[1].split(constants.valuesSeparator));
  const objValuesArr = Array.isArray(objValues) ? objValues : [objValues];
  const valueIsPresent = isPresent(filterValueSet, objValuesArr);
  if (filterType === constants.filterTypeInclude) return valueIsPresent;
  return !valueIsPresent; 
} 
function applyFilter ( filterString , objValues = [ ] ) { if ( ! filterString ) return true ; const nvp = filterString . split ( constants . fieldTypeFieldSeparator ) ; if ( nvp . length < 2 ) return true ; const filterType = nvp [ 0 ] ; if ( ! constants . validFilterTypes . includes ( filterType ) ) return true ; const filterValueSet = new Set ( nvp [ 1 ] . split ( constants . valuesSeparator ) ) ; const objValuesArr = Array . isArray ( objValues ) ? objValues : [ objValues ] ; const valueIsPresent = isPresent ( filterValueSet , objValuesArr ) ; if ( filterType === constants . filterTypeInclude ) return valueIsPresent ; return ! valueIsPresent ; }
The filterString is used to extract the filterType and filter values and the
 object is compared against the extracted filter to check if the field of the
 object matches the filter criteria.
The filterString is used to extract the filterType and filter values and the object is compared against the extracted filter to check if the field of the object matches the filter criteria .
// Short-circuit return true if there is no filterString /*
   * The filter string is a name-value pair of the form `filterType=values`.
   * For example, aspect filterString `INCLUDE=Temperature,Humidity` has
   * filterType `INCLUDE` and aspect values `Temperature` and `Humidity`.
   * The "value" part of the name-value pair will be empty if the filter is not
   * set in the perspective.
   */ /*
   * Short-circuit return true if the filterString is not a name-value pair
   * with an "=" separator.
   */ // Get filter type (INCLUDE/EXCLUDE). Short-circuit return true if invalid. // otherwise it's an EXCLUDE filter // applyFilter