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

calculate-size

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calculate-size - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

1

lib/index.d.ts

@@ -5,2 +5,3 @@ export interface OptionalOptions {

fontWeight?: string;
width?: string;
}

@@ -7,0 +8,0 @@ export interface Size {

3

lib/index.js

@@ -21,3 +21,3 @@ (function (dependencies, factory) {

element.style.top = '-999px';
element.style.width = 'auto';
element.style.width = options.width;
element.style.height = 'auto';

@@ -41,2 +41,3 @@ document.body.appendChild(element);

options.fontWeight = options.fontWeight || 'normal';
options.width = options.width || 'auto';
var element = createDummyElement(text, options);

@@ -43,0 +44,0 @@ var size = {

{
"name": "calculate-size",
"version": "1.0.2",
"version": "1.1.0",
"description": "Calculate the pixel size of a string",

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

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