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.

isStandardSyntaxMediaFeature.js 533B

1234567891011121314151617181920212223242526
  1. 'use strict';
  2. const hasInterpolation = require('../utils/hasInterpolation');
  3. /**
  4. * Check whether a media feature is standard
  5. *
  6. * @param {string} mediaFeature
  7. * @returns {boolean}
  8. */
  9. module.exports = function (mediaFeature) {
  10. // Remove outside parens
  11. mediaFeature = mediaFeature.slice(1, -1);
  12. // Parentheticals used for non-standard operations e.g. ($var - 10)
  13. if (mediaFeature.includes('(')) {
  14. return false;
  15. }
  16. // SCSS or Less interpolation
  17. if (hasInterpolation(mediaFeature)) {
  18. return false;
  19. }
  20. return true;
  21. };