var reader = require('any-text'); reader.getText(`path-to-file`).then(function (data) { console.log(data); });