1.0.0 • Published 9 years ago
persian-digit-to-character v1.0.0
Persian-Digit-to-Character
Convert persian digits to their corresponding characters.
There may be cases in which having filters on integers and digits in projects can be really handy.
This minimal package helps you take the hassle of converting away and simply use your filter considering the fact that working on persian stuff on web is a challenge.
Using inside NodeJS Environment
- Install via npm using
npm install persian-digit-to-characterinside your command line. - Import the package inside your module using
import numberToPerisanCharacter from 'persian-digit-to-character' - You could now use the converter by passing the number to the
numberToPerisanCharacterfunction.
import numberToPerisanCharacter from 'persian-digit-to-character'
let myConvertedNumber = numberToPerisanCharacter(123456)
/* will output __صد و بیست و سه هزار و چهارصد و پنجاه و شش__*/Using via HTML file (Global Script Tag)
- Simply clone this project or download it manually.
- Copy the
convert.jsfile from the package into your project directory. - Use
numberToPerisanCharacterfunction inside your project.
This package is MIT licensed. Feel free to use it and will be happy to see your support via stars.
1.0.0
9 years ago