Package Support: Node.js supports npm package searching and installing on the fly. You can search for any package and add it to your project, generating a
package.jsonfile for you, where you can then import it into your program. More on that in our packager announcement.
Infinite Loop Protection: Finally, if you accidentally write an infinite loop (we've all been there), your browser won't be locked up, since the code is not running on your machine.
prompt API. While we know that
prompt is convenient, it's considered an antiquated API and its use in modern web development is generally frowned upon. If you'd like to do I/O in the node.js REPL you can do so using the
readline-sync package which we pre-include in our Node.js image. You can try an example here: https://repl.it/@timmy_i_chen/readline-sync-demo
We made this change because we believe it will be beneficial to Repl.it users, both new and old. We welcome any feedback in the comments below, and we look forward to working with you in the future to create awesome projects.
@timmy_i_chen Sure Timmy that could work. I just wonder, isn't just easier to bring the good ol' JS Repl back? I looked at the points you made, they're valid points. Still, if there's no performance impact for you guys, why not re-implement them? I think User Experience is what you should drive your decision, unless there's a performance implication on your side.
Thanks for following up.