Promised version of the node.js
All non-callback-taking functions of fs are simply inherited.
$ npm install then-fs
The API for
then-fs is exactly that of the built in
fs module except that any function which normally takes a callback returns a promise instead.
return fsreadFilepath 'utf8'thenJSONparsereadJSON__dirname + '/package.json'doneconsolediroj