Skip to content

mavihq/prial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

prial

currency formating library for javascript based on rialjs by saeid habibpour.

installation

npm

npm install prial --save

yarn

yarn add prial

api

Rial

import { Rial } from 'prial'
//or es5 model
const Rial = require('prial').Rial

const rial = new Rial({
	decimal : ",",
	alphabet : "fa",
	currency : "هزار ریال",
	cut : 3,
});

rial.get("425420000000");
// ۴۲۵,۴۲۰,۰۰۰ هزار ریال

rial.Alphabet("en").Currency("ریال").Cut(0).get("425420000000");
// 425,420,000,000 ریال

rial.Decimal(".").Alphabet("en").Currency("").Cut(0).get("۴۲۵,۴۲۰,۰۰۰");
// 425.420.000

formatToman

import { formatTooman } from 'prial'
//or es5 model
const formatToman = require('prial').formatToman

formatToman('123456')
// 123,456 تومان

About

currency formating library for javascript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published