geld-cli
v3.0.0
Published
Convert a number to a currency.
Readme
geld-cli
Convert a number to a currency.
Install
Using npm:
npm install geld-cli --globalUsage
$ geld --help
Convert a number to a currency.
Usage
$ geld <input>
Options
--currency, -c Currency symbol, default: €
--currencyPosition, --cp, -p Currency position (before or after), default: after
--decimals, -d Number of decimals (0 to 100), default: 2
--decimalSeparator, --ds Decimal separator, default: ,
--orderSeparator, --os Order separator, default: .
--zeroDecimals, -z Zero decimals character
--space, -s Space between value and currency symbol
Examples
$ geld 1337.42
1.337,42 €
$ geld -1337.42
-1.337,42 €$ geld 1337.42
1.337,42 €
$ geld 1337.42 --currency '$' --currencyPosition before --decimalSeparator . --orderSeparator , --space ''
$1,337.42Invalid input or flag values print an error and exit with code 2.
Related
- geld is the API for this module.
License
MIT © Marc Görtz
