Skip to content

Commit

Permalink
upgrade deps, istanbul -> nyc
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Aug 20, 2017
1 parent ba4dd53 commit b6a9ebf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ debug/data/zips.json
geojson-vt-dev.js
geojson-vt.js
node_modules
coverage
coverage
.nyc_output
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
},
"main": "src/index.js",
"devDependencies": {
"benchmark": "^2.1.0",
"browserify": "^13.0.1",
"coveralls": "^2.11.9",
"eslint": "^2.10.2",
"benchmark": "^2.1.4",
"browserify": "^14.4.0",
"coveralls": "^2.13.1",
"eslint": "^4.5.0",
"eslint-config-mourner": "^2.0.1",
"faucet": "0.0.1",
"istanbul": "^0.4.3",
"tape": "^4.5.1",
"uglify-js": "^2.6.2",
"watchify": "^3.7.0"
"nyc": "^11.1.0",
"tape": "^4.8.0",
"uglify-js": "^3.0.28",
"watchify": "^3.9.0"
},
"eslintConfig": {
"extends": "mourner",
Expand All @@ -36,7 +36,7 @@
"license": "ISC",
"scripts": {
"test": "eslint src/*.js test/*.js debug/viz.js && tape test/test-*.js | faucet",
"cov": "istanbul cover tape test/test*.js",
"cov": "nyc tape test/test*.js",
"coveralls": "npm run cov && coveralls < ./coverage/lcov.info",
"build-min": "browserify src/index.js -s geojsonvt | uglifyjs -c -m -o geojson-vt.js",
"build-dev": "browserify -d src/index.js -s geojsonvt -o geojson-vt-dev.js",
Expand Down
4 changes: 2 additions & 2 deletions src/clip.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ function clip(features, scale, k1, k2, axis, intersect, minAll, maxAll) {
} else if (min > k2 || max < k1) continue; // trivial reject

var slices = type === 1 ?
clipPoints(geometry, k1, k2, axis) :
clipGeometry(geometry, k1, k2, axis, intersect, type === 3);
clipPoints(geometry, k1, k2, axis) :
clipGeometry(geometry, k1, k2, axis, intersect, type === 3);

if (slices.length) {
// if a feature got clipped, it will likely get clipped on the next zoom level as well,
Expand Down
4 changes: 2 additions & 2 deletions test/test-clip.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function intersectX(p0, p1, x) {
}

var geom1 = [[[0,0],[50,0],[50,10],[20,10],[20,20],[30,20],[30,30],
[50,30],[50,40],[25,40],[25,50],[0,50],[0,60],[25,60]]];
[50,30],[50,40],[25,40],[25,50],[0,50],[0,60],[25,60]]];

var geom2 = [[[0,0],[50,0],[50,10],[0,10]]];

Expand Down Expand Up @@ -56,7 +56,7 @@ test('clips polygons', function (t) {

var expected = [
{id: null, type: 3, geometry: [[[10,0],[40,0],[40,10],[20,10],[20,20],[30,20],[30,30],[40,30],
[40,40],[25,40],[25,50],[10,50],[10,60],[25,60],[10,24],[10,0]]], tags: 1, min: [10,0], max: [40,60]},
[40,40],[25,40],[25,50],[10,50],[10,60],[25,60],[10,24],[10,0]]], tags: 1, min: [10,0], max: [40,60]},
{id: null, type: 3, geometry: [[[10,0],[40,0],[40,10],[10,10],[10,0]]], tags: 2, min: [10,0], max: [40,10]}
];

Expand Down

0 comments on commit b6a9ebf

Please sign in to comment.