mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Use nullish checks instead of coercing to booleans.
This commit is contained in:
@@ -11271,7 +11271,7 @@
|
|||||||
* // => false
|
* // => false
|
||||||
*/
|
*/
|
||||||
function isElement(value) {
|
function isElement(value) {
|
||||||
return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
|
return value != null && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11566,7 +11566,7 @@
|
|||||||
*/
|
*/
|
||||||
function isObject(value) {
|
function isObject(value) {
|
||||||
var type = typeof value;
|
var type = typeof value;
|
||||||
return !!value && (type == 'object' || type == 'function');
|
return value != null && (type == 'object' || type == 'function');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11594,7 +11594,7 @@
|
|||||||
* // => false
|
* // => false
|
||||||
*/
|
*/
|
||||||
function isObjectLike(value) {
|
function isObjectLike(value) {
|
||||||
return !!value && typeof value == 'object';
|
return value != null && typeof value == 'object';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user