Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
1
const
fs = require(
'fs'
)
2
function
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
readJSON
Function · 0.70
Tested by
no test coverage detected