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

https://github.com/hnasr/nodejshelper/blob/master/readAllText.js


Here is how to consume it

https://github.com/hnasr/nodejshelper/blob/master/index.js



No comments:

Post a Comment

Share your thoughts

Note: Only a member of this blog may post a comment.