Skip to content

Instantly share code, notes, and snippets.

@iorionda
Created February 10, 2016 06:20
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 iorionda/5740145b7d3e5ae3b628 to your computer and use it in GitHub Desktop.
Save iorionda/5740145b7d3e5ae3b628 to your computer and use it in GitHub Desktop.
function is(type, obj) {
var clas = Object.prototype.toString.call(obj).slice(8, -1);
return obj !== undefined && obj !== null && clas === type;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment