mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Bump to v4.16.5.
This commit is contained in:
14
isWeakSet.js
14
isWeakSet.js
@@ -1,18 +1,8 @@
|
||||
define(['./isObjectLike'], function(isObjectLike) {
|
||||
define(['./_baseGetTag', './isObjectLike'], function(baseGetTag, isObjectLike) {
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var weakSetTag = '[object WeakSet]';
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `WeakSet` object.
|
||||
*
|
||||
@@ -31,7 +21,7 @@ define(['./isObjectLike'], function(isObjectLike) {
|
||||
* // => false
|
||||
*/
|
||||
function isWeakSet(value) {
|
||||
return isObjectLike(value) && objectToString.call(value) == weakSetTag;
|
||||
return isObjectLike(value) && baseGetTag(value) == weakSetTag;
|
||||
}
|
||||
|
||||
return isWeakSet;
|
||||
|
||||
Reference in New Issue
Block a user