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

Function className

packages/nativescript-inspector/src/index.ts:1944–1954  ·  view source on GitHub ↗
(object: any)

Source from the content-addressed store, hash-verified

1942}
1943
1944function className(object: any): string {
1945 const name = safeCall(() => {
1946 const klass =
1947 typeof object?.class === "function" ? object.class() : object?.class;
1948 return klass ? NSStringFromClass(klass) : constructorName(object);
1949 }, constructorName(object));
1950 if (name !== "UIView" && name !== "NSObject" && name !== "Object") {
1951 return name;
1952 }
1953 return debugClassName(object) || name;
1954}
1955
1956function debugClassName(object: any): string {
1957 const description = stringValue(object);

Callers 7

getPropertiesMethod · 0.85
evaluateScriptMethod · 0.85
nativeScriptNodeMethod · 0.85
findUIKitTabAccessoryMethod · 0.85
uikitNodeMethod · 0.85
nativeMethodFunction · 0.85

Calls 3

safeCallFunction · 0.85
constructorNameFunction · 0.85
debugClassNameFunction · 0.85

Tested by

no test coverage detected