/snap/node/11691/lib/node_modules/npm/node_modules/pacote/lib/util
NameSizeModeActions
add-git-sha.js4270644editdlrm
cache-dir.js6100644editdlrm
is-package-bin.js8240644editdlrm
npm.js5670644editdlrm
protected.js2220644editdlrm
tar-create-options.js9140644editdlrm
trailing-slashes.js2380644editdlrm
Edit: /snap/node/11691/lib/node_modules/npm/node_modules/pacote/lib/util/add-git-sha.js (427B)
// 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