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

more-css

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

more-css - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

2

package.json
{
"name": "more-css",
"version": "0.3.5",
"version": "0.3.6",
"description": "a css pre-compiler & agressive compressor",

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

@@ -39,2 +39,6 @@ ##A css pre-compiler by javascript

more.global(global:Object<String, String/Number/Boolean>):Object<String, String/Number/Boolean>
设置全局变量,可在所有文件中被访问。局部变量拥有更高优先级。
more.styles():Object<String, String>

@@ -41,0 +45,0 @@

@@ -22,3 +22,4 @@ var CssLexer = require('./lexer/CssLexer'),

levels,
exArr;
exArr,
global;

@@ -45,2 +46,3 @@ function init(ignore) {

exArr = [];
global = {};
}

@@ -82,4 +84,5 @@ function preVar(node) {

c = s.slice(i + 2, j);
if(varHash[c]) {
s = s.slice(0, i) + (type == Token.STRING && /^['"]/.test(s) ? varHash[c].replace(/^(['"])(.*)\1$/, '$2') : varHash[c]) + s.slice(j + 1);
var vara = varHash[c] || global[c];
if(vara) {
s = s.slice(0, i) + (type == Token.STRING && /^['"]/.test(s) ? vara.replace(/^(['"])(.*)\1$/, '$2') : vara) + s.slice(j + 1);
}

@@ -90,4 +93,5 @@ }

c = /^[\w-]+/.exec(s.slice(i + 1))[0];
if(varHash[c]) {
s = s.slice(0, i) + (type == Token.STRING && /^['"]/.test(s) ? varHash[c].replace(/^(['"])(.*)\1$/, '$2') : varHash[c]) + s.slice(i + c.length + 1);
var vara = varHash[c] || global[c];
if(vara) {
s = s.slice(0, i) + (type == Token.STRING && /^['"]/.test(s) ? vara.replace(/^(['"])(.*)\1$/, '$2') : vara) + s.slice(i + c.length + 1);
}

@@ -361,2 +365,6 @@ }

};
exports.global = function(g) {
global = g;
return global;
};
exports.imports = function() {

@@ -363,0 +371,0 @@ return imports;

@@ -23,3 +23,4 @@ define(function(require, exports) {

levels,
exArr;
exArr,
global;

@@ -46,2 +47,3 @@ function init(ignore) {

exArr = [];
global = {};
}

@@ -83,4 +85,5 @@ function preVar(node) {

c = s.slice(i + 2, j);
if(varHash[c]) {
s = s.slice(0, i) + (type == Token.STRING && /^['"]/.test(s) ? varHash[c].replace(/^(['"])(.*)\1$/, '$2') : varHash[c]) + s.slice(j + 1);
var vara = varHash[c] || global[c];
if(vara) {
s = s.slice(0, i) + (type == Token.STRING && /^['"]/.test(s) ? vara.replace(/^(['"])(.*)\1$/, '$2') : vara) + s.slice(j + 1);
}

@@ -91,4 +94,5 @@ }

c = /^[\w-]+/.exec(s.slice(i + 1))[0];
if(varHash[c]) {
s = s.slice(0, i) + (type == Token.STRING && /^['"]/.test(s) ? varHash[c].replace(/^(['"])(.*)\1$/, '$2') : varHash[c]) + s.slice(i + c.length + 1);
var vara = varHash[c] || global[c];
if(vara) {
s = s.slice(0, i) + (type == Token.STRING && /^['"]/.test(s) ? vara.replace(/^(['"])(.*)\1$/, '$2') : vara) + s.slice(i + c.length + 1);
}

@@ -362,2 +366,6 @@ }

};
exports.global = function(g) {
global = g;
return global;
};
exports.imports = function() {

@@ -364,0 +372,0 @@ return imports;

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