aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es6-symbol/is-symbol.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/es6-symbol/is-symbol.js')
-rw-r--r--node_modules/es6-symbol/is-symbol.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/node_modules/es6-symbol/is-symbol.js b/node_modules/es6-symbol/is-symbol.js
new file mode 100644
index 000000000..074cb07fb
--- /dev/null
+++ b/node_modules/es6-symbol/is-symbol.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function (x) {
+ if (!x) return false;
+ if (typeof x === 'symbol') return true;
+ if (!x.constructor) return false;
+ if (x.constructor.name !== 'Symbol') return false;
+ return (x[x.constructor.toStringTag] === 'Symbol');
+};