Skip to content

Instantly share code, notes, and snippets.

@ahmedelgabri
Created January 8, 2016 12:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmedelgabri/8047e078d1d77599239a to your computer and use it in GitHub Desktop.
Save ahmedelgabri/8047e078d1d77599239a to your computer and use it in GitHub Desktop.
Simple check for the type of an object
function getType(target){
return Object.prototype.toString.call(target).slice(8, -1).toLowerCase();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment