MCPcopy
hub / github.com/Popmotion/popmotion / get

Function get

packages/stylefire/src/styler/index.ts:34–42  ·  view source on GitHub ↗
(key: string, forceRead: boolean = false)

Source from the content-addressed store, hash-verified

32
33 const styler = {
34 get(key: string, forceRead: boolean = false) {
35 const useCached =
36 !forceRead &&
37 useCache &&
38 !uncachedValues.has(key) &&
39 state[key] !== undefined;
40
41 return useCached ? state[key] : onRead(key, props);
42 },
43 set(values: string | State, value?: any) {
44 if (typeof values === 'string') {
45 setValue(values, value);

Callers

nothing calls this directly

Calls 1

onReadFunction · 0.85

Tested by

no test coverage detected