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

@applitools/utils

Package Overview
Dependencies
Maintainers
30
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/utils - npm Package Compare versions

Comparing version 1.3.8 to 1.3.9

15

dist/geometry.js

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.withPadding = exports.divide = exports.equals = exports.contains = exports.isIntersected = exports.intersect = exports.offsetNegative = exports.offset = exports.scale = exports.rotate = exports.ceil = exports.round = exports.isEmpty = exports.region = exports.size = exports.location = void 0;
exports.withPadding = exports.divide = exports.equals = exports.contains = exports.isIntersected = exports.intersect = exports.offsetNegative = exports.offset = exports.scale = exports.rotate = exports.floor = exports.ceil = exports.round = exports.isEmpty = exports.region = exports.size = exports.location = void 0;
const types = __importStar(require("./types"));

@@ -75,2 +75,15 @@ const guard = __importStar(require("./guard"));

exports.ceil = ceil;
function floor(target) {
const result = { ...target };
if (types.has(target, ['x', 'y'])) {
result.x = Math.floor(target.x);
result.y = Math.floor(target.y);
}
if (types.has(target, ['width', 'height'])) {
result.width = Math.floor(target.width + (types.has(target, 'x') ? target.x - result.x : 0));
result.height = Math.floor(target.height + (types.has(target, 'y') ? target.y - result.y : 0));
}
return result;
}
exports.floor = floor;
function rotate(target, degrees, size) {

@@ -77,0 +90,0 @@ degrees = (360 + degrees) % 360;

2

package.json
{
"name": "@applitools/utils",
"version": "1.3.8",
"version": "1.3.9",
"keywords": [

@@ -5,0 +5,0 @@ "applitools",

@@ -26,2 +26,5 @@ declare type Location = {

export declare function ceil(region: Location): Location;
export declare function floor(region: Region): Region;
export declare function floor(region: RectangleSize): RectangleSize;
export declare function floor(region: Location): Location;
export declare function rotate(size: RectangleSize, degrees: number): RectangleSize;

@@ -28,0 +31,0 @@ export declare function rotate(region: Region, degrees: number, size: RectangleSize): Region;

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