New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-android-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-android-currency-formatter

React Native Android Currency Formatter. Native Module for a currency format with specified FORMAT locale.

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

React Native Android Currency Formatter Twitter URL

MIT Licence npm version

Native Module for a currency format with specified FORMAT locale.

Installation

npm
npm install --save react-native-android-currency-formatter
yarn
yarn add react-native-android-currency-formatter --save

For iOS use Internationalization API

Usage

Read before use Synchronous Method

import AndroidCurrencyFormatter from 'react-native-android-currency-formatter';

// Synchronous Method
AndroidCurrencyFormatter.numberFormat(30000, 'USD', 'en', 'US'); // $30,000.00

// Asynchronous Method
AndroidCurrencyFormatter
	.numberFormatAsync(1000000.25, 'USD', 'en', 'US')
	.then(data => {
		// $1,000,000.25
	});

API

// Synchronous Method
// Returns currency format or 'N/A' if one of the arguments are not correct
numberFormat(amount, currencyCode, language, country)

// Asynchronous Method
// Returns Promise with currency format or 'N/A' if one of the arguments are not correct
numberFormatAsync(amount, currencyCode, language, country)

amount

Type: Number
the number which will be converted to currency

currencyCode

Type: String
ISO 4217 currency code. Some codes

language

Type: String
An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length.

country

Type: String
An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code.

Check example/src/App.tsx file if you need more details.

Contributing

Any contributions you make are greatly appreciated.

Please read the Contributions Guidelines to learn how to contribute to the repository and the development workflow.

License

MIT © Vasyl Stokolosa

Keywords

FAQs

Package last updated on 22 Sep 2021

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