Module: synchronizer

Classes

Synchronizer

Members

(static) synchronizer :module:synchronizer~Synchronizer

This object is responsible for downloading filter subscriptions whenever necessary.

Type:
Source:

Methods

(static) addSubscriptionFilters(subscription, filters, errorCallback)

Given a valid subscription and some text, it parses all filters and add these in bulk to the specified subscription.

Parameters:
Name Type Description
subscription module:subscriptionClasses.Subscription

The Subscription to use as reference for manually added filters.

filters string

The filters file/text to add.

errorCallback function

A callback invoked if errors occur.

Source:

(private, inner) processFilters(subscription, lines)

Given a list of parsed filters, normalize each line and update the subscription.

Parameters:
Name Type Description
subscription module:subscriptionClasses.Subscription

The Subscription to use as reference for manually added filters.

lines Array.<string>

The parsed filters lines. The first line will be skipped over as it is supposed to contain the header.

Source: