summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/es6-map/is-map.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/es6-map/is-map.js')
-rw-r--r--tools/eslint/node_modules/es6-map/is-map.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/es6-map/is-map.js b/tools/eslint/node_modules/es6-map/is-map.js
new file mode 100644
index 0000000000..1e1fa82332
--- /dev/null
+++ b/tools/eslint/node_modules/es6-map/is-map.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var toStringTagSymbol = require('es6-symbol').toStringTag
+
+ , toString = Object.prototype.toString
+ , id = '[object Map]'
+ , Global = (typeof Map === 'undefined') ? null : Map;
+
+module.exports = function (x) {
+ return (x && ((Global && ((x instanceof Global) || (x === Global.prototype))) ||
+ (toString.call(x) === id) || (x[toStringTagSymbol] === 'Map'))) || false;
+};