MCPcopy Create free account
hub / github.com/Noumena-Network/code / getTurndownService

Function getTurndownService

src/tools/WebFetchTool/utils.ts:95–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93type TurndownCtor = typeof import('turndown')
94let turndownServicePromise: Promise<InstanceType<TurndownCtor>> | undefined
95function getTurndownService(): Promise<InstanceType<TurndownCtor>> {
96 return (turndownServicePromise ??= import('turndown').then(m => {
97 const Turndown = (m as unknown as { default: TurndownCtor }).default
98 return new Turndown()
99 }))
100}
101
102// PSR requested limiting the length of URLs to 250 to lower the potential
103// for a data exfiltration. However, this is too restrictive for some customers'

Callers 1

getURLMarkdownContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected