An open API service indexing awesome lists of open source software.

https://github.com/bukinoshita/nicht

:performing_arts: Command line interface prompt bool values
https://github.com/bukinoshita/nicht

boolean cli command-line javascript nodejs prompt

Last synced: over 1 year ago
JSON representation

:performing_arts: Command line interface prompt bool values

Awesome Lists containing this project

README

          

# nicht [![Build Status](https://travis-ci.org/bukinoshita/nicht.svg?branch=master)](https://travis-ci.org/bukinoshita/nicht)
> Command line interface prompt bool values

## Install
```bash
$ npm install nicht
```

## Usage
```javascript
import nicht from 'nicht'

nitch('Are you okay?')
// => Are you okay? [y|N]
```

## Demo

## API

### nicht(question, { defaultValue, yesChar, noChar })

#### question

Type: `string`

Required

#### defaultValue

Type: `bool`

default: `false`

If user doesn't choose [y|N], it will return `false` as default.

#### yesChar

Type: `string`

default: `y`

#### noChar

Type: `string`

default: `n`

## License

MIT © [Bu Kinoshita](https://bukinoshita.io)