This repository has been archived on 2025-06-06. You can view files and clone it, but cannot push or open issues or pull requests.
Currency-parser/utils/load_config.js

10 lines
No EOL
259 B
JavaScript

const fs = require('fs');
const hjson = require('hjson');
const config = () => {
if (!fs.existsSync('../config.hjson')) throw new Error('Config not found');
return hjson.parse(fs.readFileSync('../config.hjson', 'utf-8'));
}
module.exports = config;