Socket
Socket
Sign inDemoInstall

geojson-random

Package Overview
Dependencies
0
Maintainers
21
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.2.1

4

index.js

@@ -75,4 +75,4 @@ module.exports = function() {

return [
randInSpan % (lonSpan) + bbox[0],
randInSpan / (latSpan) + bbox[1]];
(bbox[2] === bbox[0]) ? bbox[2] : randInSpan % (lonSpan) + bbox[0],
(bbox[3] === bbox[1]) ? bbox[1] : randInSpan / (latSpan) + bbox[1]];
}

@@ -79,0 +79,0 @@

{
"name": "geojson-random",
"version": "0.2.0",
"version": "0.2.1",
"description": "generate random geojson features",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -36,2 +36,10 @@ var test = require('tape'),

test('random.point(bbox zero width)', function(t) {
var randomPoints = geojsonRandom.point(1, [50, 50, 50, 60]);
t.equal(randomPoints.features.length, 1, '1 points');
var withBbox = randomPoints.features[0].geometry.coordinates;
t.equal(withBbox[0], 50, 'lon');
t.end();
});
test('random.polygon', function(t) {

@@ -58,1 +66,2 @@ var randomPolygons = geojsonRandom.polygon(100);

});
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc