61e16f07b600a7e04ffd03a0fd0ecfc5ea115554
[platform/upstream/nodejs.git] / deps / npm / html / doc / api / npm-root.html
1 <!doctype html>
2 <html>
3   <title>npm-root</title>
4   <meta http-equiv="content-type" value="text/html;utf-8">
5   <link rel="stylesheet" type="text/css" href="../../static/style.css">
6
7   <body>
8     <div id="wrapper">
9 <h1><a href="../api/npm-root.html">npm-root</a></h1> <p>Display npm root</p>
10
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
12
13 <pre><code>npm.commands.root(args, callback)</code></pre>
14
15 <h2 id="DESCRIPTION">DESCRIPTION</h2>
16
17 <p>Print the effective <code>node_modules</code> folder to standard out.</p>
18
19 <p>&#39;args&#39; is never used and callback is never called with data.
20 &#39;args&#39; must be present or things will break.</p>
21
22 <p>This function is not useful programmatically.</p>
23 </div>
24 <p id="footer">npm-root &mdash; npm@1.3.15</p>
25 <script>
26 ;(function () {
27 var wrapper = document.getElementById("wrapper")
28 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
29   .filter(function (el) {
30     return el.parentNode === wrapper
31         && el.tagName.match(/H[1-6]/)
32         && el.id
33   })
34 var l = 2
35   , toc = document.createElement("ul")
36 toc.innerHTML = els.map(function (el) {
37   var i = el.tagName.charAt(1)
38     , out = ""
39   while (i > l) {
40     out += "<ul>"
41     l ++
42   }
43   while (i < l) {
44     out += "</ul>"
45     l --
46   }
47   out += "<li><a href='#" + el.id + "'>" +
48     ( el.innerText || el.text || el.innerHTML)
49     + "</a>"
50   return out
51 }).join("\n")
52 toc.id = "toc"
53 document.body.appendChild(toc)
54 })()
55 </script>