Internal function. The node whatToShow and the filter are combined into
one result.
3253
private short acceptNode(Node node) {
		/***
		 * 7.1.2.4. Filters and whatToShow flags
		 * 
		 * Iterator and TreeWalker apply whatToShow flags before applying
		 * Filters. If a node is rejected by the active whatToShow flags, a
		 * Filter will not be called to evaluate that node. When a node is
		 * rejected by the active whatToShow flags, children of that node will
		 * still be considered, and Filters may be called to evaluate them.
		 ***/

		if ((whatToShow & (1 << node.getNodeType() - 1)) != 0)
			return NodeFilter.FILTER_ACCEPT;
		else
			return NodeFilter.FILTER_SKIP;
	}
1068929
protected void applyFilter (SiteNode node) {
    	if (filter != null) {
    		boolean filtered = this.setFilter(filter, node);
    		SiteNode parent = node.getParent();
    		if (parent != null && ! filtered && parent.isFiltered()) {
    			// This node is no longer filtered but its parent is, unfilter the parent so it becomes visible
    			this.clearParentFilter(parent);
    		}
    	} else {
    		node.setFiltered(false);
    	}
	}
568881
function (data) {
    // Add the filter to the filtered collection and fetch it with the filter
    this.filteredCollection.setFilter(data)

    // Only re-fetch if it's another chart (since this view doesn't filter itself)
    if (data.field !== this.filteredCollection.getTriggerField()) {
      this.filteredCollection.fetch()
    // If it's this chart and the filter is being removed, re-render the chart
    } else if (!data.expression) {
      this.render()
    }

    this.renderFilters()
  }
796753
function filter(callback) {
        var filteredMatches = [];

        each(function (match, i) {
          if (callback(match, i)) {
            filteredMatches.push(match);
          }
        });

        matches = filteredMatches;

        /*jshint validthis:true*/
        return this;
      }
514448
function checkShow(){
  /**
   * Checks visibility of an element on a page in a browser
   * @param {HTMLElement} element some DOM node
   * @private
   * @return {boolean}
   */
  function isVisible(element){
    if (getComputedStyle(element, 'visibility') != 'visible')
      return false;

    var box = getBoundingRect(element);

    if (!box.width || !box.height)
      return false;

    return true;
  }

  var list = getSelectorList(SHOW_EVENT);

  for (var i = 0; i < list.length; i++)
  {
    var selector = list[i];
    var elements = document.querySelectorAll(getCssSelectorFromPath(selector.selector, true));
    var visibleElement = basis.array.search(basis.array(elements), true, isVisible);
    var visible = Boolean(visibleElement);
    var state;

    if (!hasOwnProperty.call(list.visible, selector.selectorStr))
      state = list.visible[selector.selectorStr] = false;
    else
      state = list.visible[selector.selectorStr];

    list.visible[selector.selectorStr] = visible;

    if (state == false && visible)
      track({
        type: 'ui',
        path: stringifyPath(getPathByNode(visibleElement)),
        selector: selector.selectorStr,
        event: SHOW_EVENT,
        data: selector.data
      });
  }
}
605367
public Node filter(NodeFilter nodeFilter) {
        Validate.notNull(nodeFilter);
        NodeTraversor.filter(nodeFilter, this);
        return this;
    }
463709
function() {

      var elementFilter = this.options.filterElements
      var forceContext = this.options.forceContext
      return getText(this.node)
      /**
       * Gets aggregate text of a node without resorting
       * to broken innerText/textContent
       */
      function getText(node, txt) {

        if (node.nodeType === 3) {
          return [node.data]
        }

        if (elementFilter && !elementFilter(node)) {
          return []
        }

        var txt = ['']
        var i = 0
        if (node = node.firstChild) do {

          if (node.nodeType === 3) {
            txt[i] += node.data
            continue
          }

          var innerText = getText(node)
          if (
            forceContext &&
            node.nodeType === 1 &&
            (forceContext === true || forceContext(node))
          ) {
            txt[++i] = innerText
            txt[++i] = ''
          } else {
            if (typeof innerText[0] === 'string') {
              // Bridge nested text-node data so that they're
              // not considered their own contexts:
              // I.e. ['some', ['thing']] -> ['something']
              txt[i] += innerText.shift()
            }
            if (innerText.length) {
              txt[++i] = innerText
              txt[++i] = ''
            }
          }
        } while (node = node.nextSibling)
        return txt
      }
      
    }
380858
function filterOptions(options, filter, substitutions) {
    // If the filter is blank, return the full list of Options.
    if (!filter) {
        return options;
    }

    var cleanFilter = cleanUpText(filter, substitutions);
    return options
    // Filter out undefined or null Options.
    .filter(function (_ref) {
        var label = _ref.label,
            value = _ref.value;
        return label != null && value != null;
    })
    // Create a {score, Option} pair for each Option based on its label's
    // similarity to the filter text.
    .map(function (option) {
        return {
            option: option,
            score: typeaheadSimilarity(cleanUpText(option.label, substitutions), cleanFilter)
        };
    })
    // Only include matches of the entire substring, with a slight
    // affordance for transposition or extra characters.
    .filter(function (pair) {
        return pair.score >= cleanFilter.length - 2;
    })
    // Sort 'em by order of their score.
    .sort(function (a, b) {
        return b.score - a.score;
    })
    // …and grab the original Options back from their pairs.
    .map(function (pair) {
        return pair.option;
    });
}
69261
function parseChannel(channel){
        var parts = _.without(channel.split('/'), ''),
            filter = {};

        _.each(parts, function(item, index){
            if(index % 2 === 0) {
                filter[item] = parts[index + 1];
            }
        });

        if(!_.isUndefined(filter.node)){
            filters.nodes.push(filter.node);
        }

        if(!_.isUndefined(filter.system)){
            filters.system.push(filter.system);
        }

        if(!_.isUndefined(filter.type)){
            filters.types.push(filter.type);
        }

        if(!_.isUndefined(filter.contentid)){
            filters.contentids.push(filter.contentid);
        }
    }
204040
function filter( node ) {
	var isNullable;
	var isOptional;
	var type;
	var desc;
	var val;

	if ( node.type ) {
		if ( node.type.names.length === 1 ) {
			type = node.type.names[ 0 ];
		} else {
			type = node.type.names;
		}
	} else {
		type = '';
	}
	desc = node.description || '';
	if ( hasOwn.call( node, 'defaultvalue' ) ) {
		val = node.defaultvalue;
	} else {
		val = '';
	}
	if ( typeof node.optional === 'boolean' ) {
		isOptional = node.optional;
	} else {
		isOptional = '';
	}
	if ( typeof node.nullable === 'boolean' ) {
		isNullable = node.nullable;
	} else {
		isNullable = '';
	}
	return {
		'name': node.name,
		'type': type,
		'description': desc,
		'default': val,
		'optional': isOptional,
		'nullable': isNullable
	};
}
986653
@SuppressWarnings("checkstyle:npathcomplexity")
    @Override
    public int doFilter(EventFilter filter, Data dataKey, Object oldValue, Object dataValue, EntryEventType eventType,
                        String mapNameOrNull) {
        if (filter instanceof MapPartitionLostEventFilter) {
            return FILTER_DOES_NOT_MATCH;
        }

        // the order of the following ifs is important!
        // QueryEventFilter is instance of EntryEventFilter
        if (filter instanceof EventListenerFilter) {
            if (!filter.eval(eventType.getType())) {
                return FILTER_DOES_NOT_MATCH;
            } else {
                filter = ((EventListenerFilter) filter).getEventFilter();
            }
        }
        if (filter instanceof TrueEventFilter) {
            return eventType.getType();
        }
        if (filter instanceof QueryEventFilter) {
            return processQueryEventFilter(filter, eventType, dataKey, oldValue, dataValue, mapNameOrNull)
                    ? eventType.getType() : FILTER_DOES_NOT_MATCH;
        }
        if (filter instanceof EntryEventFilter) {
            return processEntryEventFilter(filter, dataKey) ? eventType.getType() : FILTER_DOES_NOT_MATCH;
        }
        throw new IllegalArgumentException("Unknown EventFilter type = [" + filter.getClass().getCanonicalName() + "]");
    }
85915
private static List<ShowInfo> processShowInfo(String searchUrl, String tagName) throws TVRageException {
        List<ShowInfo> showList = new ArrayList<>();
        ShowInfo showInfo;

        Document doc = getDocFromUrl(searchUrl);
        NodeList nlShowInfo = doc.getElementsByTagName(tagName);

        if (nlShowInfo == null || nlShowInfo.getLength() == 0) {
            return showList;
        }

        for (int loop = 0; loop < nlShowInfo.getLength(); loop++) {
            Node nShowInfo = nlShowInfo.item(loop);
            if (nShowInfo.getNodeType() == Node.ELEMENT_NODE) {
                Element eShowInfo = (Element) nShowInfo;
                showInfo = parseNextShowInfo(eShowInfo);
                showList.add(showInfo);
            }
        }

        return showList;
    }
241012
def filter(parent, indent)
      return unless (filter_name = accept :filter)

      # Get element attributes
      atts = attributes(shorthand_attributes) || {}

      # Accept inline text or multiline text feed as first child
      error :fiter unless accept(:line_feed).strip.empty?

      # Get everything under the filter and set it as the node value
      # and create a new node and set its extension
      parent[@children] << [
        :filter,
        filter_name[1..-1].to_sym,
        atts,
        get_indented_lines(indent),
        indent
      ]
    end
84179
function( node, options ) {
			var classes,
				i;

			if(!node){
				return false;
			}

			// if documemt gets topmost node
			node = modules.domUtils.getTopMostNode( node );

			// look for h-* microformats
			classes = this.getUfClassNames(node);
			if(options && options.filters && modules.utils.isArray(options.filters)){
				i = options.filters.length;
				while(i--) {
					if(classes.root.indexOf(options.filters[i]) > -1){
						return true;
					}
				}
				return false;
			}else{
				return (classes.root.length > 0);
			}
		}
1274821
function filterContent(element, conditions) {
    return lodash.chain(element)
      .get('content')
      .filter(conditions)
      .value();
  }
325149
function(filterFunc) {
    filterFunc = filterFunc || goog.functions.TRUE;
    return function(root, ret, bag) {
      var te, x = 0, tret = root[childNodesName];
      while (te = tret[x++]) {
        if (
          simpleNodeTest(te) &&
          (!bag || _isUnique(te, bag)) &&
          (filterFunc(te, x))
        ) {
          ret.push(te);
        }
      }
      return ret;
    };
  }
750638
function (e) {
    // console.log('Filtered by', (new Date(e.start)).toISOString(), (new Date(e.end)).toISOString())
    var field = this.collection.getTriggerField()

    var start = new Date(e.start)
    var startIso = trimLastCharacter(start.toISOString())
    var startFriendly = start.toLocaleDateString()

    var end = new Date(e.end)
    var endIso = trimLastCharacter(end.toISOString())
    var endFriendly = end.toLocaleDateString()

    // Trigger the global event handler with this filter
    this.vent.trigger(this.collection.getDataset() + '.filter', {
      field: field,
      expression: {
        type: 'and',
        value: [
          {
            type: '>=',
            value: startIso,
            label: startFriendly
          },
          {
            type: '<=',
            value: endIso,
            label: endFriendly
          }
        ]
      }
    })
  }