Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cliffy/flags/mod.ts>validateFlags

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
function validateFlags
Re-export
import { validateFlags } from "https://deno.land/x/cliffy@v0.20.1/flags/mod.ts";

Flags post validation. Validations that are not already done by the parser.

Parameters

flags: IFlagOptions[]

Available flag options.

values: Record<string, unknown>

Flag to validate.

optional
_knownFlaks: Record<string, unknown>

Don't throw an error if a missing flag is defined in knownFlags (currently not implemented).

optional
allowEmpty: boolean

Don't throw an error if values is empty.

optional
optionNames: Record<string, string> = [UNSUPPORTED]

Mapped option names of negatable options.