summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/es6-map/is-map.js
diff options
context:
space:
mode:
authorMichaƫl Zasso <mic.besace@gmail.com>2016-01-12 20:50:19 +0100
committerRoman Reiss <me@silverwind.io>2016-01-13 23:15:39 +0100
commit2d441493a4a46a511ba1bdf93e442c3288fbe92d (patch)
treec649c3aa100a57ff38ed267e3a5e5bba7ac8d961 /tools/eslint/node_modules/es6-map/is-map.js
parented55169834a3ce16a271def9630c858626ded34d (diff)
downloadnode-new-2d441493a4a46a511ba1bdf93e442c3288fbe92d.tar.gz
tools: update eslint to v1.10.3
PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss <me@silverwind.io>
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;
+};