[–] vnglst 10y ago ↗ Nice writeup, thanks for sharing!I think .then((path) => { return fs.readFileAsync(path) }) should be written as.then(fs.readFileAsync). Wrapping a function in an anonymous function doesn't really add anything - even with nice arrow notation ;-).Dr. Boolean wrote a nice piece on this practice in Javascript: https://drboolean.gitbooks.io/mostly-adequate-guide/content/...
1 comment
[ 2.2 ms ] story [ 9.0 ms ] threadI think .then((path) => { return fs.readFileAsync(path) }) should be written as.then(fs.readFileAsync). Wrapping a function in an anonymous function doesn't really add anything - even with nice arrow notation ;-).
Dr. Boolean wrote a nice piece on this practice in Javascript: https://drboolean.gitbooks.io/mostly-adequate-guide/content/...