Skip to content

Instantly share code, notes, and snippets.

@pocotan001
Created May 24, 2015 14:06
Show Gist options
  • Save pocotan001/a3fbd7e982ee9137bc8c to your computer and use it in GitHub Desktop.
Save pocotan001/a3fbd7e982ee9137bc8c to your computer and use it in GitHub Desktop.
/**
* @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