Created
February 10, 2016 06:20
-
-
Save iorionda/5740145b7d3e5ae3b628 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
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