Skip to content

Instantly share code, notes, and snippets.

@watilde
Last active August 29, 2015 14:22
Show Gist options
  • Save watilde/6b8aceea76d1032a1e01 to your computer and use it in GitHub Desktop.
Save watilde/6b8aceea76d1032a1e01 to your computer and use it in GitHub Desktop.
String.isNyaN = function (val) {
if (typeof val !== 'string') return false;
var nyan = ['cat', 'kitty', 'kitten', 'doraemon', '๐Ÿฑ', '๐Ÿ˜ฟ', '๐Ÿ˜บ', '๐Ÿ˜ธ', '๐Ÿ˜ผ', '๐Ÿ˜น', '๐Ÿ˜ป', '๐Ÿ˜ฝ', '๐Ÿ˜พ', '๐Ÿ™€'];
return nyan.indexOf(val.toLowerCase()) !== -1;
}
@oti
Copy link

oti commented Jun 1, 2015

Oh! don't forget 'kitten' ๐Ÿ˜„

@watilde
Copy link
Author

watilde commented Jun 1, 2015

Ok I just added one you said, and also kitty and doraemon

@oti
Copy link

oti commented Jun 2, 2015

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment