UNPKG

readutf

Version:

A thin wrapper around fs.readFile that automatically sets the encoding to utf8 on your behest

10 lines (7 loc) 213 B
var fs = require('fs'); exports.readFile = function(file, cb) { fs.readFile(file, { encoding: 'utf8' }, cb); }; exports.readFileSync = function(file) { return fs.readFileSync(file, { encoding: 'utf8' }); };