includesBeforeSeparator
Generated reference page for the includesBeforeSeparator function export.
- Import:
@kjanat/dreamcli - Export kind: function
- Declared in:
src/core/parse/index.ts - Source link:
src/core/parse/index.ts:122
Signatures
ts
function includesBeforeSeparator(argv: readonly string[], token: string): boolean;| Parameter | Type | Description |
|---|---|---|
argv | readonly string[] | Raw argument strings. |
token | string | Exact flag token to look for (e.g. --version). |
Members
Members
includesBeforeSeparator
Whether token appears in argv before the -- end-of-options separator.
Everything at or after the first -- is a literal positional, so root-level flag interception (--help / --version / --json) must use this instead of a naive Array.includes() — otherwise a post-separator literal (-- --json) is wrongly treated as the flag.
ts
(argv: readonly string[], token: string): boolean;