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