compare-geojson
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -20,6 +20,6 @@ 'use strict'; | ||
* Runs all compare functions defined as comparators and calls a callback with a results object. | ||
* | ||
* @param {Object} newVersion - GeoJSON for new version of feature | ||
* @param {Object} oldVersion - GeoJSON for old version of feature | ||
* @param {compareAllCallback} callback - callback that is called with results object | ||
* @returns {Object} Result from all compare functions. | ||
*/ | ||
@@ -26,0 +26,0 @@ var compareAll = function(newVersion, oldVersion, callback) { |
{ | ||
"name": "compare-geojson", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Compare a features new and old versions in GeoJSON", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"test": "TAP_TIMEOUT=600 tap --coverage tests/*.js", | ||
"lint": "eslint index.js comparators/*.js tests/*.js", | ||
"lint": "eslint ./*/*.js", | ||
"pretest": "npm run lint" | ||
@@ -25,3 +25,5 @@ }, | ||
"turf-distance": "^1.1.0", | ||
"turf-envelope": "^1.0.2" | ||
"turf-envelope": "^1.0.2", | ||
"turf-featurecollection": "^1.0.1", | ||
"turf-within": "^3.0.5" | ||
}, | ||
@@ -28,0 +30,0 @@ "devDependencies": { |
@@ -41,1 +41,14 @@ # Compare-GeoJSON | ||
``` | ||
### How do I create a compare function? | ||
* Clone this repository with `git clone https://github.com/mapbox/compare-geojson` | ||
* `cd compare-geojson` | ||
* `npm install` | ||
* Check if all tests pass before making your changes with `npm test` | ||
* Fetch the landmarks database with: | ||
``` | ||
curl -s https://s3.amazonaws.com/vandalism-dynamosm-support/landmarks.spatialite -o landmarks.spatialite | ||
``` | ||
* Create a new test fixture in the directory `tests/fixtures/` | ||
* Create a new compare function in the directory `comparators/` | ||
* Test your new compare function with `npm test` |
66127659
64
15838
54
9
8
+ Addedturf-within@^3.0.5
+ Addedturf-featurecollection@1.0.1(transitive)
+ Addedturf-helpers@3.0.12(transitive)
+ Addedturf-inside@3.0.12(transitive)
+ Addedturf-invariant@3.0.12(transitive)
+ Addedturf-within@3.0.12(transitive)