Search code examples
node.jsread-eval-print-loop

Node.js REPL function docstring


Theseday, I start the node.js. I have a problem in nodejs REPL.

When I use Python, I just use "?" method to check the function's docstring ( in python repl, ipython too)

enter image description here

That's cos function structure in ipython by using "math.cos?" order.

Otherwise, I can't find a this method in node.js repl. This function is very necessary when we do programming.

Can you give me a some tip for checking docstring in node.js ?


Solution

  • I afraid there is no build in command to check the function’s structure or docstring in node-repl right now as you can do in python-repl or ipython. But the good new is the contributors are already working on a feature like this.

    For the time being you can use node-help or node-repl as an alternative. Although they are not good enough, they should work for now.