• File: index.js
  • Full Path: /var/www/nodejs/daily_store_reports_nodejs/node_modules/registry-url/index.js
  • Date Modified: 02/04/2023 9:31 PM
  • File size: 398 bytes
  • MIME-type: text/plain
  • Charset: utf-8
'use strict';
const rc = require('rc');

const registryUrl = scope => {
	const result = rc('npm', {registry: 'https://registry.npmjs.org/'});
	const url = result[`${scope}:registry`] || result.config_registry || result.registry;
	return url.slice(-1) === '/' ? url : `${url}/`;
};

module.exports = registryUrl;
// TODO: Remove this for the next major release
module.exports.default = registryUrl;