keypress-promises
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Installation

Use node 20+

npm i keypress-promises

Example usage

import { getKey, getInput } from 'keypress-promises';

const key = await getKey();
console.log(key);
// { sequence: 'j', name: 'j', ctrl: false, meta: false, shift: false }
// { sequence: '\x03', name: 'c', ctrl: true, meta: false, shift: false }

const userInput = await getInput('Enter your name: ');
console.log(`Your name is ${userInput}`);
// Your name is nick

Readme

Keywords

Package Sidebar

Install

npm i keypress-promises

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

2.81 kB

Total Files

4

Last publish

Collaborators

  • nhobbs