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

@turf/union

Package Overview
Dependencies
Maintainers
6
Versions
60
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 6.2.0-alpha.1 to 6.2.0-alpha.2

10

dist/es/index.js

@@ -1,2 +0,2 @@

import * as martinez from 'martinez-polygon-clipping';
import polygonClipping from 'polygon-clipping';
import { getGeom } from '@turf/invariant';

@@ -34,7 +34,7 @@ import { multiPolygon, polygon } from '@turf/helpers';

*/
function union(polygon1, polygon2, options) {
function union(poly1, poly2, options) {
if (options === void 0) { options = {}; }
var coords1 = getGeom(polygon1).coordinates;
var coords2 = getGeom(polygon2).coordinates;
var unioned = martinez.union(coords1, coords2);
var geom1 = getGeom(poly1);
var geom2 = getGeom(poly2);
var unioned = polygonClipping.union(geom1.coordinates, geom2.coordinates);
if (unioned.length === 0)

@@ -41,0 +41,0 @@ return null;

@@ -32,5 +32,5 @@ import { Feature, Polygon, MultiPolygon, Properties } from '@turf/helpers';

*/
declare function union<P = Properties>(polygon1: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon, polygon2: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon, options?: {
declare function union<P = Properties>(poly1: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon, poly2: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon, options?: {
properties?: P;
}): Feature<Polygon | MultiPolygon, P>;
export default union;
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var martinez = __importStar(require("martinez-polygon-clipping"));
var polygon_clipping_1 = __importDefault(require("polygon-clipping"));
var invariant_1 = require("@turf/invariant");

@@ -43,7 +39,7 @@ var helpers_1 = require("@turf/helpers");

*/
function union(polygon1, polygon2, options) {
function union(poly1, poly2, options) {
if (options === void 0) { options = {}; }
var coords1 = invariant_1.getGeom(polygon1).coordinates;
var coords2 = invariant_1.getGeom(polygon2).coordinates;
var unioned = martinez.union(coords1, coords2);
var geom1 = invariant_1.getGeom(poly1);
var geom2 = invariant_1.getGeom(poly2);
var unioned = polygon_clipping_1.default.union(geom1.coordinates, geom2.coordinates);
if (unioned.length === 0)

@@ -50,0 +46,0 @@ return null;

{
"name": "@turf/union",
"version": "6.2.0-alpha.1",
"version": "6.2.0-alpha.2",
"description": "turf union module",

@@ -41,3 +41,3 @@ "author": "Turf Authors",

"devDependencies": {
"@turf/combine": "^6.2.0-alpha.1",
"@turf/combine": "^6.2.0-alpha.2",
"@types/tape": "*",

@@ -47,2 +47,3 @@ "benchmark": "*",

"load-json-file": "*",
"npm-run-all": "*",
"tape": "*",

@@ -54,7 +55,7 @@ "tslint": "*",

"dependencies": {
"@turf/helpers": "^6.2.0-alpha.1",
"@turf/invariant": "^6.2.0-alpha.1",
"martinez-polygon-clipping": "^0.6.2"
"@turf/helpers": "^6.2.0-alpha.2",
"@turf/invariant": "^6.2.0-alpha.2",
"polygon-clipping": "^0.14.3"
},
"gitHead": "fc519c045a8931c1e14eab9160a7e28391f8da02"
"gitHead": "23d5cb91d77e0c1e2e903a2252f525797f1d0d09"
}
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