Skip to content
Get the set npm registry URL
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig ES2015ify and require Node.js 4 May 21, 2017
.gitattributes Require Node.js 6 May 27, 2018
.gitignore Require Node.js 6 May 27, 2018
index.test-d.ts Refactor TypeScript definition to CommonJS compatible export (#15) Apr 4, 2019
package.json 5.1.0 Apr 4, 2019 Require Node.js 6 May 27, 2018
test.js Require Node.js 8, add TypeScript definition (#14) Mar 11, 2019

registry-url Build Status

Get the set npm registry URL

It's usually, but it's configurable.

Use this if you do anything with the npm registry as users will expect it to use their configured registry.


$ npm install registry-url


# .npmrc
registry = ''
const registryUrl = require('registry-url');

//=> ''

It can also retrieve the registry URL associated with an npm scope.

# .npmrc
@myco:registry = ''
const registryUrl = require('registry-url');

//=> ''

If the provided scope is not in the user's .npmrc file, then registry-url will check for the existence of registry, or if that's not set, fallback to the default npm registry.


MIT © Sindre Sorhus

You can’t perform that action at this time.