index.js 254 B

123456789
  1. 'use strict';
  2. module.exports = function hslaRegex(options) {
  3. options = options || {};
  4. return options.exact ?
  5. /^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/ :
  6. /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)/ig;
  7. }