🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

cssnano-utils

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssnano-utils - npm Package Compare versions

Comparing version

to
1.0.1

14

dist/getArguments.js

@@ -1,2 +0,9 @@

export default function getArguments(node) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getArguments;
function getArguments(node) {
return node.nodes.reduce((list, child) => {

@@ -8,4 +15,7 @@ if (child.type !== 'div') {

}
return list;
}, [[]]);
}
}
module.exports = exports.default;

@@ -1,2 +0,9 @@

export default function getMatchFactory(map) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getMatchFactory;
function getMatchFactory(map) {
return function getMatch(args) {

@@ -13,2 +20,4 @@ const match = args.reduce((list, arg, i) => {

};
}
}
module.exports = exports.default;

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

import rawCache from './rawCache.js';
import getMatch from './getMatch.js';
import getArguments from './getArguments.js';
import sameParent from './sameParent.js';
"use strict";
export { rawCache, getMatch, getArguments, sameParent };
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "rawCache", {
enumerable: true,
get: function () {
return _rawCache.default;
}
});
Object.defineProperty(exports, "getMatch", {
enumerable: true,
get: function () {
return _getMatch.default;
}
});
Object.defineProperty(exports, "getArguments", {
enumerable: true,
get: function () {
return _getArguments.default;
}
});
Object.defineProperty(exports, "sameParent", {
enumerable: true,
get: function () {
return _sameParent.default;
}
});
var _rawCache = _interopRequireDefault(require("./rawCache.js"));
var _getMatch = _interopRequireDefault(require("./getMatch.js"));
var _getArguments = _interopRequireDefault(require("./getArguments.js"));
var _sameParent = _interopRequireDefault(require("./sameParent.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -1,4 +0,11 @@

import { plugin } from 'postcss';
"use strict";
export default plugin('cssnano-util-raw-cache', () => {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _postcss = require("postcss");
var _default = (0, _postcss.plugin)('cssnano-util-raw-cache', () => {
return (css, result) => {

@@ -19,2 +26,5 @@ result.root.rawCache = {

};
});
});
exports.default = _default;
module.exports = exports.default;

25

dist/sameParent.js

@@ -0,1 +1,8 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = sameParent;
/**

@@ -10,5 +17,5 @@ * @param {postcss.ChildNode} nodeA

}
return nodeA.type === nodeB.type;
}
/**

@@ -19,3 +26,5 @@ * @param {postcss.ChildNode} nodeA

*/
export default function sameParent(nodeA, nodeB) {
function sameParent(nodeA, nodeB) {
if (!nodeA.parent) {

@@ -29,11 +38,13 @@ // A is orphaned, return if B is orphaned as well

return false;
}
} // Check if parents match
// Check if parents match
if (!checkMatch(nodeA.parent, nodeB.parent)) {
return false;
}
} // Check parents' parents
// Check parents' parents
return sameParent(nodeA.parent, nodeB.parent);
}
}
module.exports = exports.default;
{
"name": "cssnano-utils",
"version": "1.0.0",
"version": "1.0.1",
"repository": "cssnano/cssnano",

@@ -9,4 +9,3 @@ "main": "dist/index.js",

"prebuild": "del-cli dist",
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.js --out-dir dist --ignore \"**/__tests__/\"",
"prepublish": "yarn build"
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.js --out-dir dist --ignore \"**/__tests__/\""
},

@@ -26,7 +25,3 @@ "homepage": "https://github.com/cssnano/cssnano",

"postcss": "^7.0.16"
},
"devDependencies": {
"cross-env": "^7.0.2",
"del-cli": "^3.0.0"
}
}