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

Function isBareScriptCfml

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

Source from the content-addressed store, hash-verified

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

Callers 1

extractMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected