turf-combine
Advanced tools
Comparing version 0.1.1 to 1.0.0
16
index.js
module.exports = function(fc){ | ||
var type = fc.features[0].geometry.type | ||
var err | ||
var type = fc.features[0].geometry.type; | ||
var err; | ||
var geometries = fc.features.map(function(f){ | ||
return f.geometry | ||
return f.geometry; | ||
}) | ||
@@ -16,4 +16,4 @@ | ||
} | ||
} | ||
multiPoint.geometry.coordinates = pluckCoods(geometries) | ||
}; | ||
multiPoint.geometry.coordinates = pluckCoods(geometries); | ||
return multiPoint; | ||
@@ -28,3 +28,3 @@ break | ||
} | ||
} | ||
}; | ||
multiLineString.geometry.coordinates = pluckCoods(geometries) | ||
@@ -40,3 +40,3 @@ return multiLineString; | ||
} | ||
} | ||
}; | ||
multiPolygon.geometry.coordinates = pluckCoods(geometries) | ||
@@ -51,3 +51,3 @@ return multiPolygon; | ||
return geom.coordinates | ||
}) | ||
}); | ||
} |
{ | ||
"name": "turf-combine", | ||
"version": "0.1.1", | ||
"version": "1.0.0", | ||
"description": "turf combine module", | ||
@@ -27,2 +27,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"benchmark": "^1.0.0", | ||
"tape": "^2.13.3", | ||
@@ -29,0 +30,0 @@ "turf-featurecollection": "^0.1.0", |
@@ -10,6 +10,6 @@ var test = require('tape') | ||
// MultiPoint | ||
var p1 = point(50, 51) | ||
var p2 = point(100, 101) | ||
var pt1 = point(50, 51) | ||
var pt2 = point(100, 101) | ||
var multiPt = combine(featurecollection([p1, p2])) | ||
var multiPt = combine(featurecollection([pt1, pt2])) | ||
@@ -16,0 +16,0 @@ t.ok(multiPt, 'should should combine two points into a MultiPoint') |
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
7074
8
152
0
6
1