Unopinionated, no-frills CLI argument parser for Node.js applications
Overall
score
99%
Comprehensive error handling with error codes
Import arg package
100%
100%
Define argument spec
100%
100%
Use arg() function
100%
100%
Try-catch for errors
100%
100%
Access error.code
100%
100%
Access error.message
100%
100%
Return structured results
100%
100%
Handle unknown options
100%
100%
Boolean flag parsing
Uses arg function
100%
100%
Boolean type specification
0%
100%
String type specification
0%
100%
Alias configuration
0%
100%
Spec object format
0%
100%
Custom argv support
100%
100%
Result object usage
100%
0%
Specification object definition and validation
Spec object structure
100%
100%
String type handler
100%
100%
Number type handler
100%
100%
Boolean type handler
100%
100%
Array type syntax
100%
100%
Counter utility usage
0%
100%
Alias definitions
100%
100%
Parser invocation
100%
100%
Result object structure
Import arg function
100%
100%
Define specification object
100%
100%
Configure short aliases
100%
100%
Call arg function
100%
100%
Access named properties
100%
100%
Access positional arguments
100%
100%
Positional arguments collection (result._)
Import arg package
100%
100%
Define specification object
100%
100%
Use permissive mode
100%
100%
Pass custom argv
100%
100%
Access result._
100%
100%
Return complete result
100%
100%
Handle double-dash terminator
100%
100%
Negative number parsing with type discrimination
Number type usage
100%
100%
Array type syntax
100%
100%
Proper spec structure
100%
100%
Alias configuration
100%
100%
String type usage
100%
100%
Boolean type usage
100%
100%
Custom argv handling
100%
100%
Long argument support (--argument)
Uses arg function
100%
100%
Long argument keys
100%
100%
String type handler
100%
100%
Number type handler
100%
100%
Boolean type handler
100%
100%
Custom argv parameter
100%
100%
Alias resolution chains
Import arg package
100%
100%
Define canonical argument
100%
100%
Create direct short alias
100%
100%
Create direct long alias
100%
100%
Create alias chain
100%
100%
Call arg function
100%
100%
Return parsed result
60%
60%
Number type parsing
Import arg package
100%
100%
Define specification object
100%
100%
Use Number handler
100%
100%
Call arg function
100%
100%
Integer parsing
100%
100%
Decimal parsing
100%
100%
Negative number parsing
100%
100%
Return parsed result
100%
100%
Equals syntax for long arguments (--arg=value)
Import arg package
100%
100%
Define specification object
100%
100%
Use String type
100%
100%
Use Number type
100%
100%
Use Boolean type
100%
100%
Call arg function
100%
100%
Handle equals syntax
100%
100%
Return parsed result
100%
100%
Install with Tessl CLI
npx tessl i tessl/npm-arg