New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

boundingbox

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boundingbox - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

17

BoundingBox.js

@@ -123,2 +123,19 @@ 'use strict'

BoundingBox.prototype.toGeoJSON = function () {
return {
type: 'Feature',
properties: {},
geometry: {
'type': 'Polygon',
'coordinates': [[
[ this.bounds.minlat, this.bounds.minlon ],
[ this.bounds.maxlat, this.bounds.minlon ],
[ this.bounds.maxlat, this.bounds.maxlon ],
[ this.bounds.minlat, this.bounds.maxlat ],
[ this.bounds.minlat, this.bounds.minlon ]
]]
}
}
}
BoundingBox.prototype.toLeaflet = function () {

@@ -125,0 +142,0 @@ return L.latLngBounds(

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Implements bounding boxes with usual functions like intersects. Can convert from/to Leaflet bounds and GeoJSON.",
"version": "0.0.4",
"version": "0.0.5",
"main": "BoundingBox.js",

@@ -8,0 +8,0 @@ "directories": {

@@ -67,2 +67,5 @@ # bounding-box

## Method toGeoJSON()
Returns the bounding box as GeoJSON feature.
## Method toLeaflet()

@@ -69,0 +72,0 @@ Returns the bounding box as L.latLngBounds object

@@ -187,2 +187,11 @@ var assert = require('assert')

it('toGeoJSON()', function(done) {
var expected = {"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[48,16],[49,16],[49,17],[48,49],[48,16]]]}}
assert.deepEqual(expected, bounds1.toGeoJSON())
done()
})
if(typeof L != 'undefined')

@@ -189,0 +198,0 @@ it('toLeaflet()', function(done) {

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