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

Function setString

packages/core/application-settings/index.android.ts:87–97  ·  view source on GitHub ↗
(key: string, value: string)

Source from the content-addressed store, hash-verified

85}
86
87export function setString(key: string, value: string): void {
88 if (!verify(key)) {
89 return;
90 }
91 if (!common.ensureValidValue(value, 'string')) {
92 return;
93 }
94 const editor = sharedPreferences.edit();
95 editor.putString(key, value);
96 editor.apply();
97}
98
99export function setNumber(key: string, value: number): void {
100 if (!verify(key)) {

Callers

nothing calls this directly

Calls 3

verifyFunction · 0.85
editMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected