AlkantarClanX12

Your IP : 18.223.209.129


Current Path : /proc/thread-self/root/opt/alt/alt-nodejs9/root/lib/node_modules/npm/lib/utils/
Upload File :
Current File : //proc/thread-self/root/opt/alt/alt-nodejs9/root/lib/node_modules/npm/lib/utils/package-id.js

'use strict'
var moduleName = require('./module-name.js')

module.exports = function (tree) {
  var pkg = tree.package || tree
  // FIXME: Excluding the '@' here is cleaning up after the mess that
  // read-package-json makes. =(
  if (pkg._id && pkg._id !== '@') return pkg._id
  var name = moduleName(tree)
  if (pkg.version) {
    return name + '@' + pkg.version
  } else {
    return name
  }
}