diff options
Diffstat (limited to 'tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-native-implemented.js')
-rw-r--r-- | tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-native-implemented.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-native-implemented.js new file mode 100644 index 0000000000..b3fe5a594d --- /dev/null +++ b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-native-implemented.js @@ -0,0 +1,10 @@ +// Exports true if environment provides native `WeakMap` implementation, +// whatever that is. + +'use strict'; + +module.exports = (function () { + if (typeof WeakMap === 'undefined') return false; + return (Object.prototype.toString.call(WeakMap.prototype) === + '[object WeakMap]'); +}()); |