MCPcopy Create free account
hub / github.com/Semporia/Scripts / oc

Function oc

jd_cfd.js:43–49  ·  view source on GitHub ↗
(fn, defaultVal)

Source from the content-addressed store, hash-verified

41const randomCount = $.isNode() ? 20 : 3;
42$.appId = 10032;
43function oc(fn, defaultVal) {//optioanl chaining
44 try {
45 return fn()
46 } catch (e) {
47 return undefined
48 }
49}
50function nc(val1, val2) {//nullish coalescing
51 return val1 != undefined ? val1 : val2
52}

Callers 2

getUserInfoFunction · 0.85
browserTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected