|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
643 bytes
|
| Line | |
|---|
| 1 | var baseGetTag = require('./_baseGetTag'),
|
|---|
| 2 | isObjectLike = require('./isObjectLike');
|
|---|
| 3 |
|
|---|
| 4 | /** `Object#toString` result references. */
|
|---|
| 5 | var weakSetTag = '[object WeakSet]';
|
|---|
| 6 |
|
|---|
| 7 | /**
|
|---|
| 8 | * Checks if `value` is classified as a `WeakSet` 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 set, else `false`.
|
|---|
| 16 | * @example
|
|---|
| 17 | *
|
|---|
| 18 | * _.isWeakSet(new WeakSet);
|
|---|
| 19 | * // => true
|
|---|
| 20 | *
|
|---|
| 21 | * _.isWeakSet(new Set);
|
|---|
| 22 | * // => false
|
|---|
| 23 | */
|
|---|
| 24 | function isWeakSet(value) {
|
|---|
| 25 | return isObjectLike(value) && baseGetTag(value) == weakSetTag;
|
|---|
| 26 | }
|
|---|
| 27 |
|
|---|
| 28 | module.exports = isWeakSet;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.