config.js 441 B

123456789101112131415161718192021
  1. class ConfigObject {
  2. constructor () {
  3. this.loopTimeout = 5000;
  4. this.decimalPlaces = 8;
  5. this.intConvertRoundMode = 2;
  6. this.default_lang = 'pt';
  7. this.enable_type_casting = true;
  8. this.idle_input_interval = 5000;
  9. }
  10. setConfig (opts) {
  11. for (const key in opts) {
  12. if(this.hasOwnProperty(key)){
  13. this[key] = opts[key];
  14. }
  15. }
  16. }
  17. }
  18. let config = new ConfigObject();
  19. export const Config = config;