prompt-email

0.0.2 • Public • Published

prompt-email Build Status

Command line interface prompt email with autocompletion, validation and email lookup

Install

$ npm install prompt-email

Usage

import promptEmail from 'prompt-email'
 
promptEmail()
  .then(email => console.log(`\n> Hello ${email}`))
  .catch(err => console.log('\n> Abort'))
 
// => > Hello bukinoshita@gmail.com

It uses email-prompt under the hood with a couple changes.

Demo

How it works

It tries to find the username of the current user and get the email of the npm user using the username. It's not a solution 100% bulletproof, that's why if it can't find the email it will prompt the user for their email. I also added the verify param so you can skip that verification and direct prompt the user.

API

promptEmail({ verify })

verify

Type: boolean
Default: true

If set to false, it will skip the email lookup and will prompt for email.

License

MIT © Bu Kinoshita

Package Sidebar

Install

npm i prompt-email

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • bukinoshita