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

cssstyle

Package Overview
Dependencies
Maintainers
1
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 0.2.12 to 0.2.13

44

lib/CSSStyleDeclaration.js

@@ -140,6 +140,9 @@ /*********************************************************************

var i;
var name;
var value;
var priority;
for (i = 0; i < this._length; i++) {
var name = this[i];
var value = this.getPropertyValue(name);
var priority = this.getPropertyPriority(name);
name = this[i];
value = this.getPropertyValue(name);
priority = this.getPropertyPriority(name);
if (priority !== '') {

@@ -192,2 +195,19 @@ priority = " !" + priority;

var LazyDefinition = function (property, modulePath) {
this.get = function () {
var definition = require(modulePath).definition;
Object.defineProperty(this, property, definition);
return this[property];
};
this.set = function (v) {
var definition = require(modulePath).definition;
Object.defineProperty(this, property, definition);
this[property] = v;
};
this.enumerable = true;
this.configurable = true;
};
/*

@@ -200,3 +220,2 @@ *

var dashed;
var definition;
if (property.substr(-3) === '.js') {

@@ -210,19 +229,2 @@ property = path.basename(property, '.js');

function LazyDefinition(property, modulePath) {
this.get = function() {
var definition = require(modulePath).definition;
Object.defineProperty(this, property, definition);
return this[property];
};
this.set = function(v) {
var definition = require(modulePath).definition;
Object.defineProperty(this, property, definition);
this[property] = v;
};
this.enumerable = true;
this.configurable = true;
}
exports.CSSStyleDeclaration = CSSStyleDeclaration;

@@ -41,14 +41,14 @@ /*********************************************************************

val = val.toString();
if (integerRegEx.test(val)) {
return exports.TYPES.INTEGER;
}
if (numberRegEx.test(val)) {
return exports.TYPES.NUMBER;
}
// shouldn't get here
return undefined;
}
if (typeof val !== 'string') {
return undefined;
}
if (integerRegEx.test(val)) {
return exports.TYPES.INTEGER;
}
if (numberRegEx.test(val)) {
return exports.TYPES.NUMBER;
}
if (lengthRegEx.test(val)) {

@@ -167,8 +167,10 @@ return exports.TYPES.LENGTH;

if (type === exports.TYPES.NULL_OR_EMPTY_STR) {
console.log('null or empty str');
return val;
}
if (type !== exports.TYPES.NUMBER) {
console.log('not a number', type);
return undefined;
}
return String(parseFloat(val, 10));
return String(parseFloat(val));
};

@@ -613,3 +615,3 @@

var match;
var dashed = camel_case.replace(camel_to_dashed, '-$1').toLowerCase();
var dashed = camel_case.replace(camel_to_dashed, '-$&').toLowerCase();
match = dashed.match(first_segment);

@@ -616,0 +618,0 @@ if (match && vendor_prefixes.indexOf(match[1]) !== -1) {

@@ -5,3 +5,3 @@ {

"keywords": ["CSS", "CSSStyleDeclaration", "StyleSheet"],
"version": "0.2.12",
"version": "0.2.13",
"homepage": "https://github.com/chad3814/CSSStyleDeclaration",

@@ -8,0 +8,0 @@ "maintainers": [{

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