MCPcopy Create free account
hub / github.com/nodejs/node / #set

Method #set

deps/npm/lib/commands/access.js:150–159  ·  view source on GitHub ↗
(subcmd, pkg)

Source from the content-addressed store, hash-verified

148 }
149
150 async #set (subcmd, pkg) {
151 const [subkey, subval] = subcmd.split('=')
152 switch (subkey) {
153 case 'mfa':
154 case '2fa':
155 return this.#setMfa(pkg, subval)
156 case 'status':
157 return this.#setStatus(pkg, subval)
158 }
159 }
160
161 async #setMfa (pkg, level) {
162 const pkgName = await this.#getPackage(pkg, false)

Callers 1

execMethod · 0.95

Calls 3

#setMfaMethod · 0.95
#setStatusMethod · 0.95
splitMethod · 0.45

Tested by

no test coverage detected