MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / toMap

Function toMap

javascript/selenium-webdriver/lib/capabilities.js:221–229  ·  view source on GitHub ↗

* Converts a generic hash object to a map. * @param {!Object } hash The hash object. * @return {!Map } The converted map.

(hash)

Source from the content-addressed store, hash-verified

219 * @return {!Map<string, ?>} The converted map.
220 */
221function 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.

Callers 2

constructorMethod · 0.85
mergeMethod · 0.85

Calls 2

callMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected