import { toUnit as coreToUnit } from '@dinero.js/core' ; import type { ToUnitParams } from '@dinero.js/core' ; param dineroObject param options . digits param options . round returns export function toUnit < TAmount > ( ... [ dineroObject , options ] ) { const { calculator } = dineroObject ; const toUnitFn = coreToUnit ( calculator ) ; return toUnitFn ( dineroObject , options ) ; }