You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
parttimejob/node_modules/csso/lib/clean/index.js

21 lines
576 B

1 month ago
var walk = require('css-tree').walk;
var handlers = {
Atrule: require('./Atrule'),
Comment: require('./Comment'),
Declaration: require('./Declaration'),
Raw: require('./Raw'),
Rule: require('./Rule'),
TypeSelector: require('./TypeSelector'),
WhiteSpace: require('./WhiteSpace')
};
module.exports = function(ast, options) {
walk(ast, {
leave: function(node, item, list) {
if (handlers.hasOwnProperty(node.type)) {
handlers[node.type].call(this, node, item, list, options);
}
}
});
};