Skip to content

Instantly share code, notes, and snippets.

@haikyuu
Created January 5, 2018 23:21
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 haikyuu/10ff10fc888ec6614f86cc23387f0ff3 to your computer and use it in GitHub Desktop.
Save haikyuu/10ff10fc888ec6614f86cc23387f0ff3 to your computer and use it in GitHub Desktop.
const type = val =>
val === null
? 'Null'
: val === undefined
? 'Undefined'
: Object.prototype.toString.call(val).slice(8, -1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment