You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
613 B
JavaScript
28 lines
613 B
JavaScript
5 years ago
|
var baseIsMap = require('./_baseIsMap'),
|
||
|
baseUnary = require('./_baseUnary'),
|
||
|
nodeUtil = require('./_nodeUtil');
|
||
|
|
||
|
/* Node.js helper references. */
|
||
|
var nodeIsMap = nodeUtil && nodeUtil.isMap;
|
||
|
|
||
|
/**
|
||
|
* Checks if `value` is classified as a `Map` object.
|
||
|
*
|
||
|
* @static
|
||
|
* @memberOf _
|
||
|
* @since 4.3.0
|
||
|
* @category Lang
|
||
|
* @param {*} value The value to check.
|
||
|
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
||
|
* @example
|
||
|
*
|
||
|
* _.isMap(new Map);
|
||
|
* // => true
|
||
|
*
|
||
|
* _.isMap(new WeakMap);
|
||
|
* // => false
|
||
|
*/
|
||
|
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
||
|
|
||
|
module.exports = isMap;
|