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

Function parseTimestamp

devtools/panel.bundle.js:2884–2897  ·  view source on GitHub ↗
(value, fallback)

Source from the content-addressed store, hash-verified

2882 }
2883
2884 function parseTimestamp(value, fallback) {
2885 if (typeof value === 'number' && Number.isFinite(value)) {
2886 return value;
2887 }
2888
2889 if (typeof value === 'string') {
2890 const parsed = Date.parse(value);
2891 if (Number.isFinite(parsed)) {
2892 return parsed;
2893 }
2894 }
2895
2896 return fallback;
2897 }
2898
2899 function generateImportedId(index) {
2900 return `imported-${Date.now()}-${index}-${Math.random().toString(36).slice(2, 9)}`;

Callers 2

normalizeConnectionFunction · 0.70
normalizeMessageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected