It's very simple. Pass in your Persian numbers to the function as a string and it will return the converted value in English numbers as number.
import ConvertNumbers from 'convert-persian-numbers'
const englishConvertedNumber = ConvertNumbers(persianNumber)