MCPcopy Create free account
hub / github.com/editablejs/editable / getStore

Function getStore

packages/plugins/link/src/store/index.ts:11–20  ·  view source on GitHub ↗
(editor: Editable)

Source from the content-addressed store, hash-verified

9const EDITOR_TO_LINK_STORE = new WeakMap<Editable, UseBoundStore<StoreApi<LinkStore>>>()
10
11const getStore = (editor: Editable) => {
12 let store = EDITOR_TO_LINK_STORE.get(editor)
13 if (!store) {
14 store = create<LinkStore>(() => ({
15 open: false,
16 }))
17 EDITOR_TO_LINK_STORE.set(editor, store)
18 }
19 return store
20}
21
22export const LinkStore = {
23 open: (editor: Editable) => {

Callers 2

index.tsFile · 0.70
useLinkStoreFunction · 0.70

Calls 2

getMethod · 0.80
createFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…