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

Function saveRawData

src/pages/components/ScriptStorage/index.tsx:45–52  ·  view source on GitHub ↗
(newRawValue: { [key: string]: any })

Source from the content-addressed store, hash-verified

43
44 // 保存所有键值
45 const saveRawData = (newRawValue: { [key: string]: any }) => {
46 const keyValuePairs = [] as TKeyValuePair[];
47 for (const [key, value] of Object.entries(newRawValue)) {
48 keyValuePairs.push([key, encodeRValue(value)]);
49 }
50 valueClient.setScriptValues({ uuid: script!.uuid, keyValuePairs, isReplace: true, ts: Date.now() });
51 updateRawData(newRawValue);
52 };
53
54 // 更新UI数据
55 const updateRawData = (newRawValue: { [key: string]: any }) => {

Callers 2

clearDataFunction · 0.85
ScriptStorageFunction · 0.85

Calls 5

encodeRValueFunction · 0.90
updateRawDataFunction · 0.85
entriesMethod · 0.80
pushMethod · 0.80
setScriptValuesMethod · 0.45

Tested by

no test coverage detected