MCPcopy Index your code
hub / github.com/npmx-dev/npmx.dev / getNpmUser

Function getNpmUser

cli/src/npm-client.ts:389–395  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

387}
388
389export async function getNpmUser(): Promise<string | null> {
390 const result = await execNpm(['whoami'], { silent: true })
391 if (result.exitCode === 0 && result.stdout) {
392 return result.stdout
393 }
394 return null
395}
396
397/**
398 * Gets the user's avatar as a base64 data URL from Gravatar.

Callers 2

runFunction · 0.90
createConnectorAppFunction · 0.90

Calls 1

execNpmFunction · 0.85

Tested by

no test coverage detected