Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prial

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prial

currency formating library for javascript.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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 تومان

Keywords

FAQs

Package last updated on 31 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc