summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <ry@tinyclouds.org>2009-06-15 16:57:10 +0200
committerRyan <ry@tinyclouds.org>2009-06-15 16:57:10 +0200
commit7cce31d4e4c3b3c2b8cc29a34c2a853655f5d055 (patch)
treebc99bee1c2c96d67b11fef07937c7e6928d3294a
parent870b5db46c1c39b8f11de54e273bb955bff040b5 (diff)
downloadnodejs-7cce31d4e4c3b3c2b8cc29a34c2a853655f5d055.tar.gz
nodejs-7cce31d4e4c3b3c2b8cc29a34c2a853655f5d055.tar.bz2
nodejs-7cce31d4e4c3b3c2b8cc29a34c2a853655f5d055.zip
Add global print() function.
-rw-r--r--src/file.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/file.js b/src/file.js
index 307305fc4..a087be4ad 100644
--- a/src/file.js
+++ b/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 });
stdin = new node.fs.File({ fd: node.constants.STDIN_FILENO });
-puts = function (data, callback) {
- stdout.puts(data, callback);
-}
-
+puts = stdout.puts;
+print = stdout.print;
p = function (data, callback) {
puts(JSON.stringify(data), callback);
}