Last active
January 17, 2019 23:29
-
-
Save ajklein/abfa3e29ad805fae45cb55c274f2a495 to your computer and use it in GitHub Desktop.
Case insensitive Set
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 CaseInsensitiveSet extends Set { | |
add(key) { | |
return super.add(key.toLowerCase()); | |
} | |
delete(key) { | |
return super.delete(key.toLowerCase()); | |
} | |
has(key) { | |
return super.has(key.toLowerCase()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment