if (n <= 1) return 0;
To build tools like that, you yourself need to understand the various ways you can directly interface with the terminal. While the minimal command-line we implemented above is obviously incomplete and not robust, it is straightforward (if tedious) to flesh out the few-dozen features most people expect a command-line to have. After that, you're on par with what's out there, and you are free to implement more features and rich interactions beyond what existing libraries like Readline/Jline provide.
,详情可参考服务器推荐
How to contribute to npmx.dev, and thoughts on Johnny's experience with the project.
Myles' character is inspired by the career of former detective Julie Mackay