code: function(nStr, thousandsSep, decimalSep) {
    const x = String(nStr).split('.');
    let x1 = x[0];
    const x2 = x.length > 1 ? decimalSep + x[1] : '';
    const rgx = /(\d+)(\d{3})/;
    while (rgx.test(x1)) {
      x1 = x1.replace(rgx, `$1${thousandsSep}$2`);
    }
    return x1 + x2;
  }
docs: /*
  decaffeinate suggestions:
  DS101: Remove unnecessary use of Array.from
  DS102: Remove unnecessary code created because of implicit returns
  DS104: Avoid inline assignments
  DS201: Simplify complex destructure assignments
  DS203: Remove `|| {}` from converted for-own loops
  DS205: Consider reworking code to avoid use of IIFEs
  DS207: Consider shorter variations of null checks
  Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md