Last active
December 18, 2017 19:36
-
-
Save daliborgogic/10e4f3b34717f44ddcbd35bc9adbaad5 to your computer and use it in GitHub Desktop.
Check variable type
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
/** | |
* Check variable type | |
* @return {Boolean} | |
*/ | |
export const isType = (type, val) => !!(val.constructor && val.constructor.name.toLowerCase() === type.toLowerCase()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.