简体   繁体   中英

Is there a way to get signature/documentation of a function in Node REPL?

"Tab"ing the REPL gives me a list of functions, but often working with multiple languages, I forget the signature of common functions like fs.open , etc. Is there anyway to show these in the REPL?

Thanks to auto-complete in editors, they seem to be fine. But REPL for writing some quick script, I have pull up the node documentation each time for simple things.

Is there a better way to deal with this?

This semi official project developed under the node umbrella on GitHub offers a few improvement over the default REPL while used interactively:

https://github.com/nodejs/repl

Syntax highlighting is enabled for the input, basic functions signatures are displayed as hints.

As stated in this issue, its future is still uncertain, but it's already quite usable in the current state: https://github.com/nodejs/repl/issues/46

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM