MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / safeCall

Function safeCall

packages/nativescript-inspector/src/index.ts:1838–1844  ·  view source on GitHub ↗
(work: () => T, fallback: T)

Source from the content-addressed store, hash-verified

1836}
1837
1838function safeCall<T>(work: () => T, fallback: T): T {
1839 try {
1840 return work();
1841 } catch {
1842 return fallback;
1843 }
1844}
1845
1846function evaluateUIKitScript(view: any, script: string): unknown {
1847 const trimmed = script.trim();

Callers 15

hasAttributeFunction · 0.85
getAttributeFunction · 0.85
setAttributeFunction · 0.85
removeAttributeFunction · 0.85
applyToPrototypeFunction · 0.85
infoMethod · 0.85
hierarchyMethod · 0.85
nativeScriptNodeMethod · 0.85
indexNativeScriptViewMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected