# margs

> Light-weight command line arguments parser. No dependencies required.

Latest version **0.2.1** (published 2016-06-06) · MIT/X11 license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2016-06-06 |
| First published | 2016-06-03 |
| Weekly downloads | 0 |
| License | MIT/X11 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Marcin Owczarczyk |
| Maintainers | marow.dev |
| Keywords | argument, arguments, args, parser, parsing, cli, command, command-line |

## Links

- npm: https://www.npmjs.com/package/margs
- Repository: https://github.com/marow-dev/node-args
- Homepage: https://github.com/marow-dev/node-args#readme
- Issues: https://github.com/marow-dev/node-args/issues
- npm.io page: https://npm.io/package/margs

## 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

- 0.2.1 (latest) — 2016-06-06
- 0.1.2 — 2016-06-03
- 0.1.1 — 2016-06-03

## README

# node-args
Light-weight command line arguments parser. No dependencies required.

Available as npm module 'margs'
## Usage
Module return object with methods:
### get
Reads the specified argument value.

Example:
```javascript
var args = require('../index.js'); // node example.js -x=10
args.get('x'); // Reads value of argument x
```
### all
Return all arguments passed to script
Example:
```javascript
var args = require('../index.js'); // node example.js -x=10 -y=10
args.all(); // Returns [ 'x', 'y' ]
```
### setDefault
Sets default values for parameters
Example:
```javascript
var args = require('../index.js').setDefault({z: 10}); // node example.js -x=10 -y=10
args.get('z'); // Returns: 10
```

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