New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@easymoney/crypto-formatter

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@easymoney/crypto-formatter

Best way to do money in js

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
4
-20%
Maintainers
1
Weekly downloads
 
Created
Source

easy money logo

@easymoney/crypto-formatter

npm-crypto-formatter npm type definitions deps-crypto-formatter size-crypto-formatter GitHub

Open in docs

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

Keywords

easymoney

FAQs

Package last updated on 24 May 2020

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