2019-01-19 21:41:54 +01:00
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
const fs = require('fs');
|
|
|
|
function read(url) {
|
|
|
|
return new Promise((resolve, reject) => {
|
2019-01-20 11:40:25 +01:00
|
|
|
fs.readFile(`${__dirname}/${url}`, "utf8", (err, data) => {
|
2019-01-19 21:41:54 +01:00
|
|
|
if (err)
|
|
|
|
reject(err);
|
|
|
|
resolve(data);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
exports.read = read;
|