mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Modularize master branch.
This commit is contained in:
27
isMap.js
Normal file
27
isMap.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import baseIsMap from './_baseIsMap.js';
|
||||
import baseUnary from './_baseUnary.js';
|
||||
import nodeUtil from './_nodeUtil.js';
|
||||
|
||||
/* 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;
|
||||
|
||||
export default isMap;
|
||||
Reference in New Issue
Block a user