0.1.1 • Published 5 years ago

bignumber-currency v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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.

0.1.1

5 years ago

0.1.0

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago