node: open module-specific node documentation (#5572)

This commit is contained in:
Sachin George Thomas authored and Marc Cornellà committed 2016-11-02 15:52:14 +01:00
1 parent 2d964086af
commit cf37697920
1 file changed
+2 -1
+2 -1
View File
@@ -1,5 +1,6 @@
# Open the node api for your current version to the optional section.
# TODO: Make the section part easier to use.
function node-docs {
open_command "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
local section=${1:-all}
open_command "http://nodejs.org/docs/$(node --version)/api/$section.html"
}