registry-url
Advanced tools
Comparing version 1.0.0 to 2.0.0
13
index.js
'use strict'; | ||
var npmconf = require('npmconf'); | ||
module.exports = function (cb) { | ||
npmconf.load(function (err, conf) { | ||
if (err) { | ||
cb(err); | ||
return; | ||
} | ||
cb(null, conf.get('registry')); | ||
}); | ||
}; | ||
module.exports = require('rc')('npm').registry || 'http://registry.npmjs.org/'; |
{ | ||
"name": "registry-url", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Get the set npm registry URL", | ||
@@ -30,7 +30,8 @@ "license": "MIT", | ||
"dependencies": { | ||
"npmconf": "^2.0.1" | ||
"rc": "^0.5.1" | ||
}, | ||
"devDependencies": { | ||
"mocha": "*" | ||
"mocha": "*", | ||
"require-uncached": "^1.0.2" | ||
} | ||
} |
@@ -27,6 +27,4 @@ # registry-url [![Build Status](https://travis-ci.org/sindresorhus/registry-url.svg?branch=master)](https://travis-ci.org/sindresorhus/registry-url) | ||
registryUrl(function (err, url) { | ||
console.log(url); | ||
//=> https://custom-registry.com/ | ||
}); | ||
console.log(registryUrl); | ||
//=> https://custom-registry.com/ | ||
``` | ||
@@ -33,0 +31,0 @@ |
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
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
1442
2
2
35
1
+ Addedrc@^0.5.1
+ Addeddeep-extend@0.2.11(transitive)
+ Addedminimist@0.0.10(transitive)
+ Addedrc@0.5.5(transitive)
+ Addedstrip-json-comments@0.1.3(transitive)
- Removednpmconf@^2.0.1
- Removedabbrev@1.1.1(transitive)
- Removedconfig-chain@1.1.13(transitive)
- Removedinherits@2.0.4(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removednopt@3.0.6(transitive)
- Removednpmconf@2.1.3(transitive)
- Removedonce@1.3.3(transitive)
- Removedos-homedir@1.0.2(transitive)
- Removedos-tmpdir@1.0.2(transitive)
- Removedosenv@0.1.5(transitive)
- Removedproto-list@1.2.4(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsemver@4.3.6(transitive)
- Removeduid-number@0.0.5(transitive)
- Removedwrappy@1.0.2(transitive)