Skip to main content
Glama
diffAwsMap.ts606 B
async function diff(input: Input): Promise<Output> { const normalizedResponse = { diff: true, newValue: input.second.reduce((acc, { Key, Value }) => ({ ...acc, [Key]: Value }), {}), }; if (Object.values(input.first).length !== input.second.length) { return normalizedResponse; } const keys = new Set(Object.keys(input.first)); for (const row of input.second) { if (input.first[row.Key] !== row.Value) { return normalizedResponse; } keys.delete(row.Key); } if (keys.size !== 0) { return normalizedResponse; } else { return { diff: false }; } }

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/systeminit/si'

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