code: function toPersianNumber(number) {
    // List of standard persian numbers from 0 to 9
    const persianDigits = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
  
    return number
      .toString()
      .replace(/\d/g, x => persianDigits[x]);
  }
docs: As persian language has different number symbols we need to replace regular numbers to standard persian numbres.