Class: Filter

filterClasses.Filter(text)

Abstract base class for filters

Constructor

new Filter(text)

Parameters:
Name Type Description
text string

string representation of the filter

Source:

Members

requiresPrivilegedSubscription :bool

True if filter should only be loaded if it comes from a privileged subscription (circumvention subscriptions or special subscriptions).

Type:
  • bool
Source:

type :string

Filter type as a string, e.g. "blocking".

Can be blocking, allowing, elemhide, elemhideexception, elemhideemulation, snippet, comment or invalid.

Type:
  • string
Source:

Methods

(static) fromObject(obj) → {module:filterClasses.Filter}

Deserializes a filter

Parameters:
Name Type Description
obj Object

map of serialized properties and their values

Source:
Returns:

filter or null if the filter couldn't be created

Type
module:filterClasses.Filter

(static) fromText(text) → {module:filterClasses.Filter}

Creates a filter of correct type from its text representation - does the basic parsing and calls the right constructor then.

Parameters:
Name Type Description
text string

as in Filter()\

Source:
Returns:
Type
module:filterClasses.Filter

(generator) serialize() → {string}

Serializes the filter for writing out on disk.

Source:
Yields:
Type
string