mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-05-24 14:25:30 +00:00
feat: receives text, title and icon colors from URL
This commit is contained in:
+7
-1
@@ -25,4 +25,10 @@ function kFormatter(num) {
|
||||
: Math.sign(num) * Math.abs(num);
|
||||
}
|
||||
|
||||
module.exports = { renderError, kFormatter, encodeHTML };
|
||||
function isValidHexColor(hexColor) {
|
||||
return new RegExp(
|
||||
/^([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{4})$/
|
||||
).test(hexColor);
|
||||
}
|
||||
|
||||
module.exports = { renderError, kFormatter, encodeHTML, isValidHexColor };
|
||||
|
||||
Reference in New Issue
Block a user