MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / tryOrDefault

Function tryOrDefault

lib/utils.js:440–446  ·  view source on GitHub ↗
(fn, defaultValue)

Source from the content-addressed store, hash-verified

438}
439
440export const tryOrDefault = function (fn, defaultValue) {
441 try {
442 return fn()
443 } catch (_) {
444 return defaultValue
445 }
446}
447
448function normalizeKeyReplacer(match, prefix, key, suffix, offset, string) {
449 if (typeof key !== 'string') {

Callers 2

run-workers.jsFile · 0.90
runTests.jsFile · 0.85

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected