@cryptzx-dev/node-input
v2.5.1
Published
Node.js module to handle user input from terminal with support for CommonJS and ESM
Downloads
55
Readme
Node Input - Simple Input Handling for Node.js CLI Applications
Overview
@cryptzx-dev/node-input
is a lightweight package designed to simplify input handling for Node.js CLI applications. It enables developers to easily capture user input asynchronously with minimal setup.
Features
- Asynchronous Input: Leverage async/await to handle user input smoothly.
- Simple API: Minimalistic and intuitive design for fast integration.
- No Dependencies: A lean package with no external dependencies.
Installation
Install the package via npm:
npm install @cryptzx-dev/node-input
Usage
After installing, you can use it within your CLI applications as follows:
const { input } = require("@cryptzx-dev/node-input");
(async () => {
const inputData = await input("What's your name?");
console.log("Your name: " + inputData);
})();
Example Output:
> What's your name?
> John
Your name: John
License
This project is open-source but not licensed. Feel free to use, modify, or distribute it at your own discretion. No warranties or guarantees are provided.