style-value-types
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -48,3 +48,3 @@ "use strict"; | ||
var matches = v.match && v.match(FLOAT_REGEX); | ||
return (matches.constructor === Array && matches.length > 1); | ||
return (matches !== undefined && matches.constructor === Array && matches.length > 1); | ||
}, | ||
@@ -58,3 +58,3 @@ parse: function (v) { | ||
var counter = 0; | ||
var template = prop.replace(FLOAT_REGEX, function () { return generateToken(counter++); }); | ||
var template = prop.replace(FLOAT_REGEX, function () { return generateToken("" + counter++); }); | ||
return function (v) { | ||
@@ -64,3 +64,3 @@ var output = template; | ||
if (v.hasOwnProperty(key)) { | ||
output = output.replace(generateToken(key), v[key]); | ||
output = output.replace(generateToken(key), v[key].toString()); | ||
} | ||
@@ -67,0 +67,0 @@ } |
{ | ||
"name": "style-value-types", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Parsers, transformers and tests for special value types, eg: %, hex codes etc.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
27541
7
505