-
-
Save Vchouliaras/969189b32278c04346a6bc87fcd7c069 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 type(value) { | |
var regex = /^\[object (\S+?)\]$/; | |
var matches = Object.prototype.toString.call(value).match(regex) || []; | |
return (matches[1] || 'undefined').toLowerCase(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment