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

Function quote

javascript/atoms/typescript/testing/accessibility-text.ts:36–38  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

34const STATE_ORDER: ReadonlyArray<string> = ['checked', 'pressed', 'expanded', 'selected', 'level', 'disabled', 'focused']
35
36function quote(name: string): string {
37 return '"' + name.replace(/\\/g, '\\\\').replace(/"/g, '\\"') + '"'
38}
39
40function oneLine(value: string): string {
41 return value.replace(/\\/g, '\\\\').replace(/\r/g, '\\r').replace(/\n/g, '\\n')

Callers 1

lineFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected