We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 237cdf7 commit fa35fa9Copy full SHA for fa35fa9
src/functions.ts
@@ -47,13 +47,10 @@ export function isQuestion(message: string): boolean {
47
* upper or lower case), then return `false`. Otherwise, return `null`.
48
*/
49
export function convertYesNo(word: string): boolean | null {
50
- if (word === "yes" || word === "YES") {
51
- return true;
52
- } else if (word == "no" || word === "NO") {
53
- return false;
54
- } else {
55
- return null;
56
- }
+ return(
+ word.toUpperCase()== "YES" ? true: word.toUpperCase() == "NO"? false: null
+ );
+
57
}
58
59
0 commit comments