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

Function stringValue

packages/nativescript-inspector/src/index.ts:1992–2001  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

1990}
1991
1992function stringValue(value: unknown): string {
1993 if (value == null) {
1994 return "";
1995 }
1996 try {
1997 return String(value);
1998 } catch {
1999 return typeof value === "object" ? constructorName(value) : "";
2000 }
2001}
2002
2003function numberValue(value: unknown, fallback = 0): number {
2004 return typeof value === "number" && Number.isFinite(value) ? value : fallback;

Callers 15

getAttributeFunction · 0.85
setAttributeFunction · 0.85
infoMethod · 0.85
performMethod · 0.85
nativeScriptNodeMethod · 0.85
uikitNodeMethod · 0.85
snapshotMetadataMethod · 0.85
nativeScriptTabItemsFunction · 0.85
sourceLocationFromNodeFunction · 0.85

Calls 1

constructorNameFunction · 0.85

Tested by

no test coverage detected