nicer removeProperties for comments
This commit is contained in:
parent
346f72be05
commit
99ba77bb0b
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user