stripBeforeSeparator
Generated reference page for the stripBeforeSeparator function export.
- Import:
@kjanat/dreamcli - Export kind: function
- Declared in:
src/core/parse/index.ts - Source link:
src/core/parse/index.ts:143
Signatures
ts
function stripBeforeSeparator(argv: readonly string[], token: string): readonly string[];| Parameter | Type | Description |
|---|---|---|
argv | readonly string[] | Raw argument strings. |
token | string | Exact flag token to strip (e.g. --json). |
Members
Members
stripBeforeSeparator
Remove every occurrence of token that appears before the -- end-of-options separator, leaving post-separator literals untouched.
The strip counterpart to includesBeforeSeparator: root-level flags (--json) are stripped before dispatch/parse so the command schema never sees them, but a literal after -- (-- --json) must reach the command unchanged.
ts
(argv: readonly string[], token: string): readonly string[];