registry-url
Advanced tools
Comparing version 3.1.0 to 4.0.0
'use strict'; | ||
module.exports = function (scope) { | ||
var rc = require('rc')('npm', {registry: 'https://registry.npmjs.org/'}); | ||
var url = rc[scope + ':registry'] || rc.registry; | ||
module.exports = scope => { | ||
const rc = require('rc')('npm', {registry: 'https://registry.npmjs.org/'}); | ||
const url = rc[scope + ':registry'] || rc.config_registry || rc.registry; | ||
return url.slice(-1) === '/' ? url : url + '/'; | ||
}; |
{ | ||
"name": "registry-url", | ||
"version": "3.1.0", | ||
"description": "Get the set npm registry URL", | ||
"license": "MIT", | ||
"repository": "sindresorhus/registry-url", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava --serial" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"npm", | ||
"conf", | ||
"config", | ||
"npmconf", | ||
"registry", | ||
"url", | ||
"uri", | ||
"scope" | ||
], | ||
"dependencies": { | ||
"rc": "^1.0.1" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"pify": "^2.3.0", | ||
"require-uncached": "^1.0.2", | ||
"xo": "*" | ||
} | ||
"name": "registry-url", | ||
"version": "4.0.0", | ||
"description": "Get the set npm registry URL", | ||
"license": "MIT", | ||
"repository": "sindresorhus/registry-url", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=6" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"npm", | ||
"conf", | ||
"config", | ||
"npmconf", | ||
"registry", | ||
"url", | ||
"uri", | ||
"scope" | ||
], | ||
"dependencies": { | ||
"rc": "^1.2.7" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"import-fresh": "^2.0.0", | ||
"pify": "^3.0.0", | ||
"xo": "*" | ||
}, | ||
"ava": { | ||
"serial": true | ||
} | ||
} |
@@ -5,3 +5,3 @@ # registry-url [![Build Status](https://travis-ci.org/sindresorhus/registry-url.svg?branch=master)](https://travis-ci.org/sindresorhus/registry-url) | ||
It's usually `https://registry.npmjs.org/`, but [configurable](https://www.npmjs.org/doc/misc/npm-config.html#registry). | ||
It's usually `https://registry.npmjs.org/`, but it's [configurable](https://docs.npmjs.com/misc/registry). | ||
@@ -14,3 +14,3 @@ Use this if you do anything with the npm registry as users will expect it to use their configured registry. | ||
``` | ||
$ npm install --save registry-url | ||
$ npm install registry-url | ||
``` | ||
@@ -52,2 +52,2 @@ | ||
MIT © [Sindre Sorhus](http://sindresorhus.com) | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3194
Updatedrc@^1.2.7