geojson-precision
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -24,2 +24,6 @@ (function() { | ||
function geometry(obj) { | ||
if (!obj) { | ||
return {}; | ||
} | ||
switch (obj.type) { | ||
@@ -44,3 +48,3 @@ case "Point": | ||
default : | ||
throw new Error("Something went horrifically wrong"); | ||
return {}; | ||
} | ||
@@ -47,0 +51,0 @@ } |
{ | ||
"name": "geojson-precision", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Remove meaningless precision from GeoJSON", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -304,2 +304,3 @@ exports.featurePoint = { | ||
exports.baddy_nogeom = { type: "FeatureCollection", features: [ { type: "Feature", geometry: null, properties: {} } ] } | ||
exports.baddy_null = null; | ||
@@ -306,0 +307,0 @@ exports.baddy_undefined; |
@@ -196,1 +196,13 @@ var assert = require("assert"), | ||
}); | ||
describe("null Feature geometry", function() { | ||
it("should return the same thing value", function(done) { | ||
var parsed = gp(tg.baddy_nogeom, 5); | ||
if (typeof(parsed) === "object" && parsed["type"]) { | ||
done(); | ||
} else { | ||
throw new Error("Null feature geometry incorrectly returned"); | ||
} | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6587826
810