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

Function isBareScriptCfml

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

Source from the content-addressed store, hash-verified

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

Callers 1

extractMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected