mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Simplify isType methods.
This commit is contained in:
3
isSet.js
3
isSet.js
@@ -1,5 +1,4 @@
|
||||
import getTag from './.internal/getTag.js'
|
||||
import isObjectLike from './isObjectLike.js'
|
||||
import nodeUtil from './.internal/nodeUtil.js'
|
||||
|
||||
/* Node.js helper references. */
|
||||
@@ -22,6 +21,6 @@ const nodeIsSet = nodeUtil && nodeUtil.isSet
|
||||
*/
|
||||
const isSet = nodeIsSet
|
||||
? value => nodeIsSet(value)
|
||||
: value => isObjectLike(value) && getTag(value) == '[object Set]'
|
||||
: value => typeof value == 'object' && value != null && getTag(value) == '[object Set]'
|
||||
|
||||
export default isSet
|
||||
|
||||
Reference in New Issue
Block a user