https://github.com/blackglory/extra-prompts
🌱
https://github.com/blackglory/extra-prompts
library nodejs npm-package typescript
Last synced: 3 months ago
JSON representation
🌱
- Host: GitHub
- URL: https://github.com/blackglory/extra-prompts
- Owner: BlackGlory
- License: mit
- Created: 2022-05-04T06:23:05.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-06-12T09:20:29.000Z (about 3 years ago)
- Last Synced: 2024-04-26T21:04:31.386Z (about 2 years ago)
- Topics: library, nodejs, npm-package, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/extra-prompts
- Size: 604 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# extra-prompts
## Install
```sh
npm install --save extra-prompts
# or
yarn add extra-prompts
```
## API
```ts
interface IOption {
label: string
value: T
}
```
### text
```ts
function text(message: string): Promise
```
### password
```ts
function password(message: string): Promise
```
### invisible
```ts
function invisible(message: string): Promise
```
### confirm
```ts
function confirm(message: string, defaultValue: boolean): Promise
```
### select
```ts
function select(message: string, options: IOption[]): Promise
```
### selectMultiple
```ts
function selectMultiple(message: string, options: IOption[]): Promise
```
### waitForInput
```ts
function waitForInput(
message: string
, predicate?: (key: string) => boolean
): Promise
```