Skip to content

Instantly share code, notes, and snippets.

@ajklein
Last active January 17, 2019 23:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajklein/abfa3e29ad805fae45cb55c274f2a495 to your computer and use it in GitHub Desktop.
Save ajklein/abfa3e29ad805fae45cb55c274f2a495 to your computer and use it in GitHub Desktop.
Case insensitive Set
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