mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
util: more strict check for bool/number/string
This commit is contained in:
@@ -118,7 +118,7 @@ var stringifyPrimitive = function(v) {
|
||||
if (util.isString(v))
|
||||
return v;
|
||||
if (util.isBoolean(v))
|
||||
return v ? 'true' : 'false';
|
||||
return v == true ? 'true' : 'false';
|
||||
if (util.isNumber(v))
|
||||
return isFinite(v) ? v : '';
|
||||
return '';
|
||||
|
||||
Reference in New Issue
Block a user