Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nextgis/properties-filter

Package Overview
Dependencies
Maintainers
3
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextgis/properties-filter - npm Package Compare versions

Comparing version 0.32.0 to 1.0.0-alpha.0

index.js

55

CHANGELOG.md

@@ -6,4 +6,15 @@ # Change Log

# [0.32.0](https://github.com/nextgis/nextgisweb_frontend/compare/v0.31.0...v0.32.0) (2020-06-03)
# [1.0.0-alpha.0](https://github.com/nextgis/nextgis_frontend/compare/v0.32.0...v1.0.0-alpha.0) (2020-07-24)
### Bug Fixes
* **properties-filter:** add field type check for like\ilike filter ([55f5c23](https://github.com/nextgis/nextgis_frontend/commit/55f5c23c252f6ee1f8cd34207bdaeb43610e68fb))
# [0.32.0](https://github.com/nextgis/nextgis_frontend/compare/v0.31.0...v0.32.0) (2020-06-03)
**Note:** Version bump only for package @nextgis/properties-filter

@@ -15,3 +26,3 @@

# [0.31.0](https://github.com/nextgis/nextgisweb_frontend/compare/v0.30.2...v0.31.0) (2020-05-13)
# [0.31.0](https://github.com/nextgis/nextgis_frontend/compare/v0.30.2...v0.31.0) (2020-05-13)

@@ -24,3 +35,3 @@ **Note:** Version bump only for package @nextgis/properties-filter

## [0.30.1](https://github.com/nextgis/nextgisweb_frontend/compare/v0.30.0...v0.30.1) (2020-04-30)
## [0.30.1](https://github.com/nextgis/nextgis_frontend/compare/v0.30.0...v0.30.1) (2020-04-30)

@@ -33,3 +44,3 @@ **Note:** Version bump only for package @nextgis/properties-filter

# [0.30.0](https://github.com/nextgis/nextgisweb_frontend/compare/v0.29.11...v0.30.0) (2020-04-23)
# [0.30.0](https://github.com/nextgis/nextgis_frontend/compare/v0.29.11...v0.30.0) (2020-04-23)

@@ -42,3 +53,3 @@ **Note:** Version bump only for package @nextgis/properties-filter

## [0.29.11](https://github.com/nextgis/nextgisweb_frontend/compare/v0.29.10...v0.29.11) (2020-04-22)
## [0.29.11](https://github.com/nextgis/nextgis_frontend/compare/v0.29.10...v0.29.11) (2020-04-22)

@@ -51,3 +62,3 @@ **Note:** Version bump only for package @nextgis/properties-filter

## [0.29.5](https://github.com/nextgis/nextgisweb_frontend/compare/v0.29.4...v0.29.5) (2020-04-15)
## [0.29.5](https://github.com/nextgis/nextgis_frontend/compare/v0.29.4...v0.29.5) (2020-04-15)

@@ -57,3 +68,3 @@

* eslint no-dupe off; object utils; propertiesFilter generic ([20200e7](https://github.com/nextgis/nextgisweb_frontend/commit/20200e79a3c7e8e45f51e6999864b9fde47d9b54))
* eslint no-dupe off; object utils; propertiesFilter generic ([20200e7](https://github.com/nextgis/nextgis_frontend/commit/20200e79a3c7e8e45f51e6999864b9fde47d9b54))

@@ -64,3 +75,3 @@

## [0.29.4](https://github.com/nextgis/nextgisweb_frontend/compare/v0.29.3...v0.29.4) (2020-04-10)
## [0.29.4](https://github.com/nextgis/nextgis_frontend/compare/v0.29.3...v0.29.4) (2020-04-10)

@@ -73,3 +84,3 @@ **Note:** Version bump only for package @nextgis/properties-filter

## [0.29.3](https://github.com/nextgis/nextgisweb_frontend/compare/v0.29.2...v0.29.3) (2020-04-02)
## [0.29.3](https://github.com/nextgis/nextgis_frontend/compare/v0.29.2...v0.29.3) (2020-04-02)

@@ -82,3 +93,3 @@ **Note:** Version bump only for package @nextgis/properties-filter

## [0.29.2](https://github.com/nextgis/nextgisweb_frontend/compare/v0.29.1...v0.29.2) (2020-04-01)
## [0.29.2](https://github.com/nextgis/nextgis_frontend/compare/v0.29.1...v0.29.2) (2020-04-01)

@@ -91,3 +102,3 @@ **Note:** Version bump only for package @nextgis/properties-filter

## [0.29.1](https://github.com/nextgis/nextgisweb_frontend/compare/v0.29.0...v0.29.1) (2020-03-30)
## [0.29.1](https://github.com/nextgis/nextgis_frontend/compare/v0.29.0...v0.29.1) (2020-03-30)

@@ -97,3 +108,3 @@

* **build:** control-container extract css ([05d96c8](https://github.com/nextgis/nextgisweb_frontend/commit/05d96c8a4f4861a666244139a5903b2deb34194b))
* **build:** control-container extract css ([05d96c8](https://github.com/nextgis/nextgis_frontend/commit/05d96c8a4f4861a666244139a5903b2deb34194b))

@@ -104,3 +115,3 @@

# [0.29.0](https://github.com/nextgis/nextgisweb_frontend/compare/v0.28.3...v0.29.0) (2020-03-22)
# [0.29.0](https://github.com/nextgis/nextgis_frontend/compare/v0.28.3...v0.29.0) (2020-03-22)

@@ -110,4 +121,4 @@

* **properties-filte:** allow any chars for `like` and `ilike` search ([6b5b60d](https://github.com/nextgis/nextgisweb_frontend/commit/6b5b60d7985abb01093b649073c6e0a088f7fe0e))
* **properties-filter:** repair like and ilike operations ([ff208e0](https://github.com/nextgis/nextgisweb_frontend/commit/ff208e00f52fb592df32af95a6bd0cfdf04dfb65))
* **properties-filte:** allow any chars for `like` and `ilike` search ([6b5b60d](https://github.com/nextgis/nextgis_frontend/commit/6b5b60d7985abb01093b649073c6e0a088f7fe0e))
* **properties-filter:** repair like and ilike operations ([ff208e0](https://github.com/nextgis/nextgis_frontend/commit/ff208e00f52fb592df32af95a6bd0cfdf04dfb65))

@@ -117,3 +128,3 @@

* build; eslint ([97e3b07](https://github.com/nextgis/nextgisweb_frontend/commit/97e3b07da07b57373e6861ab6e2d6f9b60a6ec2c))
* build; eslint ([97e3b07](https://github.com/nextgis/nextgis_frontend/commit/97e3b07da07b57373e6861ab6e2d6f9b60a6ec2c))

@@ -129,3 +140,3 @@

## [0.28.3](https://github.com/nextgis/nextgisweb_frontend/compare/v0.28.2...v0.28.3) (2020-03-19)
## [0.28.3](https://github.com/nextgis/nextgis_frontend/compare/v0.28.2...v0.28.3) (2020-03-19)

@@ -135,3 +146,3 @@

* add library `@nextgis/paint` ([99391ec](https://github.com/nextgis/nextgisweb_frontend/commit/99391ec1ac9fd80508816417d9eb2ae0fd734340))
* add library `@nextgis/paint` ([99391ec](https://github.com/nextgis/nextgis_frontend/commit/99391ec1ac9fd80508816417d9eb2ae0fd734340))

@@ -142,3 +153,3 @@

## [0.28.1](https://github.com/nextgis/nextgisweb_frontend/compare/v0.28.0...v0.28.1) (2020-03-12)
## [0.28.1](https://github.com/nextgis/nextgis_frontend/compare/v0.28.0...v0.28.1) (2020-03-12)

@@ -151,3 +162,3 @@ **Note:** Version bump only for package @nextgis/properties-filter

# [0.28.0](https://github.com/nextgis/nextgisweb_frontend/compare/v0.27.1...v0.28.0) (2020-03-12)
# [0.28.0](https://github.com/nextgis/nextgis_frontend/compare/v0.27.1...v0.28.0) (2020-03-12)

@@ -157,4 +168,4 @@

* **cesium:** geojson adapter paint ([657b411](https://github.com/nextgis/nextgisweb_frontend/commit/657b411f1efb9835ff9f9255c47424179e3b3caa))
* add library `@nextgis/properties-filter` ([0902366](https://github.com/nextgis/nextgisweb_frontend/commit/09023669c963ddb4e0a319400397e5f320620573))
* **cesium:** geojson adapter paint ([657b411](https://github.com/nextgis/nextgis_frontend/commit/657b411f1efb9835ff9f9255c47424179e3b3caa))
* add library `@nextgis/properties-filter` ([0902366](https://github.com/nextgis/nextgis_frontend/commit/09023669c963ddb4e0a319400397e5f320620573))

@@ -161,0 +172,0 @@

40

lib/index.d.ts

@@ -1,1 +0,39 @@

export * from './propertiesFilter';
import { Feature } from 'geojson';
import { GeoJsonProperties } from 'geojson';
export declare function checkIfPropertyFilter(filter: PropertyFilter | PropertiesFilter | string): filter is PropertyFilter;
export declare function featureFilter(feature: Feature, filters: PropertiesFilter): boolean;
/**
* gt - greater (\>)
* lt - lower (\<)
* ge - greater or equal (\>=)
* le - lower or equal (\<=)
* eq - equal (=)
* ne - not equal (!=)
* like - LIKE SQL statement (for strings compare)
* ilike - ILIKE SQL statement (for strings compare)
*/
export declare type Operations = 'gt' | 'lt' | 'ge' | 'le' | 'eq' | 'ne' | 'in' | 'notin' | 'like' | 'ilike';
export declare const operationsAliases: {
[key in Operations]: (a: any, b: any) => boolean;
};
declare type Properties = GeoJsonProperties;
export declare type PropertiesFilter<T extends Properties = Properties> = ('all' | 'any' | PropertyFilter<T> | PropertiesFilter<T>)[];
export declare function propertiesFilter(properties: {
[field: string]: any;
}, filters: PropertiesFilter): boolean;
/**
* field, operation, value
* ['foo', 'eq', 'bar']
* ['count', 'ge', 20]
*/
export declare type PropertyFilter<T extends Properties = Properties> = [keyof T | string, Operations, any];
export { }
{
"name": "@nextgis/properties-filter",
"version": "0.32.0",
"version": "1.0.0-alpha.0",
"description": "Filtering objects by its properties using expressions",
"main": "lib/properties-filter.js",
"unpkg": "lib/properties-filter.js",
"main": "index.js",
"module": "lib/properties-filter.esm-bundler.js",
"unpkg": "lib/properties-filter.global.prod.js",
"jsdelivr": "lib/properties-filter.global.prod.js",
"types": "lib/index.d.ts",
"dependencies": {
"@nextgis/utils": "^1.0.0-alpha.0",
"geojson": "^0.5.0"
},
"devDependencies": {
"@nextgis/build-tools": "^0.32.0"
"@nextgis/build-tools": "^1.0.0-alpha.0"
},
"buildOptions": {
"name": "PropertiesFilter",
"formats": [
"esm-bundler",
"esm-browser",
"cjs",
"global"
]
},
"scripts": {
"clean": "rimraf ./lib",
"dev": "npm run clean && webpack --config ./webpack.config.js --progress",
"build": "npm run dev -- --mode=production",
"prod": "npm run build",
"dev": "node ../build-tools/lib/build.js",
"prod": "npm run dev -- --release",
"lint": "eslint ./src/**/*.ts --fix --c ../../.eslintrc",

@@ -24,24 +38,16 @@ "watch": "npm run dev -- --watch"

"author": "NextGIS",
"directories": {
"lib": "lib"
},
"files": [
"index.js",
"lib"
],
"license": "LGPL-3.0",
"publishConfig": {
"registry": "http://registry.npmjs.org/"
},
"homepage": "https://github.com/nextgis/nextgis_frontend/tree/master/packages/properties-filter#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/nextgis/nextgisweb_frontend.git"
"url": "git+https://github.com/nextgis/nextgis_frontend.git"
},
"bugs": {
"url": "https://github.com/nextgis/nextgisweb_frontend/issues"
"url": "https://github.com/nextgis/nextgis_frontend/issues"
},
"dependencies": {
"@nextgis/utils": "^0.32.0",
"geojson": "^0.5.0"
},
"gitHead": "1aad86f16ee21b2ea87a5bfce98ecf9dad74e01f"
"gitHead": "ef19464a2682daf2ce99a1a41996eb68f4426a41"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc