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

Function getAttribute

packages/nativescript-inspector/src/index.ts:132–140  ·  view source on GitHub ↗
(this: any, name: string)

Source from the content-addressed store, hash-verified

130 );
131 },
132 getAttribute(this: any, name: string): string | null {
133 try {
134 const attributes = debugAttributeStore(this);
135 if (attributes.has(name)) return attributes.get(name) ?? null;
136 } catch {
137 // see above
138 }
139 return safeCall(() => stringValue(this[name]) || null, null);
140 },
141 setAttribute(this: any, name: string, value: unknown): void {
142 safeCall(() => {
143 debugAttributeStore(this).set(name, stringValue(value));

Callers

nothing calls this directly

Calls 4

debugAttributeStoreFunction · 0.85
safeCallFunction · 0.85
stringValueFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected