You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
422 B
21 lines
422 B
'use strict'; |
|
|
|
/** |
|
* Check whether a property is SCSS variable |
|
* |
|
* @param {string} property |
|
* @returns {boolean} |
|
*/ |
|
module.exports = function (property) { |
|
// SCSS var (e.g. $var: x), list (e.g. $list: (x)) or map (e.g. $map: (key:value)) |
|
if (property.startsWith('$')) { |
|
return true; |
|
} |
|
|
|
// SCSS var within a namespace (e.g. namespace.$var: x) |
|
if (property.includes('.$')) { |
|
return true; |
|
} |
|
|
|
return false; |
|
};
|
|
|