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

Function readJson

javascript/selenium-webdriver/generate_bidi.mjs:271–278  ·  view source on GitHub ↗
(fileArg, label)

Source from the content-addressed store, hash-verified

269}
270
271function readJson(fileArg, label) {
272 const path = resolveInputPath(fileArg)
273 if (!existsSync(path)) {
274 console.error(`Error: ${label} file not found: ${path}`)
275 process.exit(1)
276 }
277 return JSON.parse(readFileSync(path, 'utf8'))
278}
279
280function writeJson(fileArg, data, label, pretty = false) {
281 const out = resolve(fileArg)

Callers 1

mainFunction · 0.85

Calls 3

resolveInputPathFunction · 0.85
errorMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected