New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

progressive-size

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

progressive-size - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

index.ts

1

dist/index.d.ts

@@ -9,1 +9,2 @@ export declare function configure(rem?: number, mobile_width?: number, desktop_width?: number): void;

export declare function progressiveProcessed(minSizePx: number, maxSizePx: number, minWidthPx?: number, maxWidthPx?: number): number;
export declare function progressiveClampProcessed(minSizePx: number, maxSizePx: number, minWidthPx?: number, maxWidthPx?: number): number;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.progressiveProcessed = exports.progressiveMin = exports.progressiveMax = exports.progressiveClamp = exports.progressive = exports.Rem = exports._Rem = exports.configure = void 0;
exports.progressiveClampProcessed = exports.progressiveProcessed = exports.progressiveMin = exports.progressiveMax = exports.progressiveClamp = exports.progressive = exports.Rem = exports._Rem = exports.configure = void 0;
let REM = 16;

@@ -63,2 +63,13 @@ let MOBILE_WIDTH = 375;

exports.progressiveProcessed = progressiveProcessed;
function progressiveClampProcessed(minSizePx, maxSizePx, minWidthPx = MOBILE_WIDTH, maxWidthPx = DESKTOP_WIDTH) {
const minSize = _Rem(minSizePx);
const maxSize = _Rem(maxSizePx);
const minWidth = _Rem(minWidthPx);
const maxWidth = _Rem(maxWidthPx);
const slope = (maxSize - minSize) / (maxWidth - minWidth);
const yAxisIntersection = -minWidth * slope + minSize;
const a = Math.max(minSizePx, Math.min(maxSizePx, (window.innerWidth * slope) + (yAxisIntersection * 16)));
return a;
}
exports.progressiveClampProcessed = progressiveClampProcessed;
//# sourceMappingURL=index.js.map

2

package.json
{
"name": "progressive-size",
"version": "1.2.1",
"version": "1.3.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": "marlonpassos",

Sorry, the diff of this file is not supported yet

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