From eb8adbe13190fae476830e909ada6718bca1dc9d Mon Sep 17 00:00:00 2001 From: Julio Vedovatto Date: Sun, 24 Nov 2019 23:43:54 -0300 Subject: [PATCH] Unused method removed --- lib/resolve-value.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/resolve-value.js b/lib/resolve-value.js index 0f5fafd..1954758 100644 --- a/lib/resolve-value.js +++ b/lib/resolve-value.js @@ -14,10 +14,6 @@ function toString(value) { return String(value); } -function filterDistinct(value, index, self) { - return self.indexOf(value) === index; -} - // Pass in a value string to parse/resolve and a map of available values // and we can figure out the final value // @@ -32,7 +28,7 @@ var resolveValue = function(decl, map, /*optional*/ignorePseudoScope, /*internal var matchingVarDecl = undefined; var resultantValue = toString(decl.value); var warnings = []; - + // Match all variables first so we can later on if there are circular dependencies var variablesUsedInValueMap = {} // Create a temporary variable, storing resultantValue variable value @@ -61,7 +57,7 @@ var resolveValue = function(decl, map, /*optional*/ignorePseudoScope, /*internal // Resolve any var(...) substitutons var isResultantValueUndefined = false; - + // var() = var( [, ]? ) // matches `name[, fallback]`, captures "name" and "fallback" // See: http://dev.w3.org/csswg/css-variables/#funcdef-var @@ -75,7 +71,7 @@ var resolveValue = function(decl, map, /*optional*/ignorePseudoScope, /*internal // Get variable name and fallback, filtering empty items var variableName = variableFallbackSplitPieces[0].trim(); var fallback = variableFallbackSplitPieces.length > 1 ? variableFallbackSplitPieces.slice(1).join(',').trim() : undefined; - + (map[variableName] || []).forEach(function(varDeclMapItem) { // Make sure the variable declaration came from the right spot // And if the current matching variable is already important, a new one to replace it has to be important