turf-filter
Advanced tools
Comparing version 0.1.2 to 1.0.0
@@ -1,2 +0,2 @@ | ||
var featureCollection = require('turf-featurecollection') | ||
var featureCollection = require('turf-featurecollection'); | ||
@@ -7,6 +7,6 @@ module.exports = function(collection, key, val) { | ||
if(collection.features[i].properties[key] === val) { | ||
newFC.features.push(collection.features[i]) | ||
newFC.features.push(collection.features[i]); | ||
} | ||
} | ||
return newFC | ||
return newFC; | ||
} |
{ | ||
"name": "turf-filter", | ||
"version": "0.1.2", | ||
"version": "1.0.0", | ||
"description": "turf filter module", | ||
@@ -25,9 +25,10 @@ "main": "index.js", | ||
"devDependencies": { | ||
"tape": "^2.13.3", | ||
"turf-featurecollection": "^0.1.0", | ||
"turf-point": "^0.1.1" | ||
"benchmark": "^1.0.0", | ||
"tape": "^3.0.3", | ||
"turf-featurecollection": "^1.0.0", | ||
"turf-point": "^1.2.0" | ||
}, | ||
"dependencies": { | ||
"turf-featurecollection": "^0.1.0" | ||
"turf-featurecollection": "^1.0.0" | ||
} | ||
} |
18
test.js
@@ -1,8 +0,8 @@ | ||
var test = require('tape') | ||
var filter = require('./') | ||
var featureCollection = require('turf-featurecollection') | ||
var point = require('turf-point') | ||
var test = require('tape'); | ||
var filter = require('./'); | ||
var featureCollection = require('turf-featurecollection'); | ||
var point = require('turf-point'); | ||
test('remove', function(t){ | ||
t.plan(2) | ||
t.plan(2); | ||
@@ -15,8 +15,8 @@ var points = featureCollection( | ||
point(2,3, {team: 'Red Sox'}), | ||
point(4,2, {team: 'Yankees'})]) | ||
point(4,2, {team: 'Yankees'})]); | ||
newFC = filter(points, 'team', 'Nationals') | ||
newFC = filter(points, 'team', 'Nationals'); | ||
t.equal(newFC.features.length, 1, 'should filter all but 1 feature') | ||
t.equal(newFC.features[0].properties.team, 'Nationals', 'feature team property should be Nationals') | ||
t.equal(newFC.features.length, 1, 'should filter all but 1 feature'); | ||
t.equal(newFC.features[0].properties.team, 'Nationals', 'feature team property should be Nationals'); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
5001
8
47
0
4
1
+ Addedturf-featurecollection@1.0.1(transitive)
- Removedturf-featurecollection@0.1.0(transitive)