From dbecaa12131adf4843f79c8f7be1b027af57f0c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Kr=C3=A4uchi?= Date: Thu, 17 Nov 2022 09:20:13 +0100 Subject: [PATCH] Create validation build --- validation/dist/cjs/isRgbaString.js | 2 +- validation/dist/mjs/isRgbaString.js | 2 +- validation/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/validation/dist/cjs/isRgbaString.js b/validation/dist/cjs/isRgbaString.js index 3f594c6..c8d3106 100644 --- a/validation/dist/cjs/isRgbaString.js +++ b/validation/dist/cjs/isRgbaString.js @@ -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; diff --git a/validation/dist/mjs/isRgbaString.js b/validation/dist/mjs/isRgbaString.js index 6300746..62dd1f9 100644 --- a/validation/dist/mjs/isRgbaString.js +++ b/validation/dist/mjs/isRgbaString.js @@ -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, "")); }; diff --git a/validation/package.json b/validation/package.json index 5e72e23..302c45f 100644 --- a/validation/package.json +++ b/validation/package.json @@ -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",