MCPcopy Create free account
hub / github.com/bywwcnll/StreamPanel / getConnectionName

Function getConnectionName

devtools/modules/connectionStorageManager.js:157–168  ·  view source on GitHub ↗
(connectionData)

Source from the content-addressed store, hash-verified

155}
156
157function getConnectionName(connectionData) {
158 if (!connectionData.createdAt) return '未命名连接';
159
160 const date = new Date(connectionData.createdAt);
161 const year = date.getFullYear();
162 const month = String(date.getMonth() + 1).padStart(2, '0');
163 const day = String(date.getDate()).padStart(2, '0');
164 const hours = String(date.getHours()).padStart(2, '0');
165 const minutes = String(date.getMinutes()).padStart(2, '0');
166 const seconds = String(date.getSeconds()).padStart(2, '0');
167 return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
168}
169
170export function getStorageStats() {
171 return {

Callers 1

saveConnectionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected