color-string
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -15,3 +15,4 @@ /* MIT license */ | ||
var cs = module.exports = { | ||
to: {} | ||
to: {}, | ||
get: {} | ||
}; | ||
@@ -132,3 +133,3 @@ | ||
var hsl = /^hsla?\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; | ||
var hsl = /^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; | ||
var match = string.match(hsl); | ||
@@ -138,3 +139,3 @@ | ||
var alpha = parseFloat(match[4]); | ||
var h = ((parseFloat(match[1]) % 360) + 360) % 360; | ||
var h = (parseFloat(match[1]) + 360) % 360; | ||
var s = clamp(parseFloat(match[2]), 0, 100); | ||
@@ -141,0 +142,0 @@ var l = clamp(parseFloat(match[3]), 0, 100); |
{ | ||
"name": "color-string", | ||
"description": "Parser and generator for CSS color strings", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"author": "Heather Arthur <fayearthur@gmail.com>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
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
10049
189