~webapps/unity-js-scopes/node.js

« back to all changes in this revision

Viewing changes to tools/eslint/node_modules/escope/node_modules/es6-map/is-map.js

  • Committer: Marcus Tomlinson
  • Date: 2015-11-13 07:59:04 UTC
  • Revision ID: marcus.tomlinson@canonical.com-20151113075904-h0swczmoq1rvstfc
Node v4 (stable)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'use strict';
 
2
 
 
3
var toStringTagSymbol = require('es6-symbol').toStringTag
 
4
 
 
5
  , toString = Object.prototype.toString
 
6
  , id = '[object Map]'
 
7
  , Global = (typeof Map === 'undefined') ? null : Map;
 
8
 
 
9
module.exports = function (x) {
 
10
        return (x && ((Global && (x instanceof Global)) ||
 
11
                        (toString.call(x) === id) || (x[toStringTagSymbol] === 'Map'))) || false;
 
12
};