JSFiddle - React, Tailwind, and code Playground

HTML

<!--
  SO Answer by arttronic for SO Question: http://stackoverflow.com/q/13757310/1195891
-->

Eastern Arabic
<div class="EasternArabic" lang="ar">012345678901234567890123456789</div>


<br />
Persian Variant
<div class="PersianVariant" lang="fa">012345678901234567890123456789</div>


<br />
Western Arabic
<div>012345678901234567890123456789</div>


<br />
Eastern Arabic
<div class="EasternArabic" lang="ar">987654321098765432109876543210</div>


<br />
Persian Variant
<div class="PersianVariant" lang="fa">987654321098765432109876543210</div>


<br />
Western Arabic
<div>987654321098765432109876543210</div>

CSS

html {
    font-size: 30px;
}

JavaScript

$(document).ready(function() {

    // Reference Eastern Arabic      ۰   ١   ٢   ٣   ٤   ٥   ٦   ٧   ٨   ٩    
    var EA = $('.EasternArabic');

    EA.html( EA.html().replace(/0/g,'۰') );
    EA.html( EA.html().replace(/1/g,'٩') );
    EA.html( EA.html().replace(/2/g,'٨') );
    EA.html( EA.html().replace(/3/g,'٧') );
    EA.html( EA.html().replace(/4/g,'٦') );
    EA.html( EA.html().replace(/5/g,'٥') );
    EA.html( EA.html().replace(/6/g,'٤') );
    EA.html( EA.html().replace(/7/g,'٣') );
    EA.html( EA.html().replace(/8/g,'٢') );
    EA.html( EA.html().replace(/9/g,'١') );

    
    // Reference Persian Variant     ۰   ۱   ۲   ۳   ۴   ۵   ۶   ۷   ۸   ۹
    var PV = $('.PersianVariant');

    PV.html( PV.html().replace(/0/g,'۰') );
    PV.html( PV.html().replace(/1/g,'۱') );
    PV.html( PV.html().replace(/2/g,'۲') );
    PV.html( PV.html().replace(/3/g,'۳') );
    PV.html( PV.html().replace(/4/g,'۴') );
    PV.html( PV.html().replace(/5/g,'۵') );
    PV.html( PV.html().replace(/6/g,'۶') );
    PV.html( PV.html().replace(/7/g,'۷') );
    PV.html( PV.html().replace(/8/g,'۸') );
    PV.html( PV.html().replace(/9/g,'۹') );

    
});