Skip to content

Commit 0156998

Browse files
authored
Rename internal function and update JSDoc
1 parent cc3a6af commit 0156998

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

lib/parsers.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -651,9 +651,9 @@ const resolveFunctionValue = (value, opt = {}) => {
651651
};
652652

653653
/**
654-
* Resolves a length or percentage or number value.
654+
* Resolves a numeric value.
655655
*
656-
* @param {Array<object>} value - The AST node array containing the value.
656+
* @param {Array<object>} value - The AST node array containing the numeric value.
657657
* @param {object} [opt={}] - The options for parsing.
658658
* @returns {string|undefined} The resolved length/percentage/number or undefined.
659659
*/
@@ -726,13 +726,13 @@ const resolveColorValue = (value, opt = {}) => {
726726
};
727727

728728
/**
729-
* Resolves a gradient or URL value.
729+
* Resolves an image value.
730730
*
731-
* @param {Array<object>} value - The AST node array containing the color value.
731+
* @param {Array<object>} value - The AST node array containing the image value.
732732
* @param {object} [opt={}] - The options for parsing.
733733
* @returns {string|undefined} The resolved gradient/url or undefined.
734734
*/
735-
const resolveGradientUrlValue = (value, opt = {}) => {
735+
const resolveImageValue = (value, opt = {}) => {
736736
const [{ name, type }] = value;
737737
const { length } = opt;
738738
switch (type) {
@@ -841,7 +841,7 @@ module.exports = {
841841
resolveCalc,
842842
resolveColorValue,
843843
resolveFunctionValue,
844-
resolveGradientUrlValue,
844+
resolveImageValue,
845845
resolveKeywordValue,
846846
resolveNumericValue,
847847
splitValue

lib/properties/backgroundImage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports.parse = (v, opt = {}) => {
1717
globalObject
1818
});
1919
if (Array.isArray(value) && value.length === 1) {
20-
const parsedValue = parsers.resolveGradientUrlValue(value);
20+
const parsedValue = parsers.resolveImageValue(value);
2121
if (!parsedValue) {
2222
return;
2323
}

0 commit comments

Comments
 (0)