MCPcopy Create free account
hub / github.com/coolaj86/json2yaml / readFile

Function readFile

cli.js:48–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 function readInput(cb, filename) {
47
48 function readFile() {
49 fs.readFile(filename, 'utf8', function (err, text) {
50 if (err) {
51 console.error("[ERROR] couldn't read from '" + filename + "':");
52 console.error(err.message);
53 return;
54 }
55
56 cb(err, text);
57 });
58 }
59
60 function readStdin() {
61 var text = ''

Callers 1

readInputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected