3 module.exports = function () {
4 var map, iterator, result;
5 if (typeof Map !== 'function') return false;
7 // WebKit doesn't support arguments and crashes
8 map = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]);
12 if (map.size !== 3) return false;
13 if (typeof map.clear !== 'function') return false;
14 if (typeof map.delete !== 'function') return false;
15 if (typeof map.entries !== 'function') return false;
16 if (typeof map.forEach !== 'function') return false;
17 if (typeof map.get !== 'function') return false;
18 if (typeof map.has !== 'function') return false;
19 if (typeof map.keys !== 'function') return false;
20 if (typeof map.set !== 'function') return false;
21 if (typeof map.values !== 'function') return false;
23 iterator = map.entries();
24 result = iterator.next();
25 if (result.done !== false) return false;
26 if (!result.value) return false;
27 if (result.value[0] !== 'raz') return false;
28 if (result.value[1] !== 'one') return false;