config.js 399 B

1234567891011121314151617181920
  1. let config = null;
  2. export class Config {
  3. static get config () {
  4. return config;
  5. }
  6. static setConfig(opts) {
  7. config = Object.assign(config, opts);
  8. }
  9. constructor (loopTimeout, decimalPlaces, intConvertRoundMode) {
  10. this.loopTimeout = loopTimeout;
  11. this.decimalPlaces = decimalPlaces;
  12. this.intConvertRoundMode = intConvertRoundMode;
  13. }
  14. }
  15. config = new Config(5000, 5, 2);