Socket
Socket
Sign inDemoInstall

juice

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

juice - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

lib/juice.js

@@ -22,3 +22,3 @@

exports.version = '0.0.3';
exports.version = '0.0.4';

@@ -25,0 +25,0 @@ /**

@@ -53,3 +53,3 @@

Property.prototype.toString = function () {
return this.prop + ': ' + this.value + ';';
return this.prop + ': ' + this.value.replace(/['"]+/g, '') + ';';
};

@@ -19,3 +19,3 @@

exports.extract = function extract (selectorText) {
var attr = false
var attr = 0
, sels = []

@@ -28,3 +28,3 @@ , sel = ''

if (attr) {
if (']' == c) attr = false;
if (']' == c || ')' == c) attr--;
sel += c;

@@ -36,3 +36,3 @@ } else {

} else {
if ('[' == c) attr = true;
if ('[' == c || '(' == c) attr++;
if (sel.length || (c != ',' && c != ' ')) sel += c;

@@ -99,18 +99,2 @@ }

/**
* Escape the given string of `html`.
*
* @param {String} html
* @return {String}
* @api private
*/
exports.escape = function escape(html){
return String(html)
.replace(/&(?!\w+;)/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
};
/**
* Compares two specificity vectors, returning the winning one.

@@ -117,0 +101,0 @@ *

{
"name": "juice"
, "version": "0.0.3"
, "version": "0.0.4"
, "description": "Inlines css into html source"

@@ -5,0 +5,0 @@ , "contributors": [

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