Commit e2edb915 authored by David Votrubec's avatar David Votrubec

Added comment about the MZ package

parent 5a1c9988
......@@ -5,10 +5,13 @@ const thunkify = require('./thunkify');
const fs = require('fs');
const readFile = thunkify(fs.readFile);
// The alternative solution to thunkifying is the 'mz' npm package https://www.npmjs.com/package/mz
// It modernizes nodejs API by wrapping its core functions into promises
// making them thenable
run(function* () {
try {
const fileContent = yield readFile('./es6/blabla.json')
const fileContent = yield readFile('./es6/blabla.json');
console.log(fileContent);
}
catch (er) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment