lukehaas / RunJS

RunJS is a JavaScript playground for macOS, Windows and Linux. Write code with instant feedback and access to Node.js and browser APIs.
https://runjs.app
2.01k stars 43 forks source link

Increase text buffer size #567

Closed paul-uz closed 1 year ago

paul-uz commented 1 year ago

I need to test the conversion of XML to JSON, and the XML is about 12k lines. Trying to console out the result, I cannot see anything in the right hand panel, as it stops at 10k lines.

Is there a way to increase the text buffer size?

lukehaas commented 1 year ago

@paul-uz currently not, for performance reasons. I'd recommend writing the output to a file instead of console out.

paul-uz commented 1 year ago

What's the quickest way to write the data to a file?

lukehaas commented 1 year ago

Something like this:

const fs = require('fs');

const content = 'Some content!';

fs.writeFile('/Users/joe/test.txt', content, err => {
  if (err) {
    console.error(err);
  }
  // file written successfully
});