Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Add global print() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Jun 15, 2009
1 parent 870b5db commit 7cce31d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/file.js
Expand Up @@ -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);
}

0 comments on commit 7cce31d

Please sign in to comment.