- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
21 lines
576 B
JavaScript
21 lines
576 B
JavaScript
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);
|
|
}
|
|
}
|
|
});
|
|
};
|