Socket
Socket
Sign inDemoInstall

bbox-aspect-ratio

Package Overview
Dependencies
4
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

dist/index.mjs

5

dist/index.d.ts

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

import { BBox } from "@turf/helpers";
declare const bBoxAspectRatio: (bbox: BBox) => [number, number];
export declare const calculateSizeFromAspectRatio: (aspectRatio: [number, number], width: number) => number;
export default bBoxAspectRatio;
export { bBoxAspectRatio, calculateSize } from "./src/";

2

dist/index.js

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

function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=require("@turf/helpers"),r=t(require("@turf/bbox-polygon")),n=t(require("@turf/distance")),o=function(t,e){return 0===e?t:o(e,t%e)};exports.calculateSizeFromAspectRatio=function(t,e){return Math.ceil(t[1]*e/t[0])},exports.default=function(t){var i,u,c,a,f,l=r(t).geometry.coordinates[0],p=n(e.point(l[0]),e.point(l[3])),s=n(e.point(l[0]),e.point(l[1]));return function(t,e,r){return[t/r,e/r]}(a=(c=(i=Math.ceil(s))<(u=Math.ceil(p))?[u,i]:[i,u])[0],f=c[1],o(a,f))};
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])};
//# sourceMappingURL=index.js.map
{
"name": "bbox-aspect-ratio",
"version": "1.1.1",
"version": "1.1.2",
"description": "get aspect ratio from bounding box",
"main": "dist/index.js",
"source": "src/index.ts",
"types": "dist/index.d.ts",
"typings": "dist/index.d.ts",
"repository": "harshzalavadiya/bbox-aspect-ratio",
"files": [
"dist"
],
"scripts": {
"test": "jest",
"dev": "microbundle watch --format cjs",
"build": "microbundle --format cjs"
"test": "jest --config=jest.json",
"dev": "microbundle watch",
"build": "microbundle"
},

@@ -14,0 +16,0 @@ "author": "Harsh Zalavadiya <harsh@foobars.in> (twitter: @zhnebula)",

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