MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / isElement

Function isElement

lib/web/jshint.js:9956–9959  ·  view source on GitHub ↗

* Checks if `value` is a DOM element. * * @static * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. * @example * * _.isElement(document.body); * // =>

(value)

Source from the content-addressed store, hash-verified

9954 * // => false
9955 */
9956 function isElement(value) {
9957 return !!value && value.nodeType === 1 && isObjectLike(value) &&
9958 (objToString.call(value).indexOf('Element') > -1);
9959 }
9960 // Fallback for environments without DOM support.
9961 if (!support.dom) {
9962 isElement = function(value) {

Callers

nothing calls this directly

Calls 3

isObjectLikeFunction · 0.85
indexOfMethod · 0.80
callMethod · 0.45

Tested by

no test coverage detected