harvest-overtime
Version:
Track the overtime!
17 lines (16 loc) • 551 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.write = exports.read = void 0;
const Promise = require("bluebird");
const fs = require("fs");
const DEFAULT_ENCODING = "utf8";
const readFileAsync = Promise.promisify(fs.readFile);
const writeFileAsync = Promise.promisify(fs.writeFile);
function read(filePath) {
return readFileAsync(filePath, DEFAULT_ENCODING);
}
exports.read = read;
function write(filePath, data) {
writeFileAsync(filePath, data, { encoding: DEFAULT_ENCODING });
}
exports.write = write;