Add keys generation and code optimization

This commit is contained in:
Vladislav Hristov
2018-06-27 14:21:49 +03:00
parent c0ec4b8fb7
commit 9cfed8ec81
4 changed files with 37 additions and 21 deletions

View File

@@ -14,14 +14,6 @@ module.exports = (pathToFile) => {
write(data) {
fs.writeFileSync(path, data, { encoding: 'utf8' });
return this;
},
hasData() {
if (fs.existsSync(path))
return this.read() !== '';
return false;
},
};
};