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

Function readOTP

deps/npm/lib/utils/read-user-info.js:18–25  ·  view source on GitHub ↗
(msg = otpPrompt, otp, isRetry)

Source from the content-addressed store, hash-verified

16 input.read(() => _read(options), { [META]: true, silent: options?.silent })
17
18function readOTP (msg = otpPrompt, otp, isRetry) {
19 if (isRetry && otp && /^[\d ]+$|^[A-Fa-f0-9]{64,64}$/.test(otp)) {
20 return otp.replace(/\s+/g, '')
21 }
22
23 return read({ prompt: msg, default: otp || '' })
24 .then((rOtp) => readOTP(msg, rOtp, true))
25}
26
27function readPassword (msg = passwordPrompt, password, isRetry) {
28 if (isRetry && password) {

Callers

nothing calls this directly

Calls 3

readFunction · 0.70
testMethod · 0.45
thenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…