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

@hugsmidjan/getclevercropbox

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hugsmidjan/getclevercropbox - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

__tsconfig.json

10

CHANGELOG.md

@@ -6,5 +6,9 @@ # Change Log

- ... <!-- Add new lines here. Version number will be decided later -->
- feat: Add TypeScript declaration file
- feat: Initial commmit - migrating logic + assertions from prototype repo
## 1.1.0
_2019-10-05_
- feat: Export the input/output types
## 1.0.0

@@ -14,1 +18,3 @@

- feat: Add TypeScript declaration file
- feat: Initial commmit - migrating logic + assertions from prototype repo

2

package.json
{
"name": "@hugsmidjan/getclevercropbox",
"version": "1.0.0",
"version": "1.1.0",
"main": "dist/getCleverCropBox.js",

@@ -5,0 +5,0 @@ "module": "src/getCleverCropBox.js",

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

type ImageInfo = {
export type ImageDimensions = {
width: number;

@@ -6,3 +6,3 @@ height: number;

type CropOpts = {
export type CropOpts = {
width?: number;

@@ -21,14 +21,15 @@ height?: number;

type FocalPointOpts = {
export type FocalXY = {
fx: number;
fy: number;
} & (
| {}
| {
r1x: number;
r1y: number;
r2x: number;
r2y: number;
});
};
export type FocalArea = {
r1x: number;
r1y: number;
r2x: number;
r2y: number;
};
export type FocalPointOpts = FocalXY & (FocalArea | {});
// --------------------------------------------------------------------------

@@ -64,3 +65,3 @@

type CleverCropTargets = ScalingTarget & CroppingTarget;
export type CleverCropTargets = ScalingTarget & CroppingTarget;

@@ -70,5 +71,5 @@ // --------------------------------------------------------------------------

export default function getCleverCropBox(
origSize: ImageInfo,
origSize: ImageDimensions,
cropInfo: CropOpts,
focalPoint?: FocalPointOpts
): null | CleverCropTargets;
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