@persian-tools/react-persian-tools
v0.3.2
Published
React wrapper component around persian tools
Downloads
20
Maintainers
Readme
Demo
https://persian-tools.github.io/react-persian-tools/
Install
npm install --save react-persian-tools
Usage
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>
</>
)
}
}
Contributing
Thank you for your interest in contributing! Please feel free to put up a PR for any issue or feature request.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.