# minimisted

> Handy wrapper of `minimist`

Latest version **2.0.1** (published 2020-07-22) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2020-07-22 |
| First published | 2016-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Yoshiya Hinosawa |
| Maintainers | kt3k |
| Keywords | minimist, cli |

## Links

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

## Dependencies (1)

- [minimist](https://npm.io/package/minimist.md) ^1.2.5

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2020-07-22
- 2.0.0 — 2017-06-17
- 1.1.1 — 2016-08-11
- 1.1.0 — 2016-08-11
- 1.0.2 — 2016-08-11
- 1.0.1 — 2016-08-11
- 1.0.0 — 2016-08-11

## README

# minimisted v2.0.1

![CI](https://github.com/kt3k/minimisted/workflows/CI/badge.svg)
[![codecov](https://codecov.io/gh/kt3k/minimisted/branch/master/graph/badge.svg)](https://codecov.io/gh/kt3k/minimisted)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

> A handy wrapper of `minimist`

# Install

    npm install minimisted

# Usage

You can write your cli like the following:

```js
// Your cli's entry point
const main = (argv) => {
}

require('minimisted')(main)
```

where `argv` is the command line options parsed by `minimist` i.e. `minimist(process.argv.slice(2))`.

Using object destructuring syntax, you can write it like the following:

```js
/**
 * @param {boolean} help Shows help message if true
 * @param {boolean} version Shows the version if true
 * ...
 * @param {string[]} _ The parameters
 */
const main = ({ help, version, _ }) => {
}

require('minimisted')(main)
```

# API

```js
const minimisted = require('minimisted')
```

## minimisted(main[, opts[, argv]])

- @param {Function} main The main function
- @param {Object} opts The option which is passed to minimist's 2rd arguments
- @param {string} argv The command line arguments. Default is `process.argv.slice(2)`.

This calls `main` with command line options parsed by the minimist with the given options.

# License

MIT

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