mirror of https://github.com/nodejs/node.git
If not string, console.log should just print it without trying to format
parent
c9e12204a2
commit
b69c6a03b1
|
@ -194,6 +194,7 @@ process.openStdin = function () {
|
||||||
function format (f) {
|
function format (f) {
|
||||||
var i = 1;
|
var i = 1;
|
||||||
var args = arguments;
|
var args = arguments;
|
||||||
|
if (!(f instanceof String)) return f;
|
||||||
return f.replace(/%([sdf])/g, function (x) {
|
return f.replace(/%([sdf])/g, function (x) {
|
||||||
switch (x) {
|
switch (x) {
|
||||||
case '%s': return args[i++];
|
case '%s': return args[i++];
|
||||||
|
|
Loading…
Reference in New Issue