Skip to content

Commit

Permalink
Relax proper implementation detection
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Nov 10, 2015
1 parent 905cac5 commit 7356523
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion is-implemented.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
module.exports = function () {
var map, iterator, result;
if (typeof Map !== 'function') return false;
if (String(Map.prototype) !== '[object Map]') return false;
try {
// WebKit doesn't support arguments and crashes
map = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]);
} catch (e) {
return false;
}
if (String(map) !== '[object Map]') return false;
if (map.size !== 3) return false;
if (typeof map.clear !== 'function') return false;
if (typeof map.delete !== 'function') return false;
Expand Down

0 comments on commit 7356523

Please sign in to comment.