config.js 602 B

1234567891011121314151617181920212223
  1. class ConfigObject {
  2. constructor () {
  3. this.decimalPlaces = 8;
  4. this.intConvertRoundMode = 2;
  5. this.default_lang = 'pt';
  6. this.enable_type_casting = true;
  7. this.idle_input_interval = 5000;
  8. this.suspend_threshold = 100;
  9. // this.max_instruction_count = 350250; - automated evaluation limit
  10. this.max_instruction_count = Number.MAX_SAFE_INTEGER;
  11. }
  12. setConfig (opts) {
  13. for (const key in opts) {
  14. if(Object.prototype.hasOwnProperty.call(this, key)){
  15. this[key] = opts[key];
  16. }
  17. }
  18. }
  19. }
  20. const config = new ConfigObject();
  21. export const Config = config;