UNPKG

xe-utils

Version:

JavaScript 函数库、工具类

12 lines (10 loc) • 305 B
import isString from './isString.js';import isNumber from './isNumber.js';/** * 判断是否Element对象 * * @param {Object} obj 对象 * @return {Boolean} */ function isElement (obj) { return !!(obj && isString(obj.nodeName) && isNumber(obj.nodeType)) } export default isElement