2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-09-05 08:35:22 +00:00
Files
the-guard-bot/utils/json.js
Thomas Rory Gummerson 086a13948f Fixes
2017-07-24 17:12:38 +02:00

11 lines
268 B
JavaScript

'use strict';
const { readFileSync, writeFileSync } = require('fs');
const loadJSON = file => JSON.parse(readFileSync(file, 'utf8'));
const saveJSON = (file, data) => writeFileSync(file,
JSON.stringify(data, null, '\t'));
module.exports = { loadJSON, saveJSON };