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

react-native-currency-formatter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-currency-formatter

Currency Formatter Rupiah Indonesia and US Dollar

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
Maintainers
1
Weekly downloads
 
Created
Source

react-native-currency-formatter

Javascript - React Native

Currency Formatter Rupiah Indonesia and US Dollar


This is the JavaScript widget used only IDR and USD, you can change according to your needs. If you use for IDR, the value or price is automatically round a number upward to its nearest integer:

This widget has implemented in React Native version 0.53.0.

HOW TO USE

Installation

npm i react-native-currency-formatter

Configuration

Config the currency

const currencyCode = 'IDR '; // IDR or USD
const currencyPosition = 'left' // left or right
const maxFractionDigits = 2;
const decimalSeparator = ',';
const thousandSeparator = '.'; 
Usage
  • Create file CurrencyFormatter in your folder project.
  • import in your components import CurrencyFormatter from '_YOUR_ROOT_FILE/CurrencyFormatter';
  • call the formatter ${ CurrencyFormatter(value_of_price) }

EXAMPLE

For IDR (Indonesian Rupiah)
  • ${ CurrencyFormatter(1234511) }
  • Result IDR 1.234.511
For US Dollar
  • ${ CurrencyFormatter(1234511.47) }
  • Result IDR 1,234,511.47

Keywords

FAQs

Package last updated on 18 Sep 2018

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