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

Function getOrSetStore

src/persisters/persister-partykit-client/index.ts:49–56  ·  view source on GitHub ↗
(content?: Content)

Source from the content-addressed store, hash-verified

47 storePath;
48
49 const getOrSetStore = async (content?: Content): Promise<Content> =>
50 await (
51 await fetch(storeUrl, {
52 ...(content ? {method: PUT, body: jsonStringWithMap(content)} : {}),
53 mode: 'cors',
54 cache: 'no-store',
55 })
56 ).json();
57
58 const getPersisted = getOrSetStore;
59

Callers 1

setPersistedFunction · 0.85

Calls 1

jsonStringWithMapFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…