# chickpea

> A little bean for parsing command line arguments without any surprises, at all.

Latest version **1.11.0** (published 2022-06-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install chickpea
pnpm add chickpea
yarn add chickpea
bun add chickpea
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.11.0 |
| Published | 2022-06-02 |
| First published | 2018-06-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 36.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | fantasyui.com |
| Maintainers | fantasyui.com |

## Links

- npm: https://www.npmjs.com/package/chickpea
- Repository: https://github.com/fantasyui-com/chickpea
- Homepage: https://github.com/fantasyui-com/chickpea#readme
- Issues: https://github.com/fantasyui-com/chickpea/issues
- npm.io page: https://npm.io/package/chickpea

## Dependencies (2)

- [commander](https://npm.io/package/commander.md) ^2.20.3
- [lodash.kebabcase](https://npm.io/package/lodash.kebabcase.md) ^4.1.1

## Recent versions

- 1.11.0 (latest) — 2022-06-02
- 1.10.0 — 2021-09-14
- 1.9.0 — 2019-10-20
- 1.8.0 — 2019-07-18
- 1.7.0 — 2019-04-25
- 1.6.0 — 2019-04-09
- 1.5.0 — 2018-06-13
- 1.2.0 — 2018-06-13
- 1.4.0 — 2018-06-13
- 1.3.0 — 2018-06-13
- 1.1.0 — 2018-06-13

## README

# chickpea
A little bean for parsing command line arguments without any surprises, at all.


## Install

```bash

npm i chickpea

```

## Example

```JavaScript

#!/usr/bin/env node

const chickpea = require('chickpea');
const program = require('./index.js');

const configuration = { input: 'Input PNG' };
const options = chickpea(configuration);

program(options)

```

## Usage

```JavaScript

#!/usr/bin/env node

const chickpea = require('chickpea');

const pizzaOrder = chickpea({

  pepper_flag: 'Add peppers.',
  pineapple_flag: 'Add pineapple.',
  bbqSauce_flag: 'Add bbq sauce.',
  cheese: 'Add the specified type of cheese: --cheese gorgonzola',
  firstName: 'First name.',
  lastName: 'Last name.',

});

console.log('Cheese Type:', pizzaOrder.cheese);
console.log('BBQ Sauce:', pizzaOrder.bbqSauce?'yes':'no');

```

### Execute

```bash

$ ./example.js --cheese "Super Stinky" --bbq-sauce

```

### Result

```

Cheese Type: Super Stinky
BBQ Sauce: yes

```

### Extras

When executing with ```-h``` flag you get the following

```bash
$ ./example.js -h


  Usage: example [options]

  Options:

    -V, --version           output the version number
    -p,--pepper             Add peppers.
    -i,--pineapple          Add pineapple.
    -b,--bbq-sauce          Add bbq sauce.
    -c,--cheese [text]      Add the specified type of cheese: --cheese gorgonzola
    -f,--first-name [text]  First name.
    -l,--last-name [text]   Last name.
    -h, --help              output usage information

```

---
_Source: https://npm.io/package/chickpea · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
