Function
readEmail
(msg = emailPrompt, email, isRetry)
Source from the content-addressed store, hash-verified
| 48 | } |
| 49 | |
| 50 | function 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 | |
| 64 | module.exports = { |
| 65 | otp: readOTP, |
Callers
nothing calls this directly
Tested by
no test coverage detected