aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/has-symbols/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/has-symbols/index.js')
-rw-r--r--node_modules/has-symbols/index.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js
new file mode 100644
index 0000000..fa65265
--- /dev/null
+++ b/node_modules/has-symbols/index.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var origSymbol = typeof Symbol !== 'undefined' && Symbol;
+var hasSymbolSham = require('./shams');
+
+/** @type {import('.')} */
+module.exports = function hasNativeSymbols() {
+ if (typeof origSymbol !== 'function') { return false; }
+ if (typeof Symbol !== 'function') { return false; }
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
+
+ return hasSymbolSham();
+};