Comparing version 0.0.64 to 0.0.65
{ | ||
"name": "turf", | ||
"version": "0.0.64", | ||
"version": "0.0.65", | ||
"description": "a node.js library for performing geospatial operations with geojson", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -49,2 +49,3 @@ turf | ||
- combine | ||
- remove | ||
- distance | ||
@@ -77,3 +78,2 @@ - buffer | ||
- intersect | ||
- remove | ||
- union | ||
@@ -312,2 +312,18 @@ - erase | ||
**remove** | ||
Removes any features from a feature collection that match a property value. | ||
```javascript | ||
var t = require('turf') | ||
var trees = t.featurecollection([t.point(1,2, {species: 'oak'}), t.point(2,1, {species: 'dogwood'}), t.point(3,1, {species: 'maple'})]) | ||
t.remove(points, 'species', 'dogwood', function(err, result) { | ||
if(err) throw err | ||
console.log(result) | ||
}) | ||
``` | ||
**inside** | ||
@@ -314,0 +330,0 @@ |
@@ -1,8 +0,16 @@ | ||
var t = require('../lib/remove') | ||
var t = require('../index') | ||
, should = require('should'); | ||
describe('remove', function(){ | ||
xit('should ', function(done){ | ||
throw new Error('not implemented') | ||
done() | ||
it('should return 3', function(done){ | ||
var points = t.featurecollection([t.point(1,2, {team: 'Red Sox'}), t.point(2,1, {team: 'Yankees'}), t.point(3,1, {team: 'Nationals'}), t.point(2,2, {team: 'Yankees'}), t.point(2,3, {team: 'Red Sox'}), t.point(4,2, {team: 'Yankees'})]) | ||
t.remove(points, 'team', 'Yankees', function(err, newCol) { | ||
//throw new Error('not implemented') | ||
if(err) throw err | ||
//console.log(newCol.features[0].properties); | ||
console.log(newCol.features.length) | ||
newCol.features.length.should.equal(3) | ||
done() | ||
}) | ||
}) | ||
}) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
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
1033200
116
11874
594