Friday, January 12, 2018

readAllText on Nodejs with Promise

Coming from .NET background and recently started working with Javascript and Nodejs I really miss the File.IO.readAllText in .NET  I find it really useful when reading small texts. The fs module in Nodejs is OK but I couldn't find a promise version of the fs so I wrote a quick boiler plate. Been a while since I posted any code in this blog. Here goes

Code here

Here is how to consume it