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

Function hasKey

packages/core/application-settings/index.ios.ts:7–13  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

5const userDefaults = NSUserDefaults.standardUserDefaults;
6
7export function hasKey(key: string): boolean {
8 if (!Common.checkKey(key)) {
9 return;
10 }
11
12 return userDefaults.objectForKey(key) !== null;
13}
14
15// utils.ios.getters
16export function getBoolean(key: string, defaultValue?: boolean): boolean {

Callers 3

getBooleanFunction · 0.70
getStringFunction · 0.70
getNumberFunction · 0.70

Calls 1

objectForKeyMethod · 0.80

Tested by

no test coverage detected