Skip to content

A POC of a Node.js implementation of the Web APIs for alert, confirm and prompt

Notifications You must be signed in to change notification settings

iansu/node-prompts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Node Prompts

A POC of a Node.js implementation of the Web APIs for alert, confirm and prompt

Usage

Alert

await alert('Please confirm');

Confirm

const result = await confirm('Are you sure?');

if (result) {
  // do something
}

Prompt

// prompt with no default value
const result = await prompt('What is your name?');
console.log(result);

// prompt with a default value
const resultWithDefault = await prompt('What is your age?', 18);
console.log(resultWithDefault);

About

A POC of a Node.js implementation of the Web APIs for alert, confirm and prompt

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published