The Wayback Machine - https://web.archive.org/web/20201220221549/https://github.com/lodash/lodash/blob/master/isWeakSet.js
Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
23 lines (21 sloc) 528 Bytes
import getTag from './.internal/getTag.js'
import isObjectLike from './isObjectLike.js'
/**
* Checks if `value` is classified as a `WeakSet` object.
*
* @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) && getTag(value) == '[object WeakSet]'
}
export default isWeakSet
You can’t perform that action at this time.