Socket
Socket
Sign inDemoInstall

bignumber-currency

Package Overview
Dependencies
6
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bignumber-currency

An Angular pipe for handling currencies with big numbers. Derived from Angular currency pipe.


Version published
Weekly downloads
5
Maintainers
1
Install size
338 kB
Created
Weekly downloads
 

Readme

Source

BigNumberCurrency

Purpose

Originally Angular CurrencyPipe does not let you use big numbers, they rely on JavaScript number precision. This Angular library solves that issue.

Usage

After installing with

npm i bignumber-currency

import the module in your AppModule

@NgModule({
	declarations: [
		AppComponent
	],
	imports: [
		BigNumberCurrencyModule
	],
	bootstrap: [AppComponent]
})
export class AppModule {
}

then you can use it as if using CurrencyPipe, but instead of | currency use | bigNumberCurrency the difference is that you can pass a BigNumber as input (or anything else originally supported of course). See tests for examples.

The package uses bignumber.js, so you can fine-tune precision with BigNumber's properties and config.

Keywords

FAQs

Last updated on 22 Sep 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc