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

Function getBoolean

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

Source from the content-addressed store, hash-verified

26
27// getters
28export function getBoolean(key: string, defaultValue?: boolean): boolean {
29 if (!verify(key)) {
30 return;
31 }
32 if (hasKey(key)) {
33 return sharedPreferences.getBoolean(key, false);
34 }
35
36 return defaultValue;
37}
38
39export function getString(key: string, defaultValue?: string): string {
40 if (!verify(key)) {

Callers

nothing calls this directly

Calls 2

verifyFunction · 0.85
hasKeyFunction · 0.70

Tested by

no test coverage detected