From 8c63b8a9b488ed4f84d4f7e3536c36661ead38ea Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 6 May 2021 16:20:33 +0200 Subject: [PATCH] Convert callbacks to arrow functions --- strip-test-selectors.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/strip-test-selectors.js b/strip-test-selectors.js index 08045bec..a6262a9f 100644 --- a/strip-test-selectors.js +++ b/strip-test-selectors.js @@ -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() { @@ -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) {