6

Is there a way to display the documentation of installed NodeJS packages in a console window (as a command line tool)? Often - in case of editing on a server - it is easier to view the docs of some specific stuff right in the command window, then to start a browser.

Such as npm docs fs or npm docs express would be perfect, but these try to start a browser and display documentation there instead of displaying README.md directly in the window.

Something similar to Perl's perldoc would be a perfect solution.

1 Answer 1

2

Here's what I do when I'm in a hurry:

# nodedoc
# USAGE: nodedoc <name of module>
# e.g. nodedoc http

curl https://raw.githubusercontent.com/nodejs/node/master/doc/api/$1.md | pandoc --from markdown --to plain | less
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.