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

Method optionalPkgJson

deps/npm/lib/trust-cmd.js:185–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

183 }
184
185 async optionalPkgJson () {
186 try {
187 const { content } = await pkgJson.normalize(this.npm.prefix)
188 return content
189 } catch (err) {
190 return {}
191 }
192 }
193
194 get registryIsDefault () {
195 return this.npm.config.defaults.registry === this.npm.config.get('registry')

Callers 4

flagsToOptionsMethod · 0.95
flagsToOptionsMethod · 0.80
execMethod · 0.80
execMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected