Commit bbd22469 authored by Noah Zinsmeister's avatar Noah Zinsmeister

formatting tweaks

parent 4d0f43f8
...@@ -4,6 +4,7 @@ import _Big, { RoundingMode } from 'big.js' ...@@ -4,6 +4,7 @@ import _Big, { RoundingMode } from 'big.js'
import toFormat from 'toformat' import toFormat from 'toformat'
import { BigintIsh } from '../types' import { BigintIsh } from '../types'
import { ONE } from '../constants'
import { parseBigintIsh } from './parseInputs' import { parseBigintIsh } from './parseInputs'
const Decimal = toFormat(_Decimal) const Decimal = toFormat(_Decimal)
...@@ -11,7 +12,7 @@ const Big = toFormat(_Big) ...@@ -11,7 +12,7 @@ const Big = toFormat(_Big)
export function formatSignificant( export function formatSignificant(
numerator: BigintIsh, numerator: BigintIsh,
denominator: BigintIsh, denominator: BigintIsh = ONE,
significantDigits: number, significantDigits: number,
format: object = { groupSeparator: '' }, format: object = { groupSeparator: '' },
roundingMode: number = Decimal.ROUND_HALF_UP, roundingMode: number = Decimal.ROUND_HALF_UP,
...@@ -34,7 +35,7 @@ export function formatSignificant( ...@@ -34,7 +35,7 @@ export function formatSignificant(
export function formatFixed( export function formatFixed(
numerator: BigintIsh, numerator: BigintIsh,
denominator: BigintIsh, denominator: BigintIsh = ONE,
decimalPlaces: number, decimalPlaces: number,
format: object = { groupSeparator: '' }, format: object = { groupSeparator: '' },
roundingMode: RoundingMode = RoundingMode.RoundHalfUp roundingMode: RoundingMode = RoundingMode.RoundHalfUp
......
export { formatSignificant, formatFixed } from './formatOutputs' export * from './formatOutputs'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment