Class: FiltersByDomain

(package) FiltersByDomain(entriesopt, nullable)

A FiltersByDomain object contains a set of domains, each mapped to a set of filters along with a boolean value for each filter indicating whether the filter should be applied to the domain.

Constructor

(package) new FiltersByDomain(entriesopt, nullable)

Creates a FiltersByDomain object.
Parameters:
Name Type Attributes Description
entries Array.<Array> <optional>
<nullable>
The initial entries in the object.
Source:

Members

size

Returns the number of domains in the object.
Source:

Methods

add(filter, domainsopt)

Adds a filter and all of its domains to the object.
Parameters:
Name Type Attributes Description
filter ActiveFilter The filter.
domains Map.<string, boolean> <optional>
The filter's domains. If not given, the domains property of filter is used.
Source:

clear()

Removes all the domains in the object.
Source:

entries() → {object}

Yields all the domains in the object along with a set of filters for each domain, each filter in turn mapped to a boolean value indicating whether the filter should be applied to the domain.
Source:
Returns:
An iterator that yields a two-tuple containing a string and either a FilterMap object or a single ActiveFilter object. In the latter case, it directly indicates that the filter should be applied.
Type
object

get(key) → {FilterMap|ActiveFilter|undefined}

Returns a set of filters for the domain referenced by the given key, along with a boolean value for each filter indicating whether the filter should be applied to the domain.
Parameters:
Name Type Description
key string The domain.
Source:
Returns:
Either a FilterMap object or a single ActiveFilter object. In the latter case, it directly indicates that the filter should be applied. If this FiltersByDomain object does not contain the domain referenced by key, the return value is undefined.
Type
FilterMap | ActiveFilter | undefined

has(key) → {boolean}

Returns a boolean value asserting whether the object contains the domain referenced by the given key.
Parameters:
Name Type Description
key string The domain.
Source:
Returns:
Whether the object contains the domain referenced by key.
Type
boolean

remove(filter, domainsopt)

Removes a filter and all of its domains from the object.
Parameters:
Name Type Attributes Description
filter ActiveFilter The filter.
domains Map.<string, boolean> <optional>
The filter's domains. If not given, the domains property of filter is used.
Source: