mirror of
https://github.com/nodejs/node.git
synced 2025-05-15 16:01:52 +00:00

* Check SHA before using files from cache * adduser: allow change of the saved password * Make `npm install` respect `config.unicode` * Fix lifecycle to pass `Infinity` for config env value * Don't return 0 exit code on invalid command * cache: Handle 404s and other HTTP errors as errors * bump tap dep, make tests stderr a bit quieter * Resolve ~ in path configs to env.HOME * Include npm version in default user-agent conf * npm init: Use ISC as default license, use save-prefix for deps * Many test and doc fixes
10 lines
165 B
JavaScript
10 lines
165 B
JavaScript
module.exports = getUrl
|
|
|
|
function getUrl (r) {
|
|
if (!r) return null
|
|
if (/^[\w-]+\/[\w\.-]+$/.test(r))
|
|
return "git://github.com/" + r
|
|
else
|
|
return null
|
|
}
|