Skip to main content
Glama
test-helpers.ts628 B
// Helper functions for creating test objects with duplicate keys // This is needed because TypeScript doesn't allow duplicate keys in object literals export function createObjectWithDuplicateKeys(entries: Array<[string, any]>): any { const obj: any = {}; for (const [key, value] of entries) { obj[key] = value; } return obj; } export function createDuplicateKeyObject(key: string, firstValue: any, secondValue: any, otherEntries: Array<[string, any]> = []): any { const obj: any = {}; obj[key] = firstValue; obj[key] = secondValue; for (const [k, v] of otherEntries) { obj[k] = v; } return obj; }

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/peternagy1332/json-editor-mcp'

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