@turf/difference
Advanced tools
Comparing version 5.0.4 to 5.0.5
@@ -1,2 +0,2 @@ | ||
import { GeoJSONReader, GeoJSONWriter, OverlayOp } from 'jsts-es'; | ||
import { GeoJSONReader, GeoJSONWriter, OverlayOp } from 'turf-jsts'; | ||
import area from '@turf/area'; | ||
@@ -3,0 +3,0 @@ import { feature } from '@turf/helpers'; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var jstsEs = require('jsts-es'); | ||
var turfJsts = require('turf-jsts'); | ||
var area = _interopDefault(require('@turf/area')); | ||
@@ -58,8 +58,8 @@ var helpers = require('@turf/helpers'); | ||
// JSTS difference operation | ||
var reader = new jstsEs.GeoJSONReader(); | ||
var reader = new turfJsts.GeoJSONReader(); | ||
var a = reader.read(geom1); | ||
var b = reader.read(geom2); | ||
var differenced = jstsEs.OverlayOp.difference(a, b); | ||
var differenced = turfJsts.OverlayOp.difference(a, b); | ||
if (differenced.isEmpty()) return null; | ||
var writer = new jstsEs.GeoJSONWriter(); | ||
var writer = new turfJsts.GeoJSONWriter(); | ||
var geom = writer.write(differenced); | ||
@@ -66,0 +66,0 @@ |
{ | ||
"name": "@turf/difference", | ||
"version": "5.0.4", | ||
"version": "5.0.5", | ||
"description": "turf difference module", | ||
@@ -17,3 +17,4 @@ "main": "main", | ||
"test": "node -r @std/esm test.js", | ||
"bench": "node -r @std/esm bench.js" | ||
"bench": "node -r @std/esm bench.js", | ||
"docs": "node ../../scripts/generate-readmes" | ||
}, | ||
@@ -48,3 +49,3 @@ "repository": { | ||
"@turf/meta": "^5.0.4", | ||
"jsts-es": "*" | ||
"turf-jsts": "*" | ||
}, | ||
@@ -51,0 +52,0 @@ "@std/esm": { |
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
10188
+ Addedturf-jsts@*
+ Addedturf-jsts@1.2.3(transitive)
- Removedjsts-es@*
- Removedjsts-es@1.5.4(transitive)