MCPcopy Create free account
hub / github.com/alibaba/lowcode-engine / set

Method set

packages/editor-core/src/utils/preference.ts:18–26  ·  view source on GitHub ↗
(key: string, value: any, module?: string)

Source from the content-addressed store, hash-verified

16 }
17
18 set(key: string, value: any, module?: string): void {
19 if (!key || typeof key !== 'string' || key.length === 0) {
20 logger.error('Invalid key when setting preference', key);
21 return;
22 }
23 const storageKey = this.getStorageKey(key, module);
24 logger.debug('storageKey:', storageKey, 'set with value:', value);
25 store.set(storageKey, value);
26 }
27
28 get(key: string, module: string): any {
29 if (!key || typeof key !== 'string' || key.length === 0) {

Callers

nothing calls this directly

Calls 4

getStorageKeyMethod · 0.95
errorMethod · 0.65
debugMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected