lib/CalendarScheduler.js
/**
	 * Takes a predicate to filter this Calendar's events and returns a
	 * new, derived Calendar. Calls to refresh() have been overridden in
	 * the derived instance to await the underlying Calendar's refresh
	 * and apply the filter afterwards.
	 * 
	 * @deprecated use setFilter() and removeFilter() instead. This method
	 * will be removed in v3.x!
	 * @param {predicate1Arg.<Event|iCalEvent>} predicate Used to filter
	 * this Calendar's events using some criteria.
	 * @param {string} addName Used as a predicate to this Calendar's name
	 * or ID so that we end up with a new, unique name or ID. Must not be
	 * empty. The resulting name will be "calendar-name.addName".
	 * @returns {Calendar}
	 */
Takes a predicate to filter this Calendar's events and returns a
new, derived Calendar. Calls to refresh() have been overridden in
the derived instance to await the underlying Calendar's refresh
and apply the filter afterwards.

@deprecated use setFilter() and removeFilter() instead. This method
will be removed in v3.x.
@param {predicate1Arg.} predicate Used to filter
this Calendar's events using some criteria.
@param {string} addName Used as a predicate to this Calendar's name
or ID so that we end up with a new, unique name or ID. Must not be
empty. The resulting name will be "calendar-name.addName".
@returns {Calendar}
Takes a predicate to filter this Calendar ' s events and returns a new derived Calendar . Calls to refresh () have been overridden in the derived instance to await the underlying Calendar ' s refresh and apply the filter afterwards . @deprecated use setFilter () and removeFilter () instead . This method will be removed in v3 . x . @param { predicate1Arg . } predicate Used to filter this Calendar ' s events using some criteria . @param { string } addName Used as a predicate to this Calendar ' s name or ID so that we end up with a new unique name or ID . Must not be empty . The resulting name will be " calendar - name . addName " . @returns { Calendar }
createFiltered(predicate, addName = 'filtered') {
		if (typeof addName !== 'string' || addName.length === 0) {
			throw new Error(`The value "${addName}" given for the parameter name is not valid.`);
		}
		const that = this;
		return new class extends this.constructor {
			constructor() {
				super(`${that.nameOrId}.${addName}`, that.icsProvider, that.refreshInterval, that.isEnabled);
			};
			async refresh() {
				await super.refresh();
				this._events = this._events.filter(predicate);
				return this;
			};
		};
	}
createFiltered ( predicate , addName = 'filtered' ) { if ( typeof addName !== 'string' || addName . length === 0 ) { throw new Error ( ` ${ addName } ` ) ; } const that = this ; return new class extends this . constructor { constructor ( ) { super ( ` ${ that . nameOrId } ${ addName } ` , that . icsProvider , that . refreshInterval , that . isEnabled ) ; } ; async refresh ( ) { await super . refresh ( ) ; this . _events = this . _events . filter ( predicate ) ; return this ; } ; } ; }
Takes a predicate to filter this Calendar's events and returns a
 new, derived Calendar.
Takes a predicate to filter this Calendar ' s events and returns a new derived Calendar .
/**
			 * @override
			 */