Last active
August 16, 2018 08:09
-
-
Save bmelnychuk/18e2e49b38f636a74cf275ae69f93417 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TextEqualityAnswerValidationPolicy implements AnswerValidationPolicy { | |
isAnswerValid(userAnswer: string, correctAnswer: string): Promise<boolean> { | |
return Promise.resolve( | |
userAnswer.trim().toLowerCase() === correctAnswer.toLowerCase() | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment