mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
use isObjectLike module instead of (typeof value == 'object' && value !== null) in another modules (#3650)
This commit is contained in:
committed by
John-David Dalton
parent
678eb000b7
commit
c1f805f497
@@ -1,4 +1,5 @@
|
||||
import getTag from './.internal/getTag.js'
|
||||
import isObjectLike from './isObjectLike'
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `WeakMap` object.
|
||||
@@ -16,7 +17,7 @@ import getTag from './.internal/getTag.js'
|
||||
* // => false
|
||||
*/
|
||||
function isWeakMap(value) {
|
||||
return typeof value == 'object' && value !== null && getTag(value) == '[object WeakMap]'
|
||||
return isObjectLike(value) && getTag(value) == '[object WeakMap]'
|
||||
}
|
||||
|
||||
export default isWeakMap
|
||||
|
||||
Reference in New Issue
Block a user