✏️ 正在编辑: whoami.js
路径:
/opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/lib/commands/whoami.js
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
const getIdentity = require('../utils/get-identity.js') const BaseCommand = require('../base-command.js') class Whoami extends BaseCommand { static description = 'Display npm username' static name = 'whoami' static params = ['registry'] async exec (args) { const username = await getIdentity(this.npm, { ...this.npm.flatOptions }) this.npm.output( this.npm.config.get('json') ? JSON.stringify(username) : username ) } } module.exports = Whoami
💾 保存文件
← 返回文件管理器