new DocumentFilter(accepts)
Constructs a new document filter, from an acceptation function.
Parameters:
Name | Type | Description |
---|---|---|
accepts | cbAccepts | The function responsible to filter the documents. It must evaluate wether a document is acceptable according to the filter. |
Classes
Members
accepts :cbAccepts
The function responsible to filter the documents. It must evaluate wether a document is acceptable according to the filter.
Type:
Methods
apply(documents) → {Array.<Document>}
Applies the filter to the documents.
Parameters:
Name | Type | Description |
---|---|---|
documents | Array.<Document> | The documents to filter. |
Returns:
An array of filtered documents
- Type:
- Array.<Document>