3 <title>npm-help-search</title>
4 <meta http-equiv="content-type" value="text/html;utf-8">
5 <link rel="stylesheet" type="text/css" href="../../static/style.css">
9 <h1><a href="../cli/npm-help-search.html">npm-help-search</a></h1> <p>Search npm help documentation</p>
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
13 <pre><code>npm help-search some search terms</code></pre>
15 <h2 id="DESCRIPTION">DESCRIPTION</h2>
17 <p>This command will search the npm markdown documentation files for the
18 terms provided, and then list the results, sorted by relevance.</p>
20 <p>If only one result is found, then it will show that help topic.</p>
22 <p>If the argument to <code>npm help</code> is not a known help topic, then it will
23 call <code>help-search</code>. It is rarely if ever necessary to call this
26 <h2 id="CONFIGURATION">CONFIGURATION</h2>
28 <h3 id="long">long</h3>
30 <ul><li>Type: Boolean</li><li>Default false</li></ul>
32 <p>If true, the "long" flag will cause help-search to output context around
33 where the terms were found in the documentation.</p>
35 <p>If false, then help-search will just list out the help topics found.</p>
37 <h2 id="SEE-ALSO">SEE ALSO</h2>
39 <ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li></ul>
41 <p id="footer">npm-help-search — npm@1.3.19</p>
44 var wrapper = document.getElementById("wrapper")
45 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
46 .filter(function (el) {
47 return el.parentNode === wrapper
48 && el.tagName.match(/H[1-6]/)
52 , toc = document.createElement("ul")
53 toc.innerHTML = els.map(function (el) {
54 var i = el.tagName.charAt(1)
64 out += "<li><a href='#" + el.id + "'>" +
65 ( el.innerText || el.text || el.innerHTML)
70 document.body.appendChild(toc)