# minimist-mini

> Minimist-mini is minimist simplified. Auto-generation of help using README.md (converted to text) - and easy parsing of option given to the CLI program.

Latest version **3.0.3** (published 2024-02-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install minimist-mini
pnpm add minimist-mini
yarn add minimist-mini
bun add minimist-mini
```

## 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 | 3.0.3 |
| Published | 2024-02-07 |
| First published | 2016-12-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dennis Iversen |
| Maintainers | diversen |
| Keywords | minimist, help, minimist, mini, minimist |

## Links

- npm: https://www.npmjs.com/package/minimist-mini
- Repository: https://github.com/diversen/minimist-mini
- Homepage: https://github.com/diversen/minimist-mini#readme
- Issues: https://github.com/diversen/minimist-mini/issues
- npm.io page: https://npm.io/package/minimist-mini

## Dependencies (3)

- [minimist](https://npm.io/package/minimist.md) ^1.2.8
- [get-value](https://npm.io/package/get-value.md) ^2.0.6
- [remove-markdown](https://npm.io/package/remove-markdown.md) ^0.2.2

## Recent versions

- 3.0.3 (latest) — 2024-02-07
- 3.0.2 — 2024-02-07
- 3.0.0 — 2024-02-07
- 2.0.9 — 2017-12-30
- 2.0.8 — 2017-08-10
- 2.0.7 — 2016-12-08
- 2.0.6 — 2016-12-08
- 2.0.5 — 2016-12-08
- 2.0.4 — 2016-12-08
- 2.0.3 — 2016-12-08
- 2.0.2 — 2016-12-08
- 2.0.1 — 2016-12-08
- 2.0.0 — 2016-12-08
- 1.0.4 — 2016-12-03
- 1.0.3 — 2016-12-03
- … 3 more at https://npm.io/package/minimist-mini/versions

## README

# minimist-mini

A wrapper around minimist that has some more logical methods for getting options and arguments.

It can also automatically generate documentation from
a module's `README.md` or `readme.md` file. It reads the .md file and parses it for display in
your console application. 

## Install: 

    npm install --save minimist-mini

## Usage: 

```.js
// Options are exactly as in minimist
const opts = [];
opts.boolean = ['help'];
opts.string = ['option1'];
opts.string = ['option2'];
opts.default = { option1: 'default value' };
opts.alias = { h: 'help' };

const minimistMini = require('minimist-mini')(opts); 

// Check if help is defined, and log the value.
var help = minimistMini.getOption('h');
if (help){
    // Default help is generated from README.md or readme.md
    // Or you may specify a file in from your package
    console.log(minimistMini.helpMessage())
    process.exit(0);
}

// Get single option
console.log("value of option 'option1':");
console.log(minimistMini.getOption('option1'));

// Get all options
console.log("all options:");
console.log(minimistMini.getOptions());

// Get single argument
console.log("value of argument 0:");
console.log(minimistMini.getArgument(0));

// Get all arguments
console.log("all arguments:");
console.log(minimistMini.getArguments());

```

## License: 

MIT © [Dennis Iversen](https://github.com/diversen)

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