It only replaces the numbers in the passed string with the numbers of the selected language.
To use the converter lang :
import { englishToPersian , persianToEnglish } from "lang-number-converter"
console.log(englishToPersian("Tom327EI"))
// output => "Tom۳۲۷EI"
console.log(persianToEnglish("۳۲۷E I50۲"))
// output => "327E I502"
import { splitPrice } from "lang-number-converter"
console.log(splitPrice("2000000"))
// output => "2,000,000"
console.log(splitPrice("۳۲۷۳۲۲۳۲"))
// output => "32,732,232"
to install, use this command :
npm install lang-number-converter