You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
641 B
29 lines
641 B
2 years ago
|
import baseGetTag from './_baseGetTag.js';
|
||
|
import isObjectLike from './isObjectLike.js';
|
||
|
|
||
|
/** `Object#toString` result references. */
|
||
|
var weakSetTag = '[object WeakSet]';
|
||
|
|
||
|
/**
|
||
|
* Checks if `value` is classified as a `WeakSet` object.
|
||
|
*
|
||
|
* @static
|
||
|
* @memberOf _
|
||
|
* @since 4.3.0
|
||
|
* @category Lang
|
||
|
* @param {*} value The value to check.
|
||
|
* @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
|
||
|
* @example
|
||
|
*
|
||
|
* _.isWeakSet(new WeakSet);
|
||
|
* // => true
|
||
|
*
|
||
|
* _.isWeakSet(new Set);
|
||
|
* // => false
|
||
|
*/
|
||
|
function isWeakSet(value) {
|
||
|
return isObjectLike(value) && baseGetTag(value) == weakSetTag;
|
||
|
}
|
||
|
|
||
|
export default isWeakSet;
|