Created
May 24, 2015 14:06
-
-
Save pocotan001/a3fbd7e982ee9137bc8c to your computer and use it in GitHub Desktop.
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
/** | |
* @see http://bonsaiden.github.io/JavaScript-Garden/#types.typeof | |
* @param {*} object | |
* @return {string} | |
*/ | |
function toType(object) { | |
return Object.prototype.toString.call(object).slice(8, -1).toLowerCase(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment