MCPcopy Index your code
hub / github.com/codemix/ts-sql / loadFile

Function loadFile

scripts/bundle.js:57–65  ·  view source on GitHub ↗

* @param {string} filename

(filename)

Source from the content-addressed store, hash-verified

55 * @param {string} filename
56 */
57function loadFile(filename) {
58 const raw = fs.readFileSync(filename, "utf-8");
59 const content = raw
60 .replace(/export\s+type/g, "type")
61 .replace(/export\s+\*\s+from\s+"(.*)";?/g, "")
62 .replace(/import\s+\{([\s\S]*)\}\s+from\s+"(.*)";?/g, "")
63 .trim();
64 return content;
65}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected