main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
629 bytes
|
Line | |
---|
1 | import getTag from './_getTag.js';
|
---|
2 | import isObjectLike from './isObjectLike.js';
|
---|
3 |
|
---|
4 | /** `Object#toString` result references. */
|
---|
5 | var weakMapTag = '[object WeakMap]';
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * Checks if `value` is classified as a `WeakMap` object.
|
---|
9 | *
|
---|
10 | * @static
|
---|
11 | * @memberOf _
|
---|
12 | * @since 4.3.0
|
---|
13 | * @category Lang
|
---|
14 | * @param {*} value The value to check.
|
---|
15 | * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
|
---|
16 | * @example
|
---|
17 | *
|
---|
18 | * _.isWeakMap(new WeakMap);
|
---|
19 | * // => true
|
---|
20 | *
|
---|
21 | * _.isWeakMap(new Map);
|
---|
22 | * // => false
|
---|
23 | */
|
---|
24 | function isWeakMap(value) {
|
---|
25 | return isObjectLike(value) && getTag(value) == weakMapTag;
|
---|
26 | }
|
---|
27 |
|
---|
28 | export default isWeakMap;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.