MCPcopy Index your code
hub / github.com/tinyplex/tinybase / splitImports

Function splitImports

test/unit/documentation.test.ts:349–360  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

347 }));
348
349const splitImports = (source: string): [imports: string, body: string] => {
350 const lines = source.split('\n');
351 let index = 0;
352 for (; index < lines.length; index++) {
353 const line = lines[index];
354 if (line.trim() == '' || line.trim().startsWith('import ')) {
355 continue;
356 }
357 break;
358 }
359 return [lines.slice(0, index).join('\n'), lines.slice(index).join('\n')];
360};
361
362const HTML_HELPERS = `
363const VOID_ELEMENTS = new Set([

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…