simple promisfy for readfile
npm install promisfy-readfile
'use strict';
const readFile = require('promisfy-readfile');
let genera = async ()=>{
let da = await readFile(file);
return da;
};
genera().then(res=>{
console.log(res)//buffer type
}).catch(err=>{
throw err
});
If you have any question,please click issues
MIT