Browse Source

console.log: if not string, coerce into one

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
6b430a95c9
  1. 2
      src/node.js

2
src/node.js

@ -194,7 +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; if (!(f instanceof String)) f = String(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…
Cancel
Save