UNPKG

@sinch/mcp

Version:

Sinch MCP server

23 lines 993 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatUserAgent = exports.matchesAnyTag = exports.isPromptResponse = void 0; const types_1 = require("./types"); const user_agent_1 = require("./user-agent"); const isPromptResponse = (x) => { return x instanceof types_1.PromptResponse; }; exports.isPromptResponse = isPromptResponse; const matchesAnyTag = (tags, filteringTags) => { if (!filteringTags || filteringTags.length === 0) { return true; } const normalizedTags = tags.map(tag => tag.toLowerCase()); const normalizedFilteringTags = filteringTags.map(tag => tag.toLowerCase()); return normalizedTags.some(tag => normalizedFilteringTags.includes(tag)); }; exports.matchesAnyTag = matchesAnyTag; const formatUserAgent = (toolName, userId) => { return user_agent_1.USER_AGENT.replace('{toolName}', toolName).replace('{userId}', userId); }; exports.formatUserAgent = formatUserAgent; //# sourceMappingURL=utils.js.map