ga-wdi-boston / node-api-promises

Other
0 stars 104 forks source link

Last example in "Annotate Along" missing a } #11

Closed neugierige closed 7 years ago

neugierige commented 7 years ago

code snippet should read:

const readJSON = function (filename) {
  return new Promise((resolve, reject) => {
    fs.readFile(filename, { encoding: 'utf8' }, (err, res) => {
      if (err) {
        reject(err);
      } else {
        resolve(res);
      }
    });
  })
  .then(JSON.parse)
};

@payne-chris-r