1.0.1 • Published 5 years ago
@easymoney/crypto-formatter v1.0.1
@easymoney/crypto-formatter
]david-crypto-formatter
]pho-crypto-formatter
Install
npm install @easymoney/crypto-formatter
or
yarn add @easymoney/crypto-formatter
or
CDN
Usage
import {createMoneyCryptoFormatter} from "@easymoney/crypto-formatter"
import { createMoney } from '@easymoney/money';
import {cryptoCurrenciesMap} from "@easymoney/currencies"
const money = createMoney({amount: 5, currency: "LTC" });
const formatted = createMoneyCryptoFormatter().format(money);
// => "0.00000005LTC"
const money1 = createMoney({amount: 50, currency: cryptoCurrenciesMap.ETH });
const formatted1 = createMoneyCryptoFormatter().format(money);
// => "0.000000000000000005ETH"
const money = { amount: 5, currency: "ETH" };
const formattedValue = createFormatter().format(createMoney(money), {
currencyPosition: -1
});
// => ETH0.000000000000000005
1.0.1
5 years ago
1.0.1-rc.1
5 years ago
1.0.1-rc.0
5 years ago
1.0.1-rc.2
5 years ago
1.0.0
5 years ago
0.0.5
5 years ago
0.0.6
5 years ago
0.0.4
5 years ago
0.0.3
5 years ago