Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

geojson-precision

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geojson-precision - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

6

index.js

@@ -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 @@ }

2

package.json
{
"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");
}
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc