Skip to content

Commit

Permalink
Convert callbacks to arrow functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed May 6, 2021
1 parent 84640e4 commit 8c63b8a
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions strip-test-selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ function isTestSelector(attribute) {
}

function stripTestSelectors(node) {
node.params = node.params.filter(function(param) {
return !isTestSelector(param.original);
});

node.hash.pairs = node.hash.pairs.filter(function(pair) {
return !isTestSelector(pair.key);
});
node.params = node.params.filter(param => !isTestSelector(param.original));
node.hash.pairs = node.hash.pairs.filter(pair => !isTestSelector(pair.key));
}

function transform() {
Expand All @@ -24,9 +19,7 @@ function transform() {

visitor: {
ElementNode(node) {
node.attributes = node.attributes.filter(function(attribute) {
return !isTestSelector(attribute.name);
});
node.attributes = node.attributes.filter(attribute => !isTestSelector(attribute.name));
},

MustacheStatement(node) {
Expand Down

0 comments on commit 8c63b8a

Please sign in to comment.