Skip to content

Instantly share code, notes, and snippets.

@inhji
Last active August 29, 2015 14:03
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 inhji/82fb59c9370a1e05e743 to your computer and use it in GitHub Desktop.
Save inhji/82fb59c9370a1e05e743 to your computer and use it in GitHub Desktop.
Betta
/* ---------------------------------
___ __ __
\_ |__ _____/ |__/ |______
| __ \_/ __ \ __\ __\__ \
| \_\ \ ___/| | | | / __ \_
|___ /\___ >__| |__| (____ /
\/ \/ \/
ß("ß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