Last active
August 29, 2015 14:03
-
-
Save inhji/82fb59c9370a1e05e743 to your computer and use it in GitHub Desktop.
Betta
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
/* --------------------------------- | |
___ __ __ | |
\_ |__ _____/ |__/ |______ | |
| __ \_/ __ \ __\ __\__ \ | |
| \_\ \ ___/| | | | / __ \_ | |
|___ /\___ >__| |__| (____ / | |
\/ \/ \/ | |
ß("ßetta", "string"); | |
// => true | |
ß("Super simple typechecking"); | |
// => "string" | |
author: inhji | |
license: wtfpl | |
v0.0.1 | |
--------------------------------- */ | |
var g = v => Object().toString.call(v).replace(/\[object\s|\]/g, "").toLowerCase(),c = (v, t) => g(v) === t || g(v).substr(0,3) === t, | |
ß = (v,t) => t? c(v,t): g(v); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment