Browse Source

Add global print() function.

v0.7.4-release
Ryan 16 years ago
parent
commit
7cce31d4e4
  1. 6
      src/file.js

6
src/file.js

@ -177,10 +177,8 @@ stdout = new node.fs.File({ fd: node.constants.STDOUT_FILENO });
stderr = new node.fs.File({ fd: node.constants.STDERR_FILENO }); stderr = new node.fs.File({ fd: node.constants.STDERR_FILENO });
stdin = new node.fs.File({ fd: node.constants.STDIN_FILENO }); stdin = new node.fs.File({ fd: node.constants.STDIN_FILENO });
puts = function (data, callback) { puts = stdout.puts;
stdout.puts(data, callback); print = stdout.print;
}
p = function (data, callback) { p = function (data, callback) {
puts(JSON.stringify(data), callback); puts(JSON.stringify(data), callback);
} }

Loading…
Cancel
Save