mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
15 lines
267 B
JavaScript
15 lines
267 B
JavaScript
const fs = require('fs');
|
|
const {promisify} = require('bluebird');
|
|
|
|
const methods = [
|
|
'readFile',
|
|
'writeFile',
|
|
'readFileSync',
|
|
'writeFileSync'
|
|
];
|
|
|
|
module.exports = methods.reduce((obj, method) => {
|
|
obj[method] = promisify(fs[method]);
|
|
return obj;
|
|
}, {});
|