MCPcopy Create free account
hub / github.com/zxlie/FeHelper / normalizeUsageData

Function normalizeUsageData

apps/background/statistics.js:42–51  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

40 };
41
42 const normalizeUsageData = (data) => {
43 if (!data || typeof data !== 'object') {
44 data = {};
45 }
46 return {
47 ...data,
48 dailyUsage: data.dailyUsage && typeof data.dailyUsage === 'object' ? data.dailyUsage : {},
49 tools: data.tools && typeof data.tools === 'object' ? data.tools : {}
50 };
51 };
52
53 /**
54 * 生成唯一的用户ID

Callers 1

loadUsageDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected