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

geojson-bbox

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geojson-bbox - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

6

dist/geojson-bbox.js

@@ -1,2 +0,2 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.bbox=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.bbox = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
module.exports = function(gj) {

@@ -50,4 +50,2 @@ var coords, bbox;

});
//# sourceMappingURL=geojson-bbox.js.map
//# sourceMappingURL=geojson-bbox.js.map

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.bbox=e()}}(function(){return function e(t,n,r){function o(i,f){if(!n[i]){if(!t[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var d=n[i]={exports:{}};t[i][0].call(d.exports,function(e){var n=t[i][1][e];return o(n?n:e)},d,d.exports,e,t,n,r)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,t,n){function r(e){var t;return"Point"==e.type?t=[e.coordinates]:"LineString"==e.type||"MultiPoint"==e.type?t=e.coordinates:"Polygon"==e.type||"MultiLineString"==e.type?t=e.coordinates.reduce(function(e,t){return e.concat(t)},[]):"MultiPolygon"==e.type?t=e.coordinates.reduce(function(e,t){return e.concat(t.reduce(function(e,t){return e.concat(t)},[]))},[]):"Feature"==e.type?t=r(e.geometry):"GeometryCollection"==e.type?t=e.geometries.reduce(function(e,t){return e.concat(r(t))},[]):"FeatureCollection"==e.type&&(t=e.features.reduce(function(e,t){return e.concat(r(t))},[])),t}t.exports=function(e){var t,n;if(e.hasOwnProperty("type"))return t=r(e),n=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],t.reduce(function(e,t){return[Math.min(t[0],e[0]),Math.min(t[1],e[1]),Math.max(t[0],e[2]),Math.max(t[1],e[3])]},n)}},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.bbox=e()}}(function(){return function(){function e(t,n,r){function o(i,f){if(!n[i]){if(!t[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var d=n[i]={exports:{}};t[i][0].call(d.exports,function(e){return o(t[i][1][e]||e)},d,d.exports,e,t,n,r)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}return e}()({1:[function(e,t,n){function r(e){var t;return"Point"==e.type?t=[e.coordinates]:"LineString"==e.type||"MultiPoint"==e.type?t=e.coordinates:"Polygon"==e.type||"MultiLineString"==e.type?t=e.coordinates.reduce(function(e,t){return e.concat(t)},[]):"MultiPolygon"==e.type?t=e.coordinates.reduce(function(e,t){return e.concat(t.reduce(function(e,t){return e.concat(t)},[]))},[]):"Feature"==e.type?t=r(e.geometry):"GeometryCollection"==e.type?t=e.geometries.reduce(function(e,t){return e.concat(r(t))},[]):"FeatureCollection"==e.type&&(t=e.features.reduce(function(e,t){return e.concat(r(t))},[])),t}t.exports=function(e){var t,n;if(e.hasOwnProperty("type"))return t=r(e),n=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],t.reduce(function(e,t){return[Math.min(t[0],e[0]),Math.min(t[1],e[1]),Math.max(t[0],e[2]),Math.max(t[1],e[3])]},n)}},{}]},{},[1])(1)});
{
"name": "geojson-bbox",
"version": "0.0.0",
"version": "0.0.1",
"description": "Calculates extent/bbox for a given valid geojson object.",

@@ -16,3 +16,11 @@ "main": "geojson-bbox.js",

},
"keywords": ["geojson", "extent", "bbox", "bounds", "maps", "geo", "geospatial"],
"keywords": [
"geojson",
"extent",
"bbox",
"bounds",
"maps",
"geo",
"geospatial"
],
"author": "Gagan Bansal <gaganbansal123@gmail.com>",

@@ -25,8 +33,8 @@ "license": "MIT",

"devDependencies": {
"browserify": "^8.1.1",
"browserify": "^17.0.0",
"chai": "^1.10.0",
"exorcist": "^0.1.6",
"mocha": "^2.1.0",
"exorcist": "^2.0.0",
"mocha": "^10.1.0",
"uglify-js": "^2.4.16"
}
}

@@ -14,3 +14,3 @@ var expect = require('chai').expect,

bbox({
type: 'LineString',
type: 'LineString',
coordinates: [[30, 10], [10, 30], [40, 40]]

@@ -25,3 +25,3 @@ })

bbox({
type: 'Polygon',
type: 'Polygon',
coordinates: [

@@ -38,5 +38,5 @@ [[30, 10], [40, 40], [20, 40], [10, 20], [30, 10]]

bbox({
type: 'Polygon',
coordinates: [
[[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]],
type: 'Polygon',
coordinates: [
[[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]],
[[20, 30], [35, 35], [30, 20], [20, 30]]

@@ -52,3 +52,3 @@ ]

bbox({
type: 'MultiPoint',
type: 'MultiPoint',
coordinates: [

@@ -65,5 +65,5 @@ [10, 40], [40, 30], [20, 20], [30, 10]

bbox({
type: 'MultiLineString',
type: 'MultiLineString',
coordinates: [
[[10, 10], [20, 20], [10, 40]],
[[10, 10], [20, 20], [10, 40]],
[[40, 40], [30, 30], [40, 20], [30, 10]]

@@ -79,10 +79,10 @@ ]

bbox({
type: 'MultiPolygon',
type: 'MultiPolygon',
coordinates: [
[
[[30, 20], [45, 40], [10, 40], [30, 20]]
],
],
[
[[15, 5], [40, 10], [10, 20], [5, 10], [15, 5]]
]
]
]

@@ -97,9 +97,9 @@ })

bbox({
type: 'MultiPolygon',
type: 'MultiPolygon',
coordinates: [
[
[[40, 40], [20, 45], [45, 30], [40, 40]]
],
],
[
[[20, 35], [10, 30], [10, 10], [30, 5], [45, 20], [20, 35]],
[[20, 35], [10, 30], [10, 10], [30, 5], [45, 20], [20, 35]],
[[30, 20], [20, 15], [20, 25], [30, 20]]

@@ -135,3 +135,3 @@ ]

geometry: {
type: 'LineString',
type: 'LineString',
coordinates: [

@@ -147,3 +147,2 @@ [10, 40], [40, 30], [20, 20], [30, 10]

it('FeatureCollection', function() {
debugger;
expect(

@@ -150,0 +149,0 @@ bbox({

Sorry, the diff of this file is not supported yet

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