0.0.2 • Published 7 years ago

prompt-email v0.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

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

npm.io

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