MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / loadFile

Function loadFile

modules/material-parser/src/utils.ts:113–119  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

111}
112
113export function loadFile(filePath: string): string {
114 const content: string | Buffer = readFileSync(filePath);
115 if (typeof content === 'string') {
116 return content;
117 }
118 return content.toString();
119}
120
121export function isPrimitive(val) {
122 return !['object', 'function'].includes(typeof val) || val === null;

Callers 3

generateDTSFunction · 0.90
parseFunction · 0.90
resolvePkgJsonFunction · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…