MCPcopy Index your code
hub / github.com/tinyplex/tinybase / getEditable

Function getEditable

src/ui-svelte-inspector/editable.ts:11–26  ·  view source on GitHub ↗
(
  uniqueId: MaybeGetter<Id>,
  s: MaybeGetter<Store>,
)

Source from the content-addressed store, hash-verified

9 isFunction(value) ? value() : value;
10
11export const getEditable = (
12 uniqueId: MaybeGetter<Id>,
13 s: MaybeGetter<Store>,
14) => {
15 const editable = getCell(
16 () => STATE_TABLE,
17 () => maybeGet(uniqueId),
18 () => EDITABLE_CELL,
19 () => maybeGet(s),
20 );
21 const handleEditable = (event?: Event) => {
22 editable.current = !editable.current;
23 event?.preventDefault();
24 };
25 return [editable, handleEditable] as const;
26};

Callers

nothing calls this directly

Calls 2

getCellFunction · 0.90
maybeGetFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…