Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
alt-nodejs20
/
root
/
lib
/
node_modules
/
npm
/
node_modules
/
pacote
/
lib
/
util
/
File Content:
add-git-sha.js
// add a sha to a git remote url spec const addGitSha = (spec, sha) => { if (spec.hosted) { const h = spec.hosted const opt = { noCommittish: true } const base = h.https && h.auth ? h.https(opt) : h.shortcut(opt) return `${base}#${sha}` } else { // don't use new URL for this, because it doesn't handle scp urls return spec.rawSpec.replace(/#.*$/, '') + `#${sha}` } } module.exports = addGitSha
Submit
FILE
FOLDER
Name
Size
Permission
Action
add-git-sha.js
427 bytes
0644
cache-dir.js
610 bytes
0644
is-package-bin.js
824 bytes
0644
npm.js
567 bytes
0644
protected.js
222 bytes
0644
tar-create-options.js
914 bytes
0644
trailing-slashes.js
238 bytes
0644
N4ST4R_ID | Naxtarrr