9da8c574bafd208cc4fff6f04ab06eb401bd5097
[platform/upstream/nodejs.git] / deps / npm / html / doc / api / npm-unpublish.html
1 <!doctype html>
2 <html>
3   <title>npm-unpublish</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-unpublish.html">npm-unpublish</a></h1> <p>Remove a package from the registry</p>
10
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
12
13 <pre><code>npm.commands.unpublish(package, callback)</code></pre>
14
15 <h2 id="DESCRIPTION">DESCRIPTION</h2>
16
17 <p>This removes a package version from the registry, deleting its
18 entry and removing the tarball.</p>
19
20 <p>The package parameter must be defined.</p>
21
22 <p>Only the first element in the package parameter is used.  If there is no first
23 element, then npm assumes that the package at the current working directory
24 is what is meant.</p>
25
26 <p>If no version is specified, or if all versions are removed then
27 the root package entry is removed from the registry entirely.</p>
28 </div>
29 <p id="footer">npm-unpublish &mdash; npm@1.3.17</p>
30 <script>
31 ;(function () {
32 var wrapper = document.getElementById("wrapper")
33 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
34   .filter(function (el) {
35     return el.parentNode === wrapper
36         && el.tagName.match(/H[1-6]/)
37         && el.id
38   })
39 var l = 2
40   , toc = document.createElement("ul")
41 toc.innerHTML = els.map(function (el) {
42   var i = el.tagName.charAt(1)
43     , out = ""
44   while (i > l) {
45     out += "<ul>"
46     l ++
47   }
48   while (i < l) {
49     out += "</ul>"
50     l --
51   }
52   out += "<li><a href='#" + el.id + "'>" +
53     ( el.innerText || el.text || el.innerHTML)
54     + "</a>"
55   return out
56 }).join("\n")
57 toc.id = "toc"
58 document.body.appendChild(toc)
59 })()
60 </script>