MCPcopy Create free account
hub / github.com/Power-Playground/app / createSetVFileByStore

Function createSetVFileByStore

core/src/virtual-files.ts:118–124  ·  view source on GitHub ↗
(store: ReturnType<typeof createStore>)

Source from the content-addressed store, hash-verified

116const setVFileFuncMap = new WeakMap<ReturnType<typeof createStore>, CreateSetVFileReturn>()
117
118export const createSetVFileByStore = (store: ReturnType<typeof createStore>) => {
119 if (!setVFileFuncMap.has(store)) {
120 setVFileFuncMap
121 .set(store, createSetVFile(setVFiles => store.set(vFilesAtom, setVFiles)))
122 }
123 return setVFileFuncMap.get(store)!
124}
125
126export const vFilesAtom = atom<VFile[]>([])
127

Callers 1

index.tsxFile · 0.90

Calls 2

createSetVFileFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected