Commits

Anonymous committed 92827ae

say opcode: use print only if it exists and console.log otherwise

Comments (0)

Files changed (1)

     var output = buffer.slice(0, buffer.lastIndexOf('\n'));
     buffer = buffer.slice(buffer.lastIndexOf('\n') + 1);
 
-    if(typeof require == 'function') {
-	require('sys').puts(output);
-    } else {
+    if(typeof print == 'function') {
 	print(output);
+    } else if(console && typeof console.log == 'function') {
+	console.log(output);
     }
 };