Skip to main content
Glama
strip-filename.ts253 B
/** * Removes everything after the last "/", but leaves the slash. */ export default function stripFilename(path: string | undefined | null): string { if (!path) return ''; const index = path.lastIndexOf('/'); return path.slice(0, index + 1); }

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/xtdexw/logo-mcp'

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