Filters out any time series value which does not satisfy the filter.

@param item {Number}
@returns {Boolean}
423620
function filterDataItem(item){
    return this.filters.some(function(filter){
      return filter.call(null, item);
    }) ? item : null;
  }
514179
function(val, item) {
    if (_.isString(val)) return val.indexOf(item) !== -1;
    if (_.isArray(val))  return _.indexOf(val, item) !== -1;
    if (_.isObject(val)) return _.has(val, item);
    return false;
  }
830351
function (item) {
        return this.members.indexOf(_.isString(item) ? (item = this.one(item)) : item);
    }
1086307
def _filter_by_pattern(self, pattern):
        """"""
        try:
            _len = len(pattern)
        except TypeError:
            raise TypeError("pattern is not a list of Booleans. Got {}".format(
                type(pattern)))
        _filt_values = [d for i, d in enumerate(self._values) if pattern[i % _len]]
        _filt_datetimes = [d for i, d in enumerate(self.datetimes) if pattern[i % _len]]
        return _filt_values, _filt_datetimes
987279
function (query, items) {
            var expression = query.query.where,
                ret = [];

            for (var i = 0; i < items.length; i++) {
                if (this._filterItem(items[i], expression)) {
                    ret.push(items[i]);
                }
            }

            return ret;

        }
1222293
function isGroupResult(item) {
  log.trace('isGroupResult(%j)', item);

  if (! item) return(false);
  if (item.groupType) return(true);
  if (item.objectCategory) {
    re.isGroupResult.lastIndex = 0; // Reset the regular expression
    return(re.isGroupResult.test(item.objectCategory));
  }
  if ((item.objectClass) && (item.objectClass.length > 0)) {
    return(_.any(item.objectClass, function(c) { return(c.toLowerCase() === 'group'); }));
  }
  return(false);
}
272223
function dedupe(arr) {
    return arr.filter(function(item, pos) {
        return arr.indexOf(item) === pos;
    });
}
769697
def filterCollapsedItems(data):
  """"""
  return ((key, value)\
          for key, value in six.iteritems(data) \
          if not (isinstance(value, StatContainer) and value.isCollapsed()))
130193
private boolean remove(List<String> list, String item) {
        if (null != list) {
            if (list.remove(item)) {
                this.num_items--;
                return true;
            }
        }
        return false;
    }
764529
function (item) {
		var items = this.items;
		var removed = 0;
		for (var i = 0, l = items.length; i < l; i++) {
			if (items[i] === item) {
				items.splice(i, 1);
				i--;
				removed++;
			}
		}
		return removed;
	}
268417
function(item,index){
    var _self = this,
      type = item.type || _self._getDefaultType(),
      cons = _self._getSeriesClass(type),
      cfg = _self._getSeriesCfg(type,item,index),
      series ;
    cfg.autoPaint = cfg.autoPaint || false;

    series  = _self.addGroup(cons,cfg);
    
    return series;
  }
458381
public boolean filterMatches(AbstractItem item)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "filterMatches", item);

    boolean result = true;

    if (selectorTree != null || discriminatorTree != null)
    {
      // Defect 382250, set the unlockCount from MsgStore into the message
      // in the case where the message is being redelivered.
      // 668676, get the message if available
      JsMessage msg = ((SIMPMessage)item).getMessageIfAvailable();
      if ( msg == null)
      {
    	  result = false;
      }
      else
      {
          int redelCount = ((SIMPMessage)item).guessRedeliveredCount();

          if (redelCount > 0)
          {
              if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  SibTr.debug(tc, "Set deliverycount into message: " + redelCount);
              msg.setDeliveryCount(redelCount);
          }

          // Evaluate message against selector tree
          result =
            consumerDispatcher.getMessageProcessor().getMessageProcessorMatching().evaluateMessage(
              selectorTree,
              discriminatorTree,
              msg);
      }
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "filterMatches", Boolean.valueOf(result));

    return result;
  }
646457
function removeOne(array, item) {
    var found = array.indexOf(item);
    if (found > -1) {
        array.splice(found, 1);
    }
}
928633
function canResultsBeSummed(item) {
  var result = true;
  if (defined(item.cannotSum)) {
    if (typeof item.cannotSum === "object") {
      var conceptItems = item._concepts[0].items;
      conceptItems.forEach(concept => {
        var valuesThatCannotDisplayPercent = item.cannotSum[concept.id];
        if (defined(valuesThatCannotDisplayPercent)) {
          var activeValueIds = concept.activeItems.map(
            activeConcept => activeConcept.id
          );
          if (
            valuesThatCannotDisplayPercent.some(
              cannotValue => activeValueIds.indexOf(cannotValue) >= 0
            )
          ) {
            result = false;
          }
        }
      });
    } else {
      result = !item.cannotSum; // ie. if it is true or false.
    }
  }
  return result;
}
189906
function (item) {
        item.value.sort(function (a, b) {
            if (a.key < b.key) {
                return -1;
            }
            /* istanbul ignore next */
            // Below line exists only for the sake of completeness. Generally the array will
            // always be sorted, and therefore it is impossible to get to this state in a test.
            return a.key > b.key ? 1 : 0;
        });
        return item;
    }
525309
function filterMonth(arr, year, disabledDateObj) {
  const minDateTime = new Date(year, 0, 1).getTime();
  const maxDateTime = new Date(year, 11, 31).getTime();
  const monthRangeArr = getDateRangeArr(disabledDateObj, minDateTime, maxDateTime);
  const monthArr = [];
  monthRangeArr.forEach((item) => {
    let { start, end } = item;
    start = new Date(start);
    end = new Date(end);

    const monthStart = start.getMonth();
    const monthEnd = end.getMonth();
    const dayStart = start.getDate();
    const dayEnd = new Date(end.getTime() + 86400000).getDate();
    if (dayStart === 1) {
      if (dayEnd === 1) {
        for (let i = monthStart; i <= monthEnd; i++) {
          monthArr.push(i);
        }
      } else {
        for (let i = monthStart; i < monthEnd; i++) {
          monthArr.push(i);
        }
      }
    }
    if (dayEnd === 1) {
      for (let i = monthStart + 1; i <= monthEnd; i++) {
        monthArr.push(i);
      }
    } else {
      for (let i = monthStart + 1; i < monthEnd; i++) {
        monthArr.push(i);
      }
    }
  });
  return arr.filter((item) => {
    const month = item.value;
    return monthArr.indexOf(month) === -1;
  });
}
902646
def match_filter(filter, item)
      filter.each_pair do |key, value|
        unless item.key?(key)
          return false
        end
        unless value.is_a?(Array)
          return false if value != item[key]
        else
          return true if value.empty?
          return false unless value.include?(item[key])
        end
      end
      true
    end