index overview
Added in v0.0.1
Table of contents
Currency
currency
currency formatter
Signature
export declare const currency: (precision?: number) => ICurrencyFormat
Example
import { currency } from '@warungpintar/ninshu'
import { fold } from 'fp-ts/Either'
import { flow } from 'fp-ts/function'
const formatter = currency()
const moneyPrint = flow(formatter.format, fold(console.log, console.log))
moneyPrint(5000)
//> Rp 5000
moneyPrint('hello world')
//> value should be a number
Added in v0.0.1