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
3
isSet.js
3
isSet.js
@@ -1,5 +1,6 @@
|
||||
import getTag from './.internal/getTag.js'
|
||||
import nodeUtil from './.internal/nodeUtil.js'
|
||||
import isObjectLike from './isObjectLike'
|
||||
|
||||
/* Node.js helper references. */
|
||||
const nodeIsSet = nodeUtil && nodeUtil.isSet
|
||||
@@ -21,6 +22,6 @@ const nodeIsSet = nodeUtil && nodeUtil.isSet
|
||||
*/
|
||||
const isSet = nodeIsSet
|
||||
? (value) => nodeIsSet(value)
|
||||
: (value) => typeof value == 'object' && value !== null && getTag(value) == '[object Set]'
|
||||
: (value) => isObjectLike(value) && getTag(value) == '[object Set]'
|
||||
|
||||
export default isSet
|
||||
|
||||
Reference in New Issue
Block a user