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

cssstyle

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssstyle - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

lib/parsers.js

@@ -24,3 +24,3 @@ /*********************************************************************

var numberRegEx = /^[\-+]?[0-9]*\.[0-9]+$/;
var lengthRegEx = /^(0|[\-+]?[0-9]*\.?[0-9]+(in|cm|em|mm|pt|pc|px|ex|rem))$/;
var lengthRegEx = /^(0|[\-+]?[0-9]*\.?[0-9]+(in|cm|em|mm|pt|pc|px|ex|rem|vh|vw))$/;
var percentRegEx = /^[\-+]?[0-9]*\.?[0-9]+%$/;

@@ -27,0 +27,0 @@ var urlRegEx = /^url\(\s*([^\)]*)\s*\)$/;

@@ -9,3 +9,3 @@ {

],
"version": "1.1.0",
"version": "1.1.1",
"homepage": "https://github.com/jsakas/CSSStyleDeclaration",

@@ -55,5 +55,5 @@ "maintainers": [

"test": "node ./scripts/generate_properties.js && node ./scripts/generate_valid_properties.js && nodeunit tests",
"prepublish": "node ./scripts/generate_properties.js && node ./scripts/generate_valid_properties.js"
"prepare": "node ./scripts/generate_properties.js && node ./scripts/generate_valid_properties.js"
},
"license": "MIT"
}

@@ -59,5 +59,5 @@ "use strict";

test.expect(8);
style.cssText = 'color: blue; background-color: red; width: 78%';
test.ok(3 === style.length, 'length is not 3');
test.ok('color: blue; background-color: red; width: 78%;' === style.cssText, 'cssText is wrong');
style.cssText = 'color: blue; background-color: red; width: 78%; height: 50vh;';
test.ok(4 === style.length, 'length is not 4');
test.ok('color: blue; background-color: red; width: 78%; height: 50vh;' === style.cssText, 'cssText is wrong');
test.ok('blue' === style.getPropertyValue('color'), "getPropertyValue('color') failed");

@@ -112,3 +112,3 @@ test.ok('color' === style.item(0), 'item(0) failed');

var style = new cssstyle.CSSStyleDeclaration();
test.expect(7);
test.expect(9);
style.height = 6;

@@ -120,2 +120,6 @@ test.ok('' === style.height, 'height does not remain unset');

test.ok('34%' === style.height, 'height is not 34%');
style.height = '100vh';
test.ok('100vh' === style.height, 'height is not 100vh');
style.height = '100vw';
test.ok('100vw' === style.height, 'height is not 100vw');
style.height = '';

@@ -122,0 +126,0 @@ test.ok(style.length === 1, 'length is not 1');

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