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

Function isBareScriptCfml

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

Source from the content-addressed store, hash-verified

818 * start with `<`, script-based files don't.
819 */
820export function isBareScriptCfml(source: string): boolean {
821 let i = 0;
822 const len = source.length;
823 while (i < len) {
824 const ch = source[i];
825 if (ch === ' ' || ch === '\t' || ch === '\n' || ch === '\r' || ch === '\uFEFF') {
826 i++;
827 } else if (ch === '/' && source[i + 1] === '/') {
828 const nl = source.indexOf('\n', i);
829 i = nl === -1 ? len : nl + 1;
830 } else if (ch === '/' && source[i + 1] === '*') {
831 const end = source.indexOf('*/', i + 2);
832 i = end === -1 ? len : end + 2;
833 } else {
834 return ch !== '<';
835 }
836 }
837 return true; // empty/whitespace-only file — treat as script (no-op extraction either way)
838}

Callers 1

extractMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected