nicer removeProperties for comments

This commit is contained in:
Sebastian McKenzie 2014-11-07 12:33:22 +11:00
parent 346f72be05
commit 99ba77bb0b

View File

@ -85,6 +85,7 @@ function traverse(parent, callbacks, opts) {
traverse.removeProperties = function (tree) {
var clear = function (node) {
delete node.extendedRange;
delete node.tokens;
delete node.range;
delete node.start;
@ -97,10 +98,7 @@ traverse.removeProperties = function (tree) {
};
var clearComments = function (comments) {
_.each(comments, function (comment) {
delete comment.extendedRange;
clear(comment);
});
_.each(comments, clear);
};
clear(tree);