Home

Source: \isWeakMap.js


    import getTag from './.internal/getTag.js'

/**
 * Checks if `value` is classified as a `WeakMap` object.
 *
 * @since 4.3.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
 * @example
 *
 * isWeakMap(new WeakMap)
 * // => true
 *
 * isWeakMap(new Map)
 * // => false
 */
function isWeakMap(value) {
  return typeof value == 'object' && value != null && getTag(value) == '[object WeakMap]'
}

export default isWeakMap