https://persian-tools.github.io/react-persian-tools/
npm install --save react-persian-tools
import React, { Component } from 'react'
import PersianTools from 'react-persian-tools'
class Example extends Component {
render() {
return (
<>
<PersianTools.WordsToNumber>منفی سه هزارمین</PersianTools.WordsToNumber>
<PersianTools.WordsToNumber fuzzy>یگصد و بنجاه هزار</PersianTools.WordsToNumber>
<PersianTools.NumberToWords>500,443</PersianTools.NumberToWords>
<PersianTools.NumberToWords ordinal>500,443</PersianTools.NumberToWords>
<PersianTools.AddCommas>30000000</PersianTools.AddCommas>
<PersianTools.RemoveCommas>30,000,000</PersianTools.RemoveCommas>
<PersianTools.DigitsArToEn>٠١٢٣٤٥٦٧٨٩</PersianTools.DigitsArToEn>
<PersianTools.DigitsArToFa>٠١٢٣٤٥٦٧٨٩</PersianTools.DigitsArToFa>
<PersianTools.DigitsEnToFa>123۴۵۶</PersianTools.DigitsEnToFa>
<PersianTools.DigitsFaToEn>123۴۵۶</PersianTools.DigitsFaToEn>
</>
)
}
}
Thank you for your interest in contributing! Please feel free to put up a PR for any issue or feature request.
This project is licensed under the MIT License - see the LICENSE.md file for details.