mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Add global print() function.
This commit is contained in:
1 parent
870b5db46c
commit
7cce31d4e4
1 file changed
+2
-4
+2
-4
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user