![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
loopback-filters
Advanced tools
⚠️ 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 = require('loopback-filters');
var data = [{foo: 'bar'}, {bat: 'baz'}, {foo: 'bar'}];
var filter = {where: {foo: 'bar'}};
var filtered = applyFilter(data, filter);
console.log(filtered);
The output would be:
[{foo: 'bar'}, {foo: 'bar'}]
// return items where
applyFilter({
where: {
// the price > 10 && price < 100
and: [
{
price: {
gt: 10
}
},
{
price: {
lt: 100
}
},
],
// match Mens Shoes and Womens Shoes and any other type of Shoe
category: {like: '.* Shoes'},
// the status is either in-stock or available
status: {inq: ['in-stock', 'available']}
}
})
Only include objects that match the specified where clause. See full list of supported operators.
applyFilter(data, {
where: {
location: {near: '153.536,-28'}
},
limit: 10
})
Sort objects by distance to a specified GeoPoint
.
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.
This module adopts the Module Long Term Support (LTS) policy, with the following End Of Life (EOL) dates:
Version | Status | Published | EOL |
---|---|---|---|
1.x | Maintenance LTS | Dec 2017 | Dec 2020 |
Learn more about our LTS plan in docs.
FAQs
Apply LoopBack filters to Arrays
We found that loopback-filters demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.