Created
April 20, 2018 08:02
-
-
Save KhalilZaidoun/38d9705b5f659ea79f9f86b517f7a571 to your computer and use it in GitHub Desktop.
Checks if the passed element is dom object or not
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
/** | |
* Checks if the passed element is dom object or not | |
* @param element | |
* @returns {boolean} | |
*/ | |
function isDomElement(element) { | |
return element && typeof element === 'object' && 'nodeType' in element; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment