MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / stripHTMLFromToolInput

Function stripHTMLFromToolInput

packages/components/src/utils.ts:1508–1514  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

1506}
1507
1508export const stripHTMLFromToolInput = (input: string) => {
1509 const turndownService = new TurndownService()
1510 let cleanedInput = turndownService.turndown(input)
1511 // After conversion, replace any escaped underscores and square brackets with regular unescaped ones
1512 cleanedInput = cleanedInput.replace(/\\([_[\]])/g, '$1')
1513 return cleanedInput
1514}
1515
1516// Regex constants exported for testability
1517export const COMMONJS_REQUIRE_REGEX = /^(const|let|var)\s+\S[^=]*=\s*require\s*\(/

Callers 4

initMethod · 0.90
initMethod · 0.90
initMethod · 0.90
initMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected