diff options
Diffstat (limited to 'node_modules/es6-set/is-set.js')
-rw-r--r-- | node_modules/es6-set/is-set.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/node_modules/es6-set/is-set.js b/node_modules/es6-set/is-set.js new file mode 100644 index 000000000..6b491ddee --- /dev/null +++ b/node_modules/es6-set/is-set.js @@ -0,0 +1,12 @@ +'use strict'; + +var toString = Object.prototype.toString + , toStringTagSymbol = require('es6-symbol').toStringTag + + , id = '[object Set]' + , Global = (typeof Set === 'undefined') ? null : Set; + +module.exports = function (x) { + return (x && ((Global && ((x instanceof Global) || (x === Global.prototype))) || + (toString.call(x) === id) || (x[toStringTagSymbol] === 'Set'))) || false; +}; |