Ohm-Management - Projektarbeit B-ME
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.

isWeakMap.js 631B

12345678910111213141516171819202122232425262728
  1. var getTag = require('./_getTag'),
  2. isObjectLike = require('./isObjectLike');
  3. /** `Object#toString` result references. */
  4. var weakMapTag = '[object WeakMap]';
  5. /**
  6. * Checks if `value` is classified as a `WeakMap` object.
  7. *
  8. * @static
  9. * @memberOf _
  10. * @since 4.3.0
  11. * @category Lang
  12. * @param {*} value The value to check.
  13. * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
  14. * @example
  15. *
  16. * _.isWeakMap(new WeakMap);
  17. * // => true
  18. *
  19. * _.isWeakMap(new Map);
  20. * // => false
  21. */
  22. function isWeakMap(value) {
  23. return isObjectLike(value) && getTag(value) == weakMapTag;
  24. }
  25. module.exports = isWeakMap;