registry-url.js 231 B

123456
  1. module.exports = function (scope, npmrc) {
  2. var rc = npmrc || require('rc')('npm', { registry: 'https://registry.npmjs.org/' })
  3. var url = rc[scope + ':registry'] || rc.registry
  4. return url.slice(-1) === '/' ? url : url + '/'
  5. }