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.

isValidHex.js 243B

1234567891011
  1. 'use strict';
  2. /**
  3. * Check if a value is a valid 3, 4, 6 or 8 digit hex
  4. *
  5. * @param {string} value
  6. * @returns {boolean}
  7. */
  8. module.exports = function (value) {
  9. return /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(value);
  10. };