MCPcopy Index your code
hub / github.com/OpenCoworkAI/open-codesign / hasTextBabelScript

Function hasTextBabelScript

packages/runtime/src/index.ts:425–432  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

423}
424
425function hasTextBabelScript(html: string): boolean {
426 let found = false;
427 transformHtmlElementBlocks(html, 'script', ({ attrs, tag }) => {
428 if (getHtmlAttribute(attrs, 'type')?.toLowerCase() === 'text/babel') found = true;
429 return tag;
430 });
431 return found;
432}
433
434function jsxRuntimeScripts(): string {
435 return [

Callers 1

needsJsxRuntimeInHtmlFunction · 0.85

Calls 2

getHtmlAttributeFunction · 0.90

Tested by

no test coverage detected