@appnest/lit-util
Advanced tools
Comparing version 0.0.7 to 0.0.8
export * from "./keycode"; | ||
export * from "./pattern"; | ||
/** | ||
@@ -3,0 +4,0 @@ * An empty src to use when no media src can be provided |
export * from "./keycode"; | ||
export * from "./pattern"; | ||
/** | ||
@@ -3,0 +4,0 @@ * An empty src to use when no media src can be provided |
{ | ||
"name": "@appnest/lit-util", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Appnest", |
@@ -0,1 +1,2 @@ | ||
import { HEX_PATTERN } from "../constant/pattern"; | ||
/** | ||
@@ -6,3 +7,3 @@ * Converts a hex number into rgb. | ||
export function hexToRGB(hex) { | ||
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(hex); | ||
const result = HEX_PATTERN.exec(hex); | ||
if (result == null) | ||
@@ -28,3 +29,3 @@ return null; | ||
export function isHex(hex) { | ||
return /^#?(([a-f\d]{6})([a-f\d]{2})?|[a-f\d]{3})$/i.test(hex); | ||
return HEX_PATTERN.test(hex); | ||
} | ||
@@ -31,0 +32,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45789
50
809