Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
function Cliffy.validateFlags
Re-export
import { Cliffy } from "https://deno.land/x/dmm@v2.1.2/tests/integration/up-to-date-deps/deps.ts";
const { validateFlags } = Cliffy;

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.