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