⚠️ LoopBack 3 is in Maintenance LTS mode, only critical bugs and critical security fixes will be provided. (See Module Long Term Support Policy below.)
We urge all LoopBack 3 users to migrate their applications to LoopBack 4 as soon as possible. Refer to our Migration Guide for more information on how to upgrade.
This module implements LoopBack style filtering without any dependencies on LoopBack.
$ npm install loopback-filters
Below is a basic example using the module
var applyFilter = ;var data = foo: 'bar' bat: 'baz' foo: 'bar';var filter = where: foo: 'bar';var filtered = ;console;
The output would be:
foo: 'bar' foo: 'bar'
// return items where
Only include objects that match the specified where clause. See full list of supported operators.
Sort objects by distance to a specified
Sort objects by one or more properties.
Limit the results to a specified number. Skip a specified number of results.
Include or exclude a set of fields in the result.
Note: Inclusion from loopback is not supported!
See the LoopBack docs for the filter syntax.
Module Long Term Support Policy
This module adopts the Module Long Term Support (LTS) policy, with the following End Of Life (EOL) dates:
|1.x||Maintenance LTS||Dec 2017||Dec 2020|
Learn more about our LTS plan in docs.