Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

registry-url

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

registry-url - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

index.d.ts

13

index.js
'use strict';
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 + '/';
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;
module.exports.default = registryUrl;
{
"name": "registry-url",
"version": "4.0.0",
"version": "5.0.0",
"description": "Get the set npm registry URL",

@@ -13,9 +13,10 @@ "license": "MIT",

"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"test": "xo && ava"
"test": "xo && ava && tsd-check"
},
"files": [
"index.js"
"index.js",
"index.d.ts"
],

@@ -33,9 +34,9 @@ "keywords": [

"dependencies": {
"rc": "^1.2.7"
"rc": "^1.2.8"
},
"devDependencies": {
"ava": "*",
"import-fresh": "^2.0.0",
"pify": "^3.0.0",
"xo": "*"
"ava": "^1.3.1",
"import-fresh": "^3.0.0",
"tsd-check": "^0.3.0",
"xo": "^0.24.0"
},

@@ -42,0 +43,0 @@ "ava": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc