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

https://github.com/ethiclab/getarg

Reads from a formatted string like --arg-name
https://github.com/ethiclab/getarg

arguments getarg process

Last synced: 2 months ago
JSON representation

Reads from a formatted string like --arg-name

Awesome Lists containing this project

README

          

# getarg [![npm version](https://badge.fury.io/js/%40ethiclab%2Fgetarg.svg)](https://badge.fury.io/js/%40ethiclab%2Fgetarg) [![Build Status](https://travis-ci.com/ethiclab/getarg.svg?branch=master)](https://travis-ci.com/ethiclab/getarg) [![codecov](https://codecov.io/gh/ethiclab/getarg/branch/master/graph/badge.svg)](https://codecov.io/gh/ethiclab/getarg)

Reads from a formatted string like --arg-name

npm install @ethiclab/getarg

# usage

```javascript
const process = require('process')
const getarg = require("@ethiclab/getarg")

const _argname = getarg(process.argv, "--arg-name", "some optional default")
```