mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Bump to v4.14.0.
This commit is contained in:
16
isSet.js
16
isSet.js
@@ -1,8 +1,9 @@
|
||||
import getTag from './_getTag.js';
|
||||
import isObjectLike from './isObjectLike.js';
|
||||
import baseIsSet from './_baseIsSet.js';
|
||||
import baseUnary from './_baseUnary.js';
|
||||
import nodeUtil from './_nodeUtil.js';
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var setTag = '[object Set]';
|
||||
/* Node.js helper references. */
|
||||
var nodeIsSet = nodeUtil && nodeUtil.isSet;
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Set` object.
|
||||
@@ -12,8 +13,7 @@ var setTag = '[object Set]';
|
||||
* @since 4.3.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isSet(new Set);
|
||||
@@ -22,8 +22,6 @@ var setTag = '[object Set]';
|
||||
* _.isSet(new WeakSet);
|
||||
* // => false
|
||||
*/
|
||||
function isSet(value) {
|
||||
return isObjectLike(value) && getTag(value) == setTag;
|
||||
}
|
||||
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
||||
|
||||
export default isSet;
|
||||
|
||||
Reference in New Issue
Block a user