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

Function getBoolean

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

Source from the content-addressed store, hash-verified

14
15// utils.ios.getters
16export function getBoolean(key: string, defaultValue?: boolean): boolean {
17 if (!Common.checkKey(key)) {
18 return;
19 }
20 if (hasKey(key)) {
21 return userDefaults.boolForKey(key);
22 }
23
24 return defaultValue;
25}
26
27export function getString(key: string, defaultValue?: string): string {
28 if (!Common.checkKey(key)) {

Callers

nothing calls this directly

Calls 1

hasKeyFunction · 0.70

Tested by

no test coverage detected