color-string
Advanced tools
Comparing version 1.0.1 to 1.1.0
10
index.js
@@ -15,6 +15,14 @@ /* MIT license */ | ||
var cs = module.exports = { | ||
get: {}, | ||
to: {} | ||
}; | ||
cs.get = function (string) { | ||
var prefix = string.substring(0, 3).toLowerCase(); | ||
switch (prefix) { | ||
case 'hsl': return {model: 'hsl', value: cs.get.hsl(string)}; | ||
case 'hwb': return {model: 'hwb', value: cs.get.hwb(string)}; | ||
default: return {model: 'rgb', value: cs.get.rgb(string)}; | ||
} | ||
}; | ||
cs.get.rgb = function (string) { | ||
@@ -21,0 +29,0 @@ if (!string) { |
{ | ||
"name": "color-string", | ||
"description": "Parser and generator for CSS color strings", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"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
8793
151