"Fossies" - the Fresh Open Source Software Archive

Member "node-v12.18.4-win-x64/node_modules/npm/node_modules/registry-url/readme.md" (14 Feb 2020, 1261 Bytes) of package /windows/www/node-v12.18.4-win-x64.zip:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

registry-url Build Status

Get the set npm registry URL

It’s usually https://registry.npmjs.org/, but configurable.

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


# .npmrc
registry = 'https://custom-registry.com/'
const registryUrl = require('registry-url');

//=> 'https://custom-registry.com/'

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

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

//=> 'https://custom-registry.com/'

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