MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / getString

Function getString

packages/core/application-settings/index.android.ts:39–48  ·  view source on GitHub ↗
(key: string, defaultValue?: string)

Source from the content-addressed store, hash-verified

37}
38
39export function getString(key: string, defaultValue?: string): string {
40 if (!verify(key)) {
41 return;
42 }
43 if (hasKey(key)) {
44 return sharedPreferences.getString(key, '');
45 }
46
47 return defaultValue;
48}
49
50export function getNumber(key: string, defaultValue?: number): number {
51 if (!verify(key)) {

Callers

nothing calls this directly

Calls 3

verifyFunction · 0.85
hasKeyFunction · 0.70
getStringMethod · 0.45

Tested by

no test coverage detected