Socket
Socket
Sign inDemoInstall

rework

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rework - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

2

component.json
{
"name": "rework",
"version": "0.4.1",
"version": "0.5.1",
"description": "CSS manipulations built on CSSOM",

@@ -5,0 +5,0 @@ "keywords": ["css", "manipulation", "preprocess", "transform"],

0.5.1 / 2012-09-18
==================
* add visiting of `@media` nodes for `url()`
* add `/g` flag to `url()`
0.5.0 / 2012-09-17

@@ -3,0 +9,0 @@ ==================

@@ -25,5 +25,3 @@

return function(style, rework){
style.rules.forEach(function(rule){
if (rule.declarations) url(rule, fn);
});
rules(style.rules, fn);
}

@@ -33,2 +31,17 @@ };

/**
* Visit `rules`.
*
* @param {Array} rules
* @param {Function} fn
* @api private
*/
function rules(arr, fn) {
arr.forEach(function(rule){
if (rule.rules) rules(rule.rules, fn);
if (rule.declarations) url(rule, fn);
});
}
/**
* Map url().

@@ -42,3 +55,3 @@ *

if (!~decl.value.indexOf('url(')) return decl;
decl.value = decl.value.replace(/url\(([^)]+)\)/, function(_, url){
decl.value = decl.value.replace(/url\(([^)]+)\)/g, function(_, url){
url = utils.stripQuotes(url);

@@ -45,0 +58,0 @@ return 'url("' + fn(url) + '")';

{
"name": "rework",
"version": "0.5.0",
"version": "0.5.1",
"description": "CSS manipulations built on CSSOM",

@@ -5,0 +5,0 @@ "keywords": ["css", "manipulation", "preprocess", "transform"],

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