Skip to content

A synchronous prompt for node.js forked from prompt-sync/fork

License

Notifications You must be signed in to change notification settings

Req/picoprompt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Picoprompt

A very simple sync prompt for node for educational purposes.

The goal of this is to be as simple as possible for usage in education. It enables students to practice with simple user inputs early on, without callbacks or promises.

Dependencies are inlined, ESM only.

Installation

  • Install with npm install picoprompt

  • Add "type": "module" into package.json

  • Minimal example of package.json

    {
        "type": "module",
        "dependencies": {
            "picoprompt": "^5.0.0"
        }
    }

Usage

import prompt from 'picoprompt'

const name = prompt('What is your name? ')
console.log(`Hello ${name}!`)

Line editing

Use backspace and left/right arrows for editing.

About

A synchronous prompt for node.js forked from prompt-sync/fork

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • JavaScript 100.0%