MCPcopy Create free account
hub / github.com/azat-co/practicalnode / readJSON.js

File readJSON.js

code/ch14/promise/readJSON.js:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1const fs = require('fs')
2function readJSON(filename, enc='utf8'){
3 return new Promise(function (resolve, reject){
4 fs.readFile(filename, enc, function (err, res){

Callers

nothing calls this directly

Calls 1

readJSONFunction · 0.70

Tested by

no test coverage detected