Skip to content

Commit

Permalink
Create validation build
Browse files Browse the repository at this point in the history
  • Loading branch information
al-soup committed Nov 17, 2022
1 parent b851c1c commit dbecaa1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion validation/dist/cjs/isRgbaString.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ const isRgbaString = (rgba) => {
return false;
// source: https://rgxdb.com/r/GFYPX74
const regex = /rgba\(\s*(-?\d+|-?\d*\.\d+(?=%))(%?)\s*,\s*(-?\d+|-?\d*\.\d+(?=%))(\2)\s*,\s*(-?\d+|-?\d*\.\d+(?=%))(\2)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/;
return regex.test(rgba);
return regex.test(rgba.toLowerCase().replace(/ +/g, ""));
};
exports.isRgbaString = isRgbaString;
2 changes: 1 addition & 1 deletion validation/dist/mjs/isRgbaString.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export const isRgbaString = (rgba) => {
return false;
// source: https://rgxdb.com/r/GFYPX74
const regex = /rgba\(\s*(-?\d+|-?\d*\.\d+(?=%))(%?)\s*,\s*(-?\d+|-?\d*\.\d+(?=%))(\2)\s*,\s*(-?\d+|-?\d*\.\d+(?=%))(\2)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/;
return regex.test(rgba);
return regex.test(rgba.toLowerCase().replace(/ +/g, ""));
};
2 changes: 1 addition & 1 deletion validation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nzz/et-utils-validation",
"version": "1.0.0",
"version": "1.0.1",
"description": "Library containing validator functions",
"repository": {
"type": "git",
Expand Down

0 comments on commit dbecaa1

Please sign in to comment.