3 <title>npm-update</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="../api/npm-update.html">npm-update</a></h1> <p>Update a package</p>
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
13 <pre><code>npm.commands.update(packages, callback)</code></pre>
17 <p>Updates a package, upgrading it to the latest version. It also installs any missing packages.</p>
19 <p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p>
21 <p id="footer">npm-update — npm@1.3.21</p>
24 var wrapper = document.getElementById("wrapper")
25 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
26 .filter(function (el) {
27 return el.parentNode === wrapper
28 && el.tagName.match(/H[1-6]/)
32 , toc = document.createElement("ul")
33 toc.innerHTML = els.map(function (el) {
34 var i = el.tagName.charAt(1)
44 out += "<li><a href='#" + el.id + "'>" +
45 ( el.innerText || el.text || el.innerHTML)
50 document.body.appendChild(toc)