Socket
Socket
Sign inDemoInstall

get-image-orientation

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-image-orientation - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

bundle/script.js

@@ -210,4 +210,2 @@ /******/ (function(modules) { // webpackBootstrap

window['getImageOrientation'] = getImageOrientation;
module.exports = getImageOrientation;

@@ -214,0 +212,0 @@

2

dist/script.min.js

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

!function(t){function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}var e={};r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=0)}([function(t,r,e){t.exports=e(1)},function(t,r,e){"use strict";var n=[{aspect:.67,ratio:"2/3"},{aspect:1,ratio:"1/1"},{aspect:1.33,ratio:"4/3"},{aspect:1.6,ratio:"16/10"},{aspect:1.67,ratio:"5/3"},{aspect:1.78,ratio:"16/9"},{aspect:2.37,ratio:"21/9"}],a=function(t){return"string"==typeof t},o=function(t){return parseInt(t,10)},i=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return parseFloat(t).toFixed(r)},c=function(t,r){var e=i(t/r);return a(e)?+e:e},u=function(t){var r={},e=Number.MAX_SAFE_INTEGER,a=!1;return n.forEach(function(n){if(a)return!1;var o=t>n.aspect,i=t<n.aspect;o||i||(a=!0,r=n);var c=o?t-n.aspect:n.aspect-t;c<e&&(r=n,e=c)}),r},s=function(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15,n=t===r,a=!n&&t>r,i=!n&&!a,s=t>r?o(100*(t-r)/t):0,p=r>t?o(100*(r-t)/r):0,f=a&&s<e,l=i&&p<e,d=c(t,r);return{isLandscape:a,isPortrait:i,isSquare:n,isSquareLikeLandscape:f,isSquareLikePortrait:l,widthIncrease:s,heightIncrease:p,aspect:d,ratio:u(d).ratio}};window.getImageOrientation=s,t.exports=s}]);
!function(t){function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}var e={};r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=0)}([function(t,r,e){t.exports=e(1)},function(t,r,e){"use strict";var n=[{aspect:.67,ratio:"2/3"},{aspect:1,ratio:"1/1"},{aspect:1.33,ratio:"4/3"},{aspect:1.6,ratio:"16/10"},{aspect:1.67,ratio:"5/3"},{aspect:1.78,ratio:"16/9"},{aspect:2.37,ratio:"21/9"}],a=function(t){return"string"==typeof t},o=function(t){return parseInt(t,10)},i=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return parseFloat(t).toFixed(r)},c=function(t,r){var e=i(t/r);return a(e)?+e:e},u=function(t){var r={},e=Number.MAX_SAFE_INTEGER,a=!1;return n.forEach(function(n){if(a)return!1;var o=t>n.aspect,i=t<n.aspect;o||i||(a=!0,r=n);var c=o?t-n.aspect:n.aspect-t;c<e&&(r=n,e=c)}),r},s=function(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15,n=t===r,a=!n&&t>r,i=!n&&!a,s=t>r?o(100*(t-r)/t):0,p=r>t?o(100*(r-t)/r):0,f=a&&s<e,l=i&&p<e,v=c(t,r);return{isLandscape:a,isPortrait:i,isSquare:n,isSquareLikeLandscape:f,isSquareLikePortrait:l,widthIncrease:s,heightIncrease:p,aspect:v,ratio:u(v).ratio}};t.exports=s}]);

@@ -120,4 +120,2 @@ const aspectRatios = [{

window['getImageOrientation'] = getImageOrientation;
module.exports = getImageOrientation;
{
"name": "get-image-orientation",
"version": "0.0.3",
"description": "Utility for determining image orientation",
"version": "0.0.4",
"description": "Utility for determining image orientation and aspect ratio",
"main": "input.js",

@@ -34,4 +34,8 @@ "scripts": {

"image",
"aspect-ratio",
"aspect-ratio-calculator",
"image-orientation",
"image-dimension",
"image-aspect-ratio",
"image-ratio",
"image-size"

@@ -38,0 +42,0 @@ ],

@@ -18,3 +18,4 @@ <!-- Name -->

```javascript
const getImageOrientation = require('get-image-orientation');
import getImageOrientation from 'get-image-orientation';
const image = {

@@ -21,0 +22,0 @@ width: 320,

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