@turf/unkink-polygon
Advanced tools
Comparing version 6.2.0-alpha.3 to 6.2.0
@@ -303,7 +303,7 @@ import rbush from 'rbush'; | ||
feature.geometry.coordinates[i][ | ||
(j + 1).modulo(feature.geometry.coordinates[i].length - 1) | ||
modulo(j + 1, feature.geometry.coordinates[i].length - 1) | ||
], | ||
1, | ||
[i, j], | ||
[i, (j + 1).modulo(feature.geometry.coordinates[i].length - 1)], | ||
[i, modulo(j + 1, feature.geometry.coordinates[i].length - 1)], | ||
undefined | ||
@@ -316,3 +316,3 @@ ), | ||
feature.geometry.coordinates[i][j], | ||
[i, (j - 1).modulo(feature.geometry.coordinates[i].length - 1)], | ||
[i, modulo(j - 1, feature.geometry.coordinates[i].length - 1)], | ||
[i, j], | ||
@@ -388,3 +388,3 @@ undefined, | ||
pseudoVtxListByRingAndEdge[i][ | ||
(j + 1).modulo(feature.geometry.coordinates[i].length - 1) | ||
modulo(j + 1, feature.geometry.coordinates[i].length - 1) | ||
][0].coord; | ||
@@ -712,5 +712,5 @@ } else { | ||
[ | ||
ring[(leftVtx - 1).modulo(ring.length - 1)], | ||
ring[modulo(leftVtx - 1, ring.length - 1)], | ||
ring[leftVtx], | ||
ring[(leftVtx + 1).modulo(ring.length - 1)], | ||
ring[modulo(leftVtx + 1, ring.length - 1)], | ||
], | ||
@@ -749,5 +749,5 @@ true | ||
// Fix Javascript modulo for negative number. From http://stackoverflow.com/questions/4467539/javascript-modulo-not-behaving | ||
Number.prototype.modulo = function (n) { | ||
return ((this % n) + n) % n; | ||
}; | ||
function modulo(n, m) { | ||
return ((n % m) + m) % m; | ||
} | ||
@@ -754,0 +754,0 @@ // Function to check if array is unique (i.e. all unique elements, i.e. no duplicate elements) |
@@ -307,7 +307,7 @@ 'use strict'; | ||
feature.geometry.coordinates[i][ | ||
(j + 1).modulo(feature.geometry.coordinates[i].length - 1) | ||
modulo(j + 1, feature.geometry.coordinates[i].length - 1) | ||
], | ||
1, | ||
[i, j], | ||
[i, (j + 1).modulo(feature.geometry.coordinates[i].length - 1)], | ||
[i, modulo(j + 1, feature.geometry.coordinates[i].length - 1)], | ||
undefined | ||
@@ -320,3 +320,3 @@ ), | ||
feature.geometry.coordinates[i][j], | ||
[i, (j - 1).modulo(feature.geometry.coordinates[i].length - 1)], | ||
[i, modulo(j - 1, feature.geometry.coordinates[i].length - 1)], | ||
[i, j], | ||
@@ -392,3 +392,3 @@ undefined, | ||
pseudoVtxListByRingAndEdge[i][ | ||
(j + 1).modulo(feature.geometry.coordinates[i].length - 1) | ||
modulo(j + 1, feature.geometry.coordinates[i].length - 1) | ||
][0].coord; | ||
@@ -716,5 +716,5 @@ } else { | ||
[ | ||
ring[(leftVtx - 1).modulo(ring.length - 1)], | ||
ring[modulo(leftVtx - 1, ring.length - 1)], | ||
ring[leftVtx], | ||
ring[(leftVtx + 1).modulo(ring.length - 1)], | ||
ring[modulo(leftVtx + 1, ring.length - 1)], | ||
], | ||
@@ -753,5 +753,5 @@ true | ||
// Fix Javascript modulo for negative number. From http://stackoverflow.com/questions/4467539/javascript-modulo-not-behaving | ||
Number.prototype.modulo = function (n) { | ||
return ((this % n) + n) % n; | ||
}; | ||
function modulo(n, m) { | ||
return ((n % m) + m) % m; | ||
} | ||
@@ -758,0 +758,0 @@ // Function to check if array is unique (i.e. all unique elements, i.e. no duplicate elements) |
{ | ||
"name": "@turf/unkink-polygon", | ||
"version": "6.2.0-alpha.3", | ||
"version": "6.2.0", | ||
"description": "turf unkink-polygon module", | ||
@@ -41,3 +41,2 @@ "author": "Turf Authors", | ||
"docs": "node ../../scripts/generate-readmes", | ||
"posttest": "node -r esm ../../scripts/validate-es5-dependencies.js", | ||
"test": "npm-run-all test:*", | ||
@@ -48,3 +47,3 @@ "test:tape": "node -r esm test.js", | ||
"devDependencies": { | ||
"@turf/kinks": "^6.2.0-alpha.3", | ||
"@turf/kinks": "^6.2.0", | ||
"benchmark": "*", | ||
@@ -58,9 +57,9 @@ "load-json-file": "*", | ||
"dependencies": { | ||
"@turf/area": "^6.2.0-alpha.3", | ||
"@turf/boolean-point-in-polygon": "^6.2.0-alpha.3", | ||
"@turf/helpers": "^6.2.0-alpha.3", | ||
"@turf/meta": "^6.2.0-alpha.3", | ||
"@turf/area": "^6.2.0", | ||
"@turf/boolean-point-in-polygon": "^6.2.0", | ||
"@turf/helpers": "^6.2.0", | ||
"@turf/meta": "^6.2.0", | ||
"rbush": "^2.0.1" | ||
}, | ||
"gitHead": "dce9edfc705352e8cb9e0083c9330ba0e8d77409" | ||
"gitHead": "c277baf2b967a35efec75de9ae54869d20da5288" | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
68572
7
1508
Updated@turf/area@^6.2.0
Updated@turf/helpers@^6.2.0
Updated@turf/meta@^6.2.0