Socket
Socket
Sign inDemoInstall

turf-union

Package Overview
Dependencies
Maintainers
9
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-union - npm Package Compare versions

Comparing version 1.0.2 to 3.0.0-canary.2f5f7167

.npmignore

28

index.js

@@ -11,3 +11,3 @@ // look here for help http://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/vector/v.overlay/main.c

*
* @module turf/union
* @name union
* @category transformation

@@ -61,15 +61,15 @@ * @param {Feature<Polygon>} poly1 input polygon

*/
module.exports = function(poly1, poly2){
var reader = new jsts.io.GeoJSONReader();
var a = reader.read(JSON.stringify(poly1.geometry));
var b = reader.read(JSON.stringify(poly2.geometry));
var union = a.union(b);
var parser = new jsts.io.GeoJSONParser();
module.exports = function (poly1, poly2) {
var reader = new jsts.io.GeoJSONReader();
var a = reader.read(JSON.stringify(poly1.geometry));
var b = reader.read(JSON.stringify(poly2.geometry));
var union = a.union(b);
var writer = new jsts.io.GeoJSONWriter();
union = parser.write(union);
return {
type: 'Feature',
geometry: union,
properties: poly1.properties
};
}
union = writer.write(union);
return {
type: 'Feature',
geometry: union,
properties: poly1.properties
};
};
{
"name": "turf-union",
"version": "1.0.2",
"version": "3.0.0-canary.2f5f7167",
"description": "find the union of geographic features",
"main": "index.js",
"scripts": {
"test": "tape test/*.js",
"doc": "dox -r < index.js | doxme --readme > README.md"
"test": "tape test/*.js"
},

@@ -27,9 +26,7 @@ "repository": {

"glob": "~4.3.5",
"tape": "~3.5.0",
"dox": "^0.6.1",
"doxme": "^1.4.3"
"tape": "~3.5.0"
},
"dependencies": {
"jsts": "~0.15.0"
"jsts": "1.1.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