bc92defd87f91d982b0b3d37c6c3c8f0867e7276
[yaffs-website] / node_modules / grunt-legacy-log-utils / node_modules / lodash / isMap.js
1 var getTag = require('./_getTag'),
2     isObjectLike = require('./isObjectLike');
3
4 /** `Object#toString` result references. */
5 var mapTag = '[object Map]';
6
7 /**
8  * Checks if `value` is classified as a `Map` object.
9  *
10  * @static
11  * @memberOf _
12  * @category Lang
13  * @param {*} value The value to check.
14  * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
15  * @example
16  *
17  * _.isMap(new Map);
18  * // => true
19  *
20  * _.isMap(new WeakMap);
21  * // => false
22  */
23 function isMap(value) {
24   return isObjectLike(value) && getTag(value) == mapTag;
25 }
26
27 module.exports = isMap;