This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/hex-color-regex/index.js
2019-08-11 20:48:02 +02:00

16 lines
459 B
JavaScript

/*!
* hex-color-regex <https://github.com/regexps/hex-color-regex>
*
* Copyright (c) 2015 Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk)
* Released under the MIT license.
*/
'use strict'
module.exports = function hexColorRegex(opts) {
opts = opts && typeof opts === 'object' ? opts : {}
return opts.strict
? /^#([a-f0-9]{3,4}|[a-f0-9]{4}(?:[a-f0-9]{2}){1,2})\b$/i
: /#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})\b/gi
}