to-persian-letter-currency
v0.0.13
Published
Easily convert numbers to persian currency (toman & rial)
Downloads
51
Maintainers
Readme
to persian letter currency
to-persian-letter-currency is an npm package that converts numeric currency values to their equivalent Persian text. It simplifies the process of displaying Persian letter currency in applications, ensuring proper localization and readability.
Table of Contents
Installation
Install with npm:
npm install to-persian-letter-currency
Install with yarn:
yarn add to-persian-letter-currency
Usage
Here is a basic example of how to use the package:
import { toPersianAlphabetic } from 'to-persian-letter-currency';
const number = 123456;
const persianCurrency = toPersianAlphabetic(number);
console.log(persianCurrency); // Output: دوازده هزار و سیصد و چهل و پنج تومان و شش ریال
console.log(toPersianNumberic(234568999998)); // Output: 234 میلیارد و 568 میلیون و 999 هزار و 999 تومان و 8 ریال
api
toPersianAlphabetic(number)
number: number - The numeric value to be converted to Persian letter currency.
for big int numbers the input number must be string
returns: string - The equivalent Persian letter currency.
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
License
This project is licensed under the ISC License.