Socket
Socket
Sign inDemoInstall

jackspeak

Package Overview
Dependencies
Maintainers
1
Versions
58
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 3.2.6 to 3.3.0

6

dist/commonjs/index.d.ts

@@ -192,2 +192,8 @@ /// <reference types="node" />

stopAtPositional?: boolean;
/**
* Conditional `stopAtPositional`. If set to a `(string)=>boolean` function,
* will be called with each positional argument encountered. If the function
* returns true, then parsing will stop at that point.
*/
stopAtPositionalTest?: (arg: string) => boolean;
}

@@ -194,0 +200,0 @@ /**

6

dist/commonjs/index.js

@@ -413,3 +413,4 @@ "use strict";

p.positionals.push(token.value);
if (this.#options.stopAtPositional) {
if (this.#options.stopAtPositional ||
this.#options.stopAtPositionalTest?.(token.value)) {
p.positionals.push(...args.slice(token.index + 1));

@@ -970,4 +971,3 @@ break;

return ('\n```\n' +
split.map(s => `\u200b${s.substring(i)}`)
.join('\n') +
split.map(s => `\u200b${s.substring(i)}`).join('\n') +
'\n```\n');

@@ -974,0 +974,0 @@ }

@@ -192,2 +192,8 @@ /// <reference types="node" resolution-mode="require"/>

stopAtPositional?: boolean;
/**
* Conditional `stopAtPositional`. If set to a `(string)=>boolean` function,
* will be called with each positional argument encountered. If the function
* returns true, then parsing will stop at that point.
*/
stopAtPositionalTest?: (arg: string) => boolean;
}

@@ -194,0 +200,0 @@ /**

@@ -405,3 +405,4 @@ import { inspect } from 'node:util';

p.positionals.push(token.value);
if (this.#options.stopAtPositional) {
if (this.#options.stopAtPositional ||
this.#options.stopAtPositionalTest?.(token.value)) {
p.positionals.push(...args.slice(token.index + 1));

@@ -961,4 +962,3 @@ break;

return ('\n```\n' +
split.map(s => `\u200b${s.substring(i)}`)
.join('\n') +
split.map(s => `\u200b${s.substring(i)}`).join('\n') +
'\n```\n');

@@ -965,0 +965,0 @@ }

{
"name": "jackspeak",
"version": "3.2.6",
"version": "3.3.0",
"description": "A very strict and proper argument parser.",

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

@@ -113,2 +113,8 @@ # jackspeak

- `stopAtPositionalTest` Conditional `stopAtPositional`. Provide
a function that takes a positional argument string and returns
boolean. If it returns `true`, then parsing will stop. Useful
when _some_ subcommands should parse the rest of the command
line options, and others should not.
### `Jack.heading(text: string, level?: 1 | 2 | 3 | 4 | 5 | 6)`

@@ -115,0 +121,0 @@

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc