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

@aptoma/aoi-smart-crop

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aptoma/aoi-smart-crop - npm Package Compare versions

Comparing version 0.1.5 to 0.2.0

12

lib/index.js

@@ -21,2 +21,3 @@ 'use strict';

exports.getResizedImageUrl = (imageUrl, targetSize, actions, transformToken) => {
normalizeActions(actions);
const baseUrl = imageUrl.split('?')[0];

@@ -49,1 +50,12 @@

};
function normalizeActions(actions) {
if (actions.crop) {
if (actions.crop.height) {
actions.crop.height = Math.ceil(actions.crop.height);
}
if (actions.crop.width) {
actions.crop.width = Math.ceil(actions.crop.width);
}
}
}

2

package.json

@@ -7,3 +7,3 @@ {

},
"version": "0.1.5",
"version": "0.2.0",
"description": "Helper library for doing smart crops of images based on area of interest data",

@@ -10,0 +10,0 @@ "main": "lib/index.js",

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