blob: b399bd6ae7f6c671f802cc501b22ef81ff99e9d0 [file] [log] [blame]
.TH "NPM\-HELP\-SEARCH" "3" "June 2016" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search the help pages
.SH SYNOPSIS
.P
.RS 2
.nf
npm\.commands\.helpSearch(args, [silent,] callback)
.fi
.RE
.SH DESCRIPTION
.P
This command is rarely useful, but it exists in the rare case that it is\.
.P
This command takes an array of search terms and returns the help pages that
match in order of best match\.
.P
If there is only one match, then npm displays that help section\. If there
are multiple results, the results are printed to the screen formatted and the
array of results is returned\. Each result is an object with these properties:
.RS 0
.IP \(bu 2
hits:
A map of args to number of hits on that arg\. For example, {"npm": 3}
.IP \(bu 2
found:
Total number of unique args that matched\.
.IP \(bu 2
totalHits:
Total number of hits\.
.IP \(bu 2
lines:
An array of all matching lines (and some adjacent lines)\.
.IP \(bu 2
file:
Name of the file that matched
.RE
.P
The silent parameter is not necessary not used, but it may in the future\.