_baseIsMap.js 478 B

12345678910111213141516171819
  1. var getTag = require('./_getTag'),
  2. isObjectLike = require('./isObjectLike');
  3. /** `Object#toString` result references. */
  4. var mapTag = '[object Map]';
  5. /**
  6. * The base implementation of `_.isMap` without Node.js optimizations.
  7. *
  8. * @private
  9. * @param {*} value The value to check.
  10. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  11. */
  12. function baseIsMap(value) {
  13. return isObjectLike(value) && getTag(value) == mapTag;
  14. }
  15. module.exports = baseIsMap;