Answers for "node js reuire json shows onject"

0

node js reuire json shows onject

var readJson = (path, cb) => {
  fs.readFile(require.resolve(path), (err, data) => {
    if (err)
      cb(err)
    else
      cb(null, JSON.parse(data))
  })
}
Posted by: Guest on December-09-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language