If not string, console.log should just print it without trying to format

v0.7.4-release
Ryan Dahl 2010-06-28 21:12:33 -07:00
parent c9e12204a2
commit b69c6a03b1
1 changed files with 1 additions and 0 deletions

View File

@ -194,6 +194,7 @@ process.openStdin = function () {
function format (f) {
var i = 1;
var args = arguments;
if (!(f instanceof String)) return f;
return f.replace(/%([sdf])/g, function (x) {
switch (x) {
case '%s': return args[i++];