Skip to main content
Glama
splitTextByLine.test.ts511 B
import { describe, expect, it } from 'vitest'; import { splitTextByLines } from './splitTextByLine'; describe('splitTextByLines', () => { it('splits text by lines', () => { const lines = splitTextByLines('Here a test. \nAnd another one.'); expect(lines).toStrictEqual(['Here a test. \n', 'And another one.']); }); it('splits text by lines with no trailing newline', () => { const lines = splitTextByLines('Here a test. \n'); expect(lines).toStrictEqual(['Here a test. \n']); }); });

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