MCPcopy Create free account
hub / github.com/AidasPa/uts / readCode

Function readCode

utils.js:4–7  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

2
3module.exports = {
4 async readCode(file) {
5 const data = await fs.readFile(file, 'utf-8');
6 return data;
7 },
8 writeCode(file, data) {
9 const target = file.split('.')[0];
10 fs.writeFile(`${target}.js`, data, 'utf-8');

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected