Skip to main content
Glama
datetime-utils.ts741 B
/** * Neo4j DateTime Utilities * Single responsibility: Handle Neo4j DateTime conversions */ export const convertDateTimeToString = (datetime: any): string => { if (!datetime) return ''; if (typeof datetime === 'string') return datetime; if (datetime.toString) return datetime.toString(); return String(datetime); }; export const detectIdFormat = (id: string): 'uuid' | 'compact' | 'unknown' => { if (!id) return 'unknown'; // Test for UUID format const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; if (uuidRegex.test(id)) return 'uuid'; // Test for compact ID format - simplified check if (id.length === 18 && /^[!-~]+$/.test(id)) return 'compact'; return 'unknown'; };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sylweriusz/mcp-neo4j-memory-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server