Last active
October 17, 2019 17:57
-
-
Save vadimbogomazov/3e501661f985a43f1d42a91d360acc81 to your computer and use it in GitHub Desktop.
Check object function
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
/** | |
* Check object function | |
* @param {val} | |
* @return {Boolean} | |
*/ | |
export const isObject = val => { | |
if (val === null) { | |
return false; | |
} | |
return ((typeof val === 'function') || (typeof val === 'object')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment