chenyc
2025-12-09 545c24c6a711d71b65f3d4e8122fee3837fb1edc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"use strict";
 
var objToString       = Object.prototype.toString
  , toStringTagSymbol = require("es6-symbol").toStringTag
  , id                = "[object Set]"
  , Global            = typeof Set === "undefined" ? null : Set;
 
module.exports = function (value) {
    return (
        (value &&
            ((Global && (value instanceof Global || value === Global.prototype)) ||
                objToString.call(value) === id ||
                value[toStringTagSymbol] === "Set")) ||
        false
    );
};