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

winnow

Package Overview
Dependencies
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winnow - npm Package Compare versions

Comparing version 1.12.3 to 1.12.4

5

CHANGELOG.md

@@ -5,2 +5,6 @@ # Change Log

## [1.12.4] - 10-5-2017
### Changed
* Add metadata.limitExceeded true/false on limit queries to denote whether the limit restricted the number of features returned
## [1.12.3] - 09-22-2017

@@ -213,2 +217,3 @@ ### Fixed

[1.12.4]: https://github.com/featureserver/winnow/compare/v1.12.3...v1.12.4
[1.12.3]: https://github.com/featureserver/winnow/compare/v1.12.2...v1.12.3

@@ -215,0 +220,0 @@ [1.12.2]: https://github.com/featureserver/winnow/compare/v1.12.1...v1.12.2

13

dist/executeQuery.js

@@ -34,2 +34,3 @@ 'use strict'

var filtered = []
var limitExceeded = false
if (options.offset) {

@@ -42,4 +43,14 @@ if (options.offset >= features.length) { throw new Error('OFFSET >= features length: ' + options) }

if (result) { filtered.push(result) }
return filtered.length === options.limit
if (filtered.length === (options.limit + 1)) {
limitExceeded = true
return true
}
})
if (limitExceeded) { filtered = filtered.slice(0, -1) }
if (options.collection) {
options.collection.metadata = Object.assign({}, options.collection.metadata, { limitExceeded: limitExceeded })
}
return finishQuery(filtered, options)

@@ -46,0 +57,0 @@ }

6

package.json
{
"name": "winnow",
"version": "1.12.3",
"version": "1.12.4",
"description": "Apply sql-like filters to GeoJSON",

@@ -42,7 +42,7 @@ "main": "dist/index.js",

"proj4": "^2.3.17",
"simple-statistics": "^4.1.1",
"simple-statistics": "^5.0.0",
"terraformer": "^1.0.7"
},
"devDependencies": {
"buble": "^0.15.2",
"buble": "^0.16.0",
"feature-parser": "^1.0.1",

@@ -49,0 +49,0 @@ "standard": "^10.0.1",

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