2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-10-17 14:35:56 +00:00
This commit is contained in:
Thomas Rory Gummerson
2017-07-24 12:44:28 +02:00
commit 57baf97cae
5 changed files with 84 additions and 0 deletions

10
utils/json.js Normal file
View File

@@ -0,0 +1,10 @@
'use strict';
const { readFileSync, writeFileSync } = require('fs');
const loadJSON = file => JSON.parse(readFileSync(file, 'utf8'));
const saveJSON = (file, data) => writeFileSync(file,
JSON.stringify(data, undefined, '\t'));
module.exports = { loadJSON, saveJSON };