MCPcopy Create free account
hub / github.com/scriptscat/scriptcat / getBatchUpdateRecord

Function getBatchUpdateRecord

src/pages/batchupdate/App.tsx:67–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65 }, [mTimeClose]);
66
67 const getBatchUpdateRecord = async (): Promise<TBatchUpdateRecordObject | null> => {
68 let resultText = "";
69 let r;
70 let i = 0;
71 while (true) {
72 r = await scriptClient.getBatchUpdateRecordLite(i++);
73 if (!r) break;
74 const chunk = r.chunk;
75 if (typeof chunk !== "string") break;
76 resultText += chunk;
77 if (r.ended) break;
78 }
79 return resultText ? JSON.parse(resultText) : null;
80 };
81
82 const updateRecord = () => {
83 getBatchUpdateRecord().then((batchUpdateRecordObjectLite) => {

Callers 1

updateRecordFunction · 0.85

Calls 2

parseMethod · 0.45

Tested by

no test coverage detected