* Converts a generic hash object to a map. * @param {!Object } hash The hash object. * @return {!Map } The converted map.
(hash)
| 219 | * @return {!Map<string, ?>} The converted map. |
| 220 | */ |
| 221 | function toMap(hash) { |
| 222 | let m = new Map() |
| 223 | for (let key in hash) { |
| 224 | if (Object.prototype.hasOwnProperty.call(hash, key)) { |
| 225 | m.set(key, hash[key]) |
| 226 | } |
| 227 | } |
| 228 | return m |
| 229 | } |
| 230 | |
| 231 | /** |
| 232 | * Describes a set of capabilities for a WebDriver session. |
no test coverage detected