Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

isScssVariable.js 422B

123456789101112131415161718192021
  1. 'use strict';
  2. /**
  3. * Check whether a property is SCSS variable
  4. *
  5. * @param {string} property
  6. * @returns {boolean}
  7. */
  8. module.exports = function (property) {
  9. // SCSS var (e.g. $var: x), list (e.g. $list: (x)) or map (e.g. $map: (key:value))
  10. if (property.startsWith('$')) {
  11. return true;
  12. }
  13. // SCSS var within a namespace (e.g. namespace.$var: x)
  14. if (property.includes('.$')) {
  15. return true;
  16. }
  17. return false;
  18. };