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

Method get

packages/editor-core/src/utils/preference.ts:28–37  ·  view source on GitHub ↗
(key: string, module: string)

Source from the content-addressed store, hash-verified

26 }
27
28 get(key: string, module: string): any {
29 if (!key || typeof key !== 'string' || key.length === 0) {
30 logger.error('Invalid key when getting from preference', key);
31 return;
32 }
33 const storageKey = this.getStorageKey(key, module);
34 const result = store.get(storageKey);
35 logger.debug('storageKey:', storageKey, 'get with result:', result);
36 return result;
37 }
38
39 /**
40 * check if local storage contain certain key

Callers

nothing calls this directly

Calls 4

getStorageKeyMethod · 0.95
errorMethod · 0.65
getMethod · 0.65
debugMethod · 0.65

Tested by

no test coverage detected