DocumentFilter

new DocumentFilter(accepts)

Constructs a new document filter, from an acceptation function.

Parameters:
NameTypeDescription
acceptscbAccepts

The function responsible to filter the documents. It must evaluate wether a document is acceptable according to the filter.

Classes

DocumentFilter

Members

accepts :cbAccepts

The function responsible to filter the documents. It must evaluate wether a document is acceptable according to the filter.

Methods

apply(documents) → {Array.<Document>}

Applies the filter to the documents.

Parameters:
NameTypeDescription
documentsArray.<Document>

The documents to filter.

Returns:

An array of filtered documents

Type: 
Array.<Document>