Skip to main content
Glama
exclusionList.ts636 B
import path from 'node:path'; const escapeRegExp = (pattern: RegExp | string) => { if (Object.prototype.toString.call(pattern) === '[object RegExp]') { return (pattern as RegExp).source.replace(/\/|\\\//g, `\\${path.sep}`); } else if (typeof pattern === 'string') { var escaped = pattern.replace(/[-[\]{}()*+?.\\^$|]/g, '\\$&'); return escaped.replaceAll('/', `\\${path.sep}`); } else { throw new Error(`Unexpected exclusion pattern: ${pattern}`); } }; export const exclusionList = (additionalExclusions?: (RegExp | string)[]) => new RegExp(`(${(additionalExclusions || []).map(escapeRegExp).join('|')})$`);

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