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.

27 lines
613 B

4 years ago
  1. var baseIsMap = require('./_baseIsMap'),
  2. baseUnary = require('./_baseUnary'),
  3. nodeUtil = require('./_nodeUtil');
  4. /* Node.js helper references. */
  5. var nodeIsMap = nodeUtil && nodeUtil.isMap;
  6. /**
  7. * Checks if `value` is classified as a `Map` object.
  8. *
  9. * @static
  10. * @memberOf _
  11. * @since 4.3.0
  12. * @category Lang
  13. * @param {*} value The value to check.
  14. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  15. * @example
  16. *
  17. * _.isMap(new Map);
  18. * // => true
  19. *
  20. * _.isMap(new WeakMap);
  21. * // => false
  22. */
  23. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  24. module.exports = isMap;