From b7a47ae901c148ced1f166aba0becda5bf7db596 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 25 Mar 2022 16:08:15 +0530 Subject: [PATCH] Give function better name --- scripts/postcss/css-url-to-variables.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/postcss/css-url-to-variables.js b/scripts/postcss/css-url-to-variables.js index 34d21bcc..aff8eef9 100644 --- a/scripts/postcss/css-url-to-variables.js +++ b/scripts/postcss/css-url-to-variables.js @@ -24,7 +24,7 @@ let counter; let urlVariables; const idToPrepend = "icon-url"; -function extractUrl(decl) { +function findAndReplaceUrl(decl) { const value = decl.value; const parsed = valueParser(value); parsed.walk(node => { @@ -60,7 +60,7 @@ module.exports = (opts = {}) => { postcssPlugin: "postcss-url-to-variable", Once(root, { Rule, Declaration }) { - root.walkDecls(decl => extractUrl(decl)); + root.walkDecls(decl => findAndReplaceUrl(decl)); addResolvedVariablesToRootSelector(root, { Rule, Declaration }); }, };