prefix.js 330 B

123456789101112131415
  1. module.exports = prefix
  2. var npm = require('./npm.js')
  3. var output = require('./utils/output.js')
  4. prefix.usage = 'npm prefix [-g]'
  5. function prefix (args, silent, cb) {
  6. if (typeof cb !== 'function') {
  7. cb = silent
  8. silent = false
  9. }
  10. if (!silent) output(npm.prefix)
  11. process.nextTick(cb.bind(this, null, npm.prefix))
  12. }