subarg

WebJar for subarg

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

subarg
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

subarg
WebJar for subarg
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/substack/subarg

Download subarg

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/subarg/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>subarg</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/subarg/
implementation 'org.webjars.npm:subarg:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/subarg/
implementation ("org.webjars.npm:subarg:1.0.0")
'org.webjars.npm:subarg:jar:1.0.0'
<dependency org="org.webjars.npm" name="subarg" rev="1.0.0">
  <artifact name="subarg" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='subarg', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "subarg" % "1.0.0"
[org.webjars.npm/subarg "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : minimist jar [1.1.0,2)

Project Modules

There are no modules declared in this project.

subarg

parse arguments with recursive contexts using minimist

testling badge

build status

This module is useful if you need to pass arguments into a piece of code without coordinating ahead of time with the main program, like with a plugin system.

example

var subarg = require('subarg');
var argv = subarg(process.argv.slice(2));
console.log(argv);

Contexts are denoted with square brackets:

$ node example/show.js rawr --beep [ boop -a 3 ] -n4 --robots [ -x 8 -y 6 ]
{ _: [ 'rawr' ],
  beep: { _: [ 'boop' ], a: 3 },
  n: 4,
  robots: { _: [], x: 8, y: 6 } }

methods

var subarg = require('subarg')

var argv = subarg(args, opts)

Parse the arguments array args, passing opts to minimist.

An opening [ in the args array creates a new context and a ] closes a context. Contexts may be nested.

install

With npm do:

npm install subarg

license

MIT

Versions

Version
1.0.0