From 5bf57be652138960dd407a4d5dc9d5d12f2726f3 Mon Sep 17 00:00:00 2001 From: jacoobes Date: Wed, 26 Jan 2022 21:46:02 -0600 Subject: [PATCH] fmt parseBool --- src/handler/utils/preprocessors/args.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/handler/utils/preprocessors/args.ts b/src/handler/utils/preprocessors/args.ts index 9b0eddd..2629a4b 100644 --- a/src/handler/utils/preprocessors/args.ts +++ b/src/handler/utils/preprocessors/args.ts @@ -21,7 +21,8 @@ export namespace Utils { export function parseBool( arg: string, onFailure: possibleOutput = `Cannot parse ${arg} as a boolean`, - regexes : {yesRegex: RegExp, noRegex: RegExp} = {yesRegex : /(yes|y|👍)/gi, noRegex : /(no|n|👎)/gi} ): ArgType { + regexes : {yesRegex: RegExp, noRegex: RegExp} = {yesRegex : /(yes|y|👍)/gi, noRegex : /(no|n|👎)/gi} + ): ArgType { if(arg.match(regexes.yesRegex)) { return Ok(true); }