You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

jackspeak

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jackspeak - npm Package Compare versions

Comparing version
4.0.3
to
4.1.0
+4
-0
dist/commonjs/index.d.ts

@@ -198,2 +198,6 @@ import { inspect, InspectOptions, ParseArgsConfig } from 'node:util';

constructor(options?: JackOptions);
get definitions(): C;
get shorts(): Record<string, string>;
get jackOptions(): JackOptions;
get usageFields(): UsageField[];
/**

@@ -200,0 +204,0 @@ * Set the default value (which will still be overridden by env or cli)

@@ -246,2 +246,14 @@ "use strict";

}
get definitions() {
return this.#configSet;
}
get shorts() {
return this.#shorts;
}
get jackOptions() {
return this.#options;
}
get usageFields() {
return this.#fields;
}
/**

@@ -428,3 +440,3 @@ * Set the default value (which will still be overridden by env or cli)

const cause = validOptions && !isValidOption(value, validOptions) ?
{ name: field, found: value, validOptions: validOptions }
{ name: field, found: value, validOptions }
: valid && !valid(value) ? { name: field, found: value }

@@ -431,0 +443,0 @@ : undefined;

@@ -198,2 +198,6 @@ import { inspect, InspectOptions, ParseArgsConfig } from 'node:util';

constructor(options?: JackOptions);
get definitions(): C;
get shorts(): Record<string, string>;
get jackOptions(): JackOptions;
get usageFields(): UsageField[];
/**

@@ -200,0 +204,0 @@ * Set the default value (which will still be overridden by env or cli)

@@ -237,2 +237,14 @@ import { inspect, parseArgs, } from 'node:util';

}
get definitions() {
return this.#configSet;
}
get shorts() {
return this.#shorts;
}
get jackOptions() {
return this.#options;
}
get usageFields() {
return this.#fields;
}
/**

@@ -419,3 +431,3 @@ * Set the default value (which will still be overridden by env or cli)

const cause = validOptions && !isValidOption(value, validOptions) ?
{ name: field, found: value, validOptions: validOptions }
{ name: field, found: value, validOptions }
: valid && !valid(value) ? { name: field, found: value }

@@ -422,0 +434,0 @@ : undefined;

+1
-1
{
"name": "jackspeak",
"version": "4.0.3",
"version": "4.1.0",
"description": "A very strict and proper argument parser.",

@@ -5,0 +5,0 @@ "tshy": {

@@ -212,2 +212,34 @@ # jackspeak

## Informative Getters
Once you've defined several fields with the various methods
described above, you can get at the definitions and such with
these methods.
This are primarily just informative, but can be useful in some
advanced scenarios, such as providing "Did you mean?" type
suggestions when someone misspells an option name.
### `Jack.definitions`
The set of config field definitions in no particular order. This
is a data object suitable to passing to `util.parseArgs`, but
with the addition of `short` and `description` fields, where
appropriate.
### `Jack.jackOptions`
The options passed into the initial `jack()` function (or `new
Jack()` constructor).
### `Jack.shorts`
The `{ <short>: <long> }` name record for all short options
defined.
### `Jack.usageFields`
The array of fields that are used to generate `Jack.usage()` and
`Jack.usageMarkdown()` content.
## Actions

@@ -214,0 +246,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display