MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / validateCliDate

Function validateCliDate

scripts/cli-options.ts:162–166  ·  view source on GitHub ↗
(date: string, fail: (message: string) => never)

Source from the content-addressed store, hash-verified

160}
161
162export function validateCliDate(date: string, fail: (message: string) => never) {
163 if (!/^\d{4}-\d{2}-\d{2}$/.test(date)) {
164 fail(`Invalid date: ${date}. Expected YYYY-MM-DD.`);
165 }
166}
167
168export function optionalFlagArg(flag: string, enabled: boolean) {
169 return enabled ? [flag] : [];

Callers 3

finalizeOptionsFunction · 0.90
finalizeOptionsFunction · 0.90
validateDateRangeFunction · 0.90

Calls 1

failFunction · 0.70

Tested by

no test coverage detected