Socket
Socket
Sign inDemoInstall

bbox-aspect-ratio

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.3.0

dist/src/geo/index.d.ts

2

dist/index.js

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

function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=t(require("@turf/bbox-polygon")),r=t(require("@turf/distance")),n=require("@turf/helpers"),o=function(t,e){return 0===e?t:o(e,t%e)};exports.bBoxAspectRatio=function(t){var i,u,c,a,f,p=e(t).geometry.coordinates[0],l=r(n.point(p[0]),n.point(p[3])),s=r(n.point(p[0]),n.point(p[1]));return function(t,e,r){return[t/r,e/r]}(a=(c=(i=Math.ceil(s))<(u=Math.ceil(l))?[u,i]:[i,u])[0],f=c[1],o(a,f))},exports.calculateSize=function(t,e){return Math.ceil(t[1]*e/t[0])};
var t=function(n,r){return 0===r?n:t(r,n%r)},n=function(t,n){return t>n?t-n:n-t};exports.bBoxAspectRatio=function(r){var e,u,c,i,o,a=r.map(function(t){return Math.ceil(1e4*t)});return function(t,n,r){return[t/r,n/r]}(i=(c=(e=n(a[0],a[2]))<(u=n(a[1],a[3]))?[u,e]:[e,u])[0],o=c[1],t(i,o))},exports.calculateSize=function(t,n){return Math.ceil(t[1]*n/t[0])};
//# sourceMappingURL=index.js.map

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@turf/bbox-polygon"),require("@turf/distance"),require("@turf/helpers")):"function"==typeof define&&define.amd?define(["exports","@turf/bbox-polygon","@turf/distance","@turf/helpers"],t):t(e.bboxAspectRatio={},e.bboxPolygon,e.distance,e.helpers)}(this,function(e,t,o,n){t=t&&t.hasOwnProperty("default")?t.default:t,o=o&&o.hasOwnProperty("default")?o.default:o;var r=function(e,t){return 0===t?e:r(t,e%t)};e.bBoxAspectRatio=function(e){var i,u,f,a,c,p=t(e).geometry.coordinates[0],l=o(n.point(p[0]),n.point(p[3])),d=o(n.point(p[0]),n.point(p[1]));return function(e,t,o){return[e/o,t/o]}(a=(f=(i=Math.ceil(d))<(u=Math.ceil(l))?[u,i]:[i,u])[0],c=f[1],r(a,c))},e.calculateSize=function(e,t){return Math.ceil(e[1]*t/e[0])}});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.bboxAspectRatio={})}(this,function(t){var e=function(t,n){return 0===n?t:e(n,t%n)},n=function(t,e){return t>e?t-e:e-t};t.bBoxAspectRatio=function(t){var o,i,u,r,c,f=t.map(function(t){return Math.ceil(1e4*t)});return function(t,e,n){return[t/n,e/n]}(r=(u=(o=n(f[0],f[2]))<(i=n(f[1],f[3]))?[i,o]:[o,i])[0],c=u[1],e(r,c))},t.calculateSize=function(t,e){return Math.ceil(t[1]*e/t[0])}});
//# sourceMappingURL=index.umd.js.map

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

declare const calculateAspectRatio: (height: any, width: any) => [number, number];
export default calculateAspectRatio;
export declare const calculateAspectRatio: (height: any, width: any) => [number, number];

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

import { BBox } from "@turf/helpers";
export declare const bBoxAspectRatio: (bbox: BBox) => [number, number];
export declare const bBoxAspectRatio: (rawbbox: [number, number, number, number]) => [number, number];
export declare const calculateSize: (aspectRatio: [number, number], width: number) => number;
{
"name": "bbox-aspect-ratio",
"version": "1.2.0",
"version": "1.3.0",
"description": "get aspect ratio from bounding box",

@@ -13,2 +13,3 @@ "main": "dist/index.js",

"test": "jest --config=jest.json",
"coverage": "jest --coverage --config=jest.json",
"dev": "microbundle watch",

@@ -25,7 +26,3 @@ "build": "microbundle"

},
"dependencies": {
"@turf/bbox-polygon": "^6.0.1",
"@turf/distance": "^6.0.1",
"@turf/helpers": "^6.1.4"
}
"dependencies": {}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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