MCPcopy Index your code
hub / github.com/editablejs/editable / getStore

Function getStore

packages/editor/src/plugin/solt.ts:24–33  ·  view source on GitHub ↗
(editor: Editor)

Source from the content-addressed store, hash-verified

22>()
23
24const getStore = (editor: Editor) => {
25 let store = EDITOR_TO_SLOTS_STORE.get(editor)
26 if (!store) {
27 store = create<SlotStore<SlotComponentProps>>(() => ({
28 components: [],
29 }))
30 EDITOR_TO_SLOTS_STORE.set(editor, store)
31 }
32 return store
33}
34
35export const Slot = {
36 getStore,

Callers 3

mountFunction · 0.70
unmountFunction · 0.70
solt.tsFile · 0.70

Calls 2

getMethod · 0.80
createFunction · 0.50

Tested by

no test coverage detected