Skip to main content
Glama
splitTextByLine.ts243 B
export const splitTextByLines = (text: string): string[] => { const splittedText = text.match(/[^\n]*\n|[^\n]*$/g) ?? []; if (splittedText.length > 0 && splittedText.at(-1) === '') { splittedText.pop(); } return splittedText; };

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/aymericzip/intlayer'

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