MCPcopy Create free account
hub / github.com/nodejs/node / readEmail

Function readEmail

deps/npm/lib/utils/read-user-info.js:50–62  ·  view source on GitHub ↗
(msg = emailPrompt, email, isRetry)

Source from the content-addressed store, hash-verified

48}
49
50function readEmail (msg = emailPrompt, email, isRetry) {
51 if (isRetry && email) {
52 const error = userValidate.email(email)
53 if (error) {
54 log.warn(error.message)
55 } else {
56 return email.trim()
57 }
58 }
59
60 return read({ prompt: msg, default: email || '' })
61 .then((username) => readEmail(msg, username, true))
62}
63
64module.exports = {
65 otp: readOTP,

Callers

nothing calls this directly

Calls 3

warnMethod · 0.80
readFunction · 0.70
thenMethod · 0.45

Tested by

no test coverage detected