MCPcopy Create free account
hub / github.com/block/buzz / parseTimestamp

Function parseTimestamp

desktop/src/features/agents/agentReuse.ts:26–33  ·  view source on GitHub ↗
(value: string | null | undefined)

Source from the content-addressed store, hash-verified

24}
25
26export function parseTimestamp(value: string | null | undefined) {
27 if (!value) {
28 return 0;
29 }
30
31 const timestamp = Date.parse(value);
32 return Number.isNaN(timestamp) ? 0 : timestamp;
33}
34
35export function pickPreferredManagedAgent(agents: ManagedAgent[]) {
36 return [...agents].sort((left, right) => {

Callers 2

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected