MCPcopy Index your code
hub / github.com/nodejs/node / getRepositoryFromPackageJson

Method getRepositoryFromPackageJson

deps/npm/lib/trust-cmd.js:175–183  ·  view source on GitHub ↗
(pkg)

Source from the content-addressed store, hash-verified

173 }
174
175 getRepositoryFromPackageJson (pkg) {
176 const info = gitinfo.fromUrl(pkg.repository?.url || pkg?.repository)
177 if (!info) {
178 return null
179 }
180 const repository = info.user + '/' + info.project
181 const type = info.type
182 return { repository, type }
183 }
184
185 async optionalPkgJson () {
186 try {

Callers 1

flagsToOptionsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected