client/locations-list-map.js
// instead of walking the full set.
instead of walking the full set.
instead of walking the full set .
function updateFilters(filters) {
  filters.applied = {};
  const { applied } = filters;
  for (const state of Object.keys(filters.states)) {
    if (filters.states[state].isSet) {
      applied.states = applied.states || {};
      applied.states[state] = true;
    }
  }
  for (const date of Object.keys(filters.entryAge)) {
    if (filters.entryAge[date].isSet) {
      applied.entryAge = applied.entryAge || {};
      applied.entryAge[date] = true;
    }
  }
  const datasetFilters = filtersByDataset[gDataset];
  Object.keys(datasetFilters).forEach((datasetFilterKey) => {
    for (const item of Object.keys(filters[datasetFilterKey])) {
      if (filters[datasetFilterKey][item].isSet) {
        applied[datasetFilterKey] = applied[datasetFilterKey] || {};
        applied[datasetFilterKey][item] = true;
      }
      filters[datasetFilterKey].placeholder = datasetFilters[datasetFilterKey].placeholder;
    }
  });
}
function updateFilters ( filters ) { filters . applied = { } ; const { applied } = filters ; for ( const state of Object . keys ( filters . states ) ) { if ( filters . states [ state ] . isSet ) { applied . states = applied . states || { } ; applied . states [ state ] = true ; } } for ( const date of Object . keys ( filters . entryAge ) ) { if ( filters . entryAge [ date ] . isSet ) { applied . entryAge = applied . entryAge || { } ; applied . entryAge [ date ] = true ; } } const datasetFilters = filtersByDataset [ gDataset ] ; Object . keys ( datasetFilters ) . forEach ( ( datasetFilterKey ) => { for ( const item of Object . keys ( filters [ datasetFilterKey ] ) ) { if ( filters [ datasetFilterKey ] [ item ] . isSet ) { applied [ datasetFilterKey ] = applied [ datasetFilterKey ] || { } ; applied [ datasetFilterKey ] [ item ] = true ; } filters [ datasetFilterKey ] . placeholder = datasetFilters [ datasetFilterKey ] . placeholder ; } } ) ; }
instead of walking the full set.
instead of walking the full set .