From 7cce31d4e4c3b3c2b8cc29a34c2a853655f5d055 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 15 Jun 2009 16:57:10 +0200 Subject: [PATCH] Add global print() function. --- src/file.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/file.js b/src/file.js index 307305fc4d7..a087be4ad9b 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); }