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

Function modelToCommands

javascript/selenium-webdriver/generate_bidi.mjs:789–804  ·  view source on GitHub ↗

Map model commands to the generator's command-entry shape.

(model)

Source from the content-addressed store, hash-verified

787
788/** Map model commands to the generator's command-entry shape. */
789function modelToCommands(model) {
790 const commands = []
791 for (const [domain, entry] of Object.entries(model)) {
792 for (const c of entry.commands) {
793 commands.push({
794 domain,
795 methodStr: c.method,
796 methodName: c.name,
797 paramsTypeName: c.params !== null ? normalizeDottedName(c.params) : null,
798 hasParams: c.params !== null,
799 resultTypeName: c.result !== null ? normalizeDottedName(c.result) : null,
800 })
801 }
802 }
803 return commands
804}
805
806/** Map model events to the generator's event-entry shape. */
807function modelToEvents(model) {

Callers 1

generateTypeScriptFunction · 0.85

Calls 1

normalizeDottedNameFunction · 0.85

Tested by

no test coverage detected