Lines Matching full:map
26 let res = new Map();
27 let map = new fastmap(); variable
28 map.set("a", "aa");
29 map.set("b", "bb");
32 res.set("test get:", map.length == 2 && map.get("a") == "aa" && map.get("b") == "bb");
34 res.set("test hasKey and hasValue:", map.hasKey("a") && map.hasKey("b") && map.hasValue("aa") &&
35 map.hasValue("bb") && !map.hasKey("c") && !map.hasValue("cc"));
37 map.set("c", "cc");
39 … res.set("test getFirstKey and getLastKey:", map.getFirstKey() == "a" && map.getLastKey() == "c");
41 …res.set("test getLowerKey and getHigherKey:", map.getLowerKey("b") == "a" && map.getLowerKey("a") …
42 map.getHigherKey("b") == "c" && map.getHigherKey("c") == undefined);
44 let iteratorKey = map.keys();
48 let iteratorValues = map.values();
52 let iteratorEntries = map.entries();
61 for (const item of map) {
66 for (const item in map) {
71 function TestForEach(value, key, map) { argument
72 flag = map.get(key) === value;
75 map.forEach(TestForEach);
79 dmap.setAll(map);
91 map["aa"] = 3;
95 res.set("test map throw error", flag);
174 res.set("test map throw error", flag);
176 function elements(value, key, map) { argument