0.0.2 • Published 2 years ago

portsoc-readline v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

portsoc-readline – easy-to-use promise-based input

This is an input library that provides a single method question which gets user input. It's promise-based so it works nicely with top-level await, meaning you can use it like this:

const drink = await question('tea or coffee?');

Installation

npm install portsoc-readline

Example:

import { question } from 'portsoc-readline';

const name = await question("Hi, what's your name?");
console.log(`Hello, ${name}!`);
0.0.2

2 years ago

0.0.1

2 years ago