basant307/AI_Governance_Project
048
1/**2Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag.3 4@param flag - CLI flag to look for. The `--` prefix is optional.5@param argv - CLI arguments. Default: `process.argv`.6@returns Whether the flag exists.7 8@example9```10// $ ts-node foo.ts -f --unicorn --foo=bar -- --rainbow11 12// foo.ts13import hasFlag = require('has-flag');14 15hasFlag('unicorn');16//=> true17 18hasFlag('--unicorn');19//=> true20 21hasFlag('f');22//=> true23 24hasFlag('-f');25//=> true26 27hasFlag('foo=bar');28//=> true29 30hasFlag('foo');31//=> false32 33hasFlag('rainbow');34//=> false35```36*/37declare function hasFlag(flag: string, argv?: string[]): boolean;38 39export = hasFlag;40 