mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Bump to v3.10.0.
This commit is contained in:
@@ -1,15 +1,5 @@
|
||||
import isObjectLike from '../internal/isObjectLike';
|
||||
import isPlainObject from './isPlainObject';
|
||||
import support from '../support';
|
||||
|
||||
/** Used for native method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objToString = objectProto.toString;
|
||||
|
||||
/**
|
||||
* Checks if `value` is a DOM element.
|
||||
@@ -28,14 +18,7 @@ var objToString = objectProto.toString;
|
||||
* // => false
|
||||
*/
|
||||
function isElement(value) {
|
||||
return !!value && value.nodeType === 1 && isObjectLike(value) &&
|
||||
(objToString.call(value).indexOf('Element') > -1);
|
||||
}
|
||||
// Fallback for environments without DOM support.
|
||||
if (!support.dom) {
|
||||
isElement = function(value) {
|
||||
return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
|
||||
};
|
||||
return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
|
||||
}
|
||||
|
||||
export default isElement;
|
||||
|
||||
Reference in New Issue
Block a user