Numerous Philanthropic Misanthropes

    syncoprompt

    1.0.1 • Public • Published

    Syncoprompt

    minimalist zero-dependency cross-platform synchronous prompting module

    API

    require('syncoprompt') => (question = '', opts = {hidden: false, echo: '*'}) => String => answer

    Usage

    var prompt = require('syncoprompt')
     
    var name = prompt('Tell us yer name then: ')
    var pwd = prompt('Password: ', {hidden: true, echo: '#'})
     
    console.log('How do ya do', name, 'your password is', pwd)

    Options

    hidden: Default is false. This prevents echo-back during text entry

    echo: Default is '*'. Echo character to be used when hidden. For no echo set this to ''

    Credits

    Install

    npm i syncoprompt

    DownloadsWeekly Downloads

    4

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • davidmarkclements