source: trip-planner-front/node_modules/csso/lib/replace/index.js@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 740 bytes
RevLine 
[6a3a178]1var walk = require('css-tree').walk;
2var handlers = {
3 Atrule: require('./Atrule'),
4 AttributeSelector: require('./AttributeSelector'),
5 Value: require('./Value'),
6 Dimension: require('./Dimension'),
7 Percentage: require('./Percentage'),
8 Number: require('./Number'),
9 String: require('./String'),
10 Url: require('./Url'),
11 Hash: require('./color').compressHex,
12 Identifier: require('./color').compressIdent,
13 Function: require('./color').compressFunction
14};
15
16module.exports = function(ast) {
17 walk(ast, {
18 leave: function(node, item, list) {
19 if (handlers.hasOwnProperty(node.type)) {
20 handlers[node.type].call(this, node, item, list);
21 }
22 }
23 });
24};
Note: See TracBrowser for help on using the repository browser.