We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JoaoPedroLanca/mcp-web-tools'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
subdomain.ts•322 B
/**
* Returns the subdomain of a hostname string
*/
export default function getSubdomain(hostname: string, domain: string): string {
// If `hostname` and `domain` are the same, then there is no sub-domain
if (domain.length === hostname.length) {
return '';
}
return hostname.slice(0, -domain.length - 1);
}