bbox-aspect-ratio
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -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/"; |
@@ -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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
11345
18
29
3