color-string
Advanced tools
Comparing version 1.5.5 to 1.6.0
@@ -132,3 +132,3 @@ /* MIT license */ | ||
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; | ||
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?[\d\.]+)\s*)?\)$/; | ||
var match = string.match(hsl); | ||
@@ -135,0 +135,0 @@ |
{ | ||
"name": "color-string", | ||
"description": "Parser and generator for CSS color strings", | ||
"version": "1.5.5", | ||
"version": "1.6.0", | ||
"author": "Heather Arthur <fayearthur@gmail.com>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -24,2 +24,3 @@ # color-string | ||
colorString.get('hsl(360, 100%, 50%)') // {model: 'hsl', value: [0, 100, 50, 1]} | ||
colorString.get('hsl(360 100% 50%)') // {model: 'hsl', value: [0, 100, 50, 1]} | ||
colorString.get('hwb(60, 3%, 60%)') // {model: 'hwb', value: [60, 3, 60, 1]} | ||
@@ -33,3 +34,5 @@ | ||
colorString.get.hsl('hsl(360, 100%, 50%)') // [0, 100, 50, 1] | ||
colorString.get.hsl('hsl(360 100% 50%)') // [0, 100, 50, 1] | ||
colorString.get.hsl('hsla(360, 60%, 50%, 0.4)') // [0, 60, 50, 0.4] | ||
colorString.get.hsl('hsl(360 60% 50% / 0.4)') // [0, 60, 50, 0.4] | ||
@@ -36,0 +39,0 @@ colorString.get.hwb('hwb(60, 3%, 60%)') // [60, 3, 60, 1] |
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
10242
62