Skip to content

Instantly share code, notes, and snippets.

@soharu
Created January 6, 2014 16:38
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 soharu/8285507 to your computer and use it in GitHub Desktop.
Save soharu/8285507 to your computer and use it in GitHub Desktop.
classof() function
function classof(o) {
if (o === null) return "Null";
if (o === undefined) return "Undefined";
return Object.prototype.toString.call(o).slice(8, -1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment