Skip to content

Commit fa35fa9

Browse files
committed
changed the final test.
1 parent 237cdf7 commit fa35fa9

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/functions.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,10 @@ export function isQuestion(message: string): boolean {
4747
* upper or lower case), then return `false`. Otherwise, return `null`.
4848
*/
4949
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-
}
50+
return(
51+
word.toUpperCase()== "YES" ? true: word.toUpperCase() == "NO"? false: null
52+
);
53+
5754
}
5855

5956

0 commit comments

Comments
 (0)