summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/has-symbols/index.js
diff options
context:
space:
mode:
authorisaacs <nope@not.real>2019-07-03 10:23:19 -0700
committerRich Trott <rtrott@gmail.com>2019-07-18 15:12:49 -0700
commit1721034a40c5e7a0a334701dc36153adee3f27e5 (patch)
tree7b2ce5a0c5d67d2e1d817fc548571250e8c1a305 /deps/npm/node_modules/has-symbols/index.js
parent6df7b6a4f9cb64d298e7fd0691c4d09679872922 (diff)
downloadandroid-node-v8-1721034a40c5e7a0a334701dc36153adee3f27e5.tar.gz
android-node-v8-1721034a40c5e7a0a334701dc36153adee3f27e5.tar.bz2
android-node-v8-1721034a40c5e7a0a334701dc36153adee3f27e5.zip
deps: upgrade npm to 6.10.0
PR-URL: https://github.com/nodejs/node/pull/28525 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/has-symbols/index.js')
-rw-r--r--deps/npm/node_modules/has-symbols/index.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/deps/npm/node_modules/has-symbols/index.js b/deps/npm/node_modules/has-symbols/index.js
new file mode 100644
index 0000000000..f72159e0ac
--- /dev/null
+++ b/deps/npm/node_modules/has-symbols/index.js
@@ -0,0 +1,13 @@
+'use strict';
+
+var origSymbol = global.Symbol;
+var hasSymbolSham = require('./shams');
+
+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();
+};