MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / get

Function get

packages/core/utils/platform-check.ts:9–20  ·  view source on GitHub ↗
(_, prop)

Source from the content-addressed store, hash-verified

7 {},
8 {
9 get(_, prop) {
10 const propPretty = [parent, prop.toString()].join('.');
11 const hintPlatformCheck = __ANDROID__ ? '__IOS__' : '__ANDROID__';
12
13 // prettier-ignore
14 const errorMsg = [
15 `Trying to access "${propPretty}" without checking platform first.`,
16 `Hint: Use "${hintPlatformCheck}" to check platform before accessing "${propPretty}".`
17 ].join('\n');
18
19 throw new Error(errorMsg);
20 },
21 },
22 );
23 }

Callers

nothing calls this directly

Calls 2

joinMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected