Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@nextgis/properties-filter
Advanced tools
An auxiliary library that allows filtering objects by its properties using JSON-serializable expressions
# latest stable
$ npm install --save-dev @nextgis/properties-filter
# or
$ yarn add @nextgis/properties-filter
General view of expression
[ С , [E1] , [E2] , [EN] ]
С - condition (optional). May be 'all' or 'any';
E - expression:
[key, operator, value]
gt
, lt
, ge
, le
, eq
, ne
, in
, notin
, like
, ilike
;in
and notin
:
[['id', 'in', [1,2,3]], ['id', 'notin', [1,2,3]]]
like
and ilike
:
Place `%`-character after or before `key` string to determine the direction of search.
- ['str%', 'like', 'hello']
- ['%str%', 'ilike', 'Worl']
Nesting
[ [E1], ['any', [E2], [E3, E4] ], ['any', [E5], [E6] ] ] ]
import { propertiesFilter, featureFilter } from '@nextgis/properties-filter';
const properties = {
place: 'Tofalaria',
area: 21
};
propertiesFilter(properties, [['name', 'eq', 'Tofalaria']]);
propertiesFilter(properties, [['name', 'in', ['Tofalaria', 'Siberia']]]);
propertiesFilter(properties, [['name%', 'like', 'Tof']]);
propertiesFilter(properties, [['name', 'eq', 'Tofalaria'], ['area', 'ge', 21]]);
propertiesFilter(properties, ['any', ['name', 'eq', 'Siberia'], ['area', 'gt', 10]]);
Need to fix a bug or add a feature to @nextgis/properties-filter
? We provide custom development and support for this software. Contact us to discuss options!
FAQs
Filtering objects by its properties using expressions
The npm package @nextgis/properties-filter receives a total of 43 weekly downloads. As such, @nextgis/properties-filter popularity was classified as not popular.
We found that @nextgis/properties-filter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.