nicer removeProperties for comments
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user