3 var fs = require('fs');
5 module.exports = function (filepath, options) {
6 options = options || {};
7 options.throwNotFound = options.throwNotFound || false;
9 return new Promise(function (resolve, reject) {
10 fs.readFile(filepath, 'utf8', function (err, content) {
11 if (err && err.code === 'ENOENT' && !options.throwNotFound) {
15 if (err) return reject(err);