wehelpjs
Version:
wehelpjs is the JavaScript API Library for the WeYouMe blockchain
31 lines (22 loc) • 523 B
JavaScript
;
var each = require('lodash/each');
const defaultConfig = require('../config.json');
class Config {
constructor(c) {
each(c, (value, key) => {
this[key] = value;
});
}
get(k) {
return this[k];
}
set(k, v) {
this[k] = v;
}
}
var configReady;
module.exports = configReady = new Config(defaultConfig);
if (typeof module.exports.Config !== 'undefined') {
throw new Error("default config.json file may not contain a property 'Config'");
}
module.exports.Config = Config;