Skip to content

ThunderNetworkRaD/node-cin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CIN

This module allow you to make CLI in NodeJS

Examples

In this example is expected this Input/Output

Image-1

CommonJS

const { cin } = require('cin');

cin('What is your favorite food?').then(ans => console.log(ans));
// or
async function hello() {
    var ans = await cin('What is your favorite food?');
    console.log(ans);
}
hello();

ModuleJS

import { cin } from 'cin';


cin('What is your favorite food?').then(ans => console.log(ans));
// or
async function hello() {
    var ans = await cin('What is your favorite food?');
    console.log(ans);
}

hello();

TypeScript

import { cin } from 'cin';


cin('What is your favorite food?').then(ans => console.log(ans));
// or
async function hello() {
    var ans = await cin('What is your favorite food?');
    console.log(ans);
}

hello();