MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isBareScriptCfml

Function isBareScriptCfml

src/extraction/cfml-extractor.ts:476–494  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

474 * start with `<`, script-based files don't.
475 */
476export function isBareScriptCfml(source: string): boolean {
477 let i = 0;
478 const len = source.length;
479 while (i < len) {
480 const ch = source[i];
481 if (ch === ' ' || ch === '\t' || ch === '\n' || ch === '\r' || ch === '\uFEFF') {
482 i++;
483 } else if (ch === '/' && source[i + 1] === '/') {
484 const nl = source.indexOf('\n', i);
485 i = nl === -1 ? len : nl + 1;
486 } else if (ch === '/' && source[i + 1] === '*') {
487 const end = source.indexOf('*/', i + 2);
488 i = end === -1 ? len : end + 2;
489 } else {
490 return ch !== '<';
491 }
492 }
493 return true; // empty/whitespace-only file — treat as script (no-op extraction either way)
494}

Callers 1

extractMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected