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

Function ifPayloadValid

src/synchronizers/common.ts:31–39  ·  view source on GitHub ↗
(
  payload: string,
  then: (clientId: string, remainder: string) => void,
)

Source from the content-addressed store, hash-verified

29];
30
31export const ifPayloadValid = (
32 payload: string,
33 then: (clientId: string, remainder: string) => void,
34) => {
35 const splitAt = payload.indexOf(MESSAGE_SEPARATOR);
36 if (splitAt !== -1) {
37 then(slice(payload, 0, splitAt), slice(payload, splitAt + 1));
38 }
39};
40
41const receivePayloadRemainder = (
42 fromClientId: Id,

Callers 5

#handleMessageMethod · 0.90
index.tsFile · 0.90
getMessageHandlerFunction · 0.90
receivePayloadFunction · 0.70
createPayloadReceiverFunction · 0.70

Calls 1

sliceFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…