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.

1234567891011121314151617
  1. const hashColorPattern = /^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/;
  2. const unpaddedFractionalNumbersPattern = /\.[0-9]/;
  3. const isMixinToken = (token) => {
  4. const [, symbol] = token;
  5. const [char] = symbol;
  6. return (
  7. (char === '.' || char === '#') &&
  8. // ignore hashes used for colors
  9. hashColorPattern.test(symbol) === false &&
  10. // ignore dots used for unpadded fractional numbers
  11. unpaddedFractionalNumbersPattern.test(symbol) === false
  12. );
  13. };
  14. module.exports = { isMixinToken };