Socket
Socket
Sign inDemoInstall

jackspeak

Package Overview
Dependencies
12
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.1 to 2.3.2

13

dist/cjs/index.js

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

/**
* do not set fields as 'no-foo' if 'foo' exists and both are bools
* just set foo.
*/
#noNoFields(f, val, s = f) {
if (!f.startsWith('no-') || typeof val !== 'boolean')
return;
const yes = f.substring('no-'.length);
if (this.#configSet[yes]?.type === 'boolean') {
throw new Error(`do not set '${s}', instead set '${yes}' as desired.`);
}
}
/**
* Validate that any arbitrary object is a valid configuration `values`

@@ -405,2 +417,3 @@ * object. Useful when loading config files or other sources.

for (const field in o) {
this.#noNoFields(field, o[field]);
const config = this.#configSet[field];

@@ -407,0 +420,0 @@ if (!config) {

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

/**
* do not set fields as 'no-foo' if 'foo' exists and both are bools
* just set foo.
*/
#noNoFields(f, val, s = f) {
if (!f.startsWith('no-') || typeof val !== 'boolean')
return;
const yes = f.substring('no-'.length);
if (this.#configSet[yes]?.type === 'boolean') {
throw new Error(`do not set '${s}', instead set '${yes}' as desired.`);
}
}
/**
* Validate that any arbitrary object is a valid configuration `values`

@@ -397,2 +409,3 @@ * object. Useful when loading config files or other sources.

for (const field in o) {
this.#noNoFields(field, o[field]);
const config = this.#configSet[field];

@@ -399,0 +412,0 @@ if (!config) {

2

package.json
{
"name": "jackspeak",
"version": "2.3.1",
"version": "2.3.2",
"description": "A very strict and proper argument parser.",

@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc