Welcome to mirror list, hosted at ThFree Co, Russian Federation.

unpublish.js « lib - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cace1ba8eefb7bd6a92579719edfc033d0dfda5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

module.exports = unpublish

var registry = require("./utils/registry")
  , log = require("./utils/log")

function unpublish (args, cb) {
  var thing = args.shift().split("@")
    , project = thing.shift()
    , version = thing.join("@")
  if (!project) return cb(new Error(
    "Usage: npm unpublish <project>@<version>"))
  registry.unpublish(project, version, cb)
}