arg icon indicating copy to clipboard operation
arg copied to clipboard

Simple argument parsing

Results 16 arg issues
Sort by recently updated
recently updated
newest added

This uses [key remapping](https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#key-remapping-via-as) in TypeScript to eliminate aliases from being in the result. A small change, but helps future users work with this package a lot faster. I think...

Is there a way to have optional flag values? Something like the following: ```js const arg = require('arg'); const args = arg({ '--port': Number, // --port '--host': String.optional, // --host...

This PR is basically a small modification to the typings of this package, I basically added 2 new types to help TypeScript users define the arg specification more clearly. Right...

This small change brings the parsing behavior for GNU-style short options (`-F=value` being equivalent to `-F value`) on par with the parsing of long options (`--flag=value` being equivalent to `--flag...

in node shell: ```node > const arg = require('arg') undefined > arg({"--int": parseInt}, {argv:["--int=-100"]}) { _: [], '--int': -100 } > arg({"--int": parseInt}, {argv:["--int -100"]}) Thrown: { Error: Unknown or...

bug
help wanted

About #67: the permissive mode will store the undefined arguments in the `_` array, which is intendented to be processed by another arguments parsing library, and it may has its...

As my realization, the `{permissive: true}` should left the unknown option being unparsed and treat them as positional arguments, but currently the permissive will still split the unknown short options....

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3. Release notes Sourced from tough-cookie's releases. 4.1.3 Security fix for Prototype Pollution discovery in #282. This is a minor release, although output from the...

dependencies

Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3. Release notes Sourced from json5's releases. v2.2.3 Fix: [email protected] is now the 'latest' release according to npm instead of v1.0.2. (#299) v2.2.2 Fix: Properties...

dependencies