Created
February 14, 2016 14:21
-
-
Save zkareemz/a88a7f62d1dd88ab5016 to your computer and use it in GitHub Desktop.
Get the javascript object type
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
function getType(o){ | |
return Object.prototype.toString.call(o).split(' ').pop().replace(']','').toLowerCase(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment