MCPcopy Create free account
hub / github.com/dailydotdev/apps / copyStringRecord

Function copyStringRecord

packages/shared/src/components/spotlight/dispatcher.ts:43–49  ·  view source on GitHub ↗
(value: PayloadRecord)

Source from the content-addressed store, hash-verified

41};
42
43const copyStringRecord = (value: PayloadRecord): PayloadRecord | null => {
44 const keys = Reflect.ownKeys(value).filter((key) => key !== '__proto__');
45 if (keys.some((key) => typeof key !== 'string')) {
46 return null;
47 }
48 return Object.fromEntries((keys as string[]).map((key) => [key, value[key]]));
49};
50
51const isFilledString = (value: unknown): value is string =>
52 typeof value === 'string' && value.length >= 1;

Callers 1

parseOpenModalPayloadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected