Skip to main content
Glama

MCP Server Diff TypeScript

by tatn
diffGetter.ts451 B
import { diffLines, createPatch } from 'diff'; export function generateUnifiedDiff(oldString: string, newString: string, oldHeader: string = '', newHeader: string = '', fileName: string = ''): string { const diff = diffLines(oldString, newString); if (diff.length === 1 && !diff[0].added && !diff[0].removed) { return ''; // No change detected } return createPatch(fileName, oldString, newString, oldHeader, newHeader, { context: 3 }); }

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/tatn/mcp-server-diff-typescript'

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