mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-10-17 14:35:56 +00:00
initial
This commit is contained in:
10
utils/json.js
Normal file
10
utils/json.js
Normal 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 };
|
Reference in New Issue
Block a user