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

rework

Package Overview
Dependencies
Maintainers
2
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.20.0 to 0.20.1

2

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

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

@@ -0,1 +1,6 @@

0.20.1 / 2013-12-23
===================
* fix last tag. please ignore 0.20.0. thank you for your cooperation.
0.20.0 / 2013-12-23

@@ -2,0 +7,0 @@ ===================

@@ -33,2 +33,3 @@

* @param {String} str
* @param {Object} options
* @return {Rework}

@@ -38,4 +39,6 @@ * @api public

function rework(str) {
return new Rework(css.parse(str));
function rework(str, options) {
options = options || {};
options.position = true; // we need this for sourcemaps
return new Rework(css.parse(str, options));
}

@@ -94,6 +97,25 @@

Rework.prototype.toString = function(options){
return css.stringify(this.obj, options);
options = options || {};
var result = css.stringify(this.obj, options);
if (options.sourcemap && !options.sourcemapAsObject) {
result = result.code + '\n' + sourcemapToComment(result.map);
}
return result;
};
/**
* Convert sourcemap to base64-encoded comment
*
* @param {Object} map
* @return {String}
* @api private
*/
function sourcemapToComment(map) {
var convertSourceMap = require('convert-source-map');
var content = convertSourceMap.fromObject(map).toBase64();
return '/*# sourceMappingURL=data:application/json;base64,' + content + ' */';
}
/**
* Expose plugins.

@@ -137,2 +159,2 @@ */

function noop(){}
function noop(){}
{
"name": "rework",
"version": "0.20.0",
"version": "0.20.1",
"description": "CSS manipulations built on CSSOM",
"keywords": ["css", "manipulation", "preprocess", "transform"],
"keywords": [
"css",
"manipulation",
"preprocess",
"transform"
],
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -19,3 +24,4 @@ "repository": {

"rework-inherit": "0.2.1",
"rework-visit": "1.0.0"
"rework-visit": "1.0.0",
"convert-source-map": "~0.3.1"
},

@@ -22,0 +28,0 @@ "devDependencies": {

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