Skip to content

Sustaining leading zero before the decimal point #664

@MAMPAgent

Description

@MAMPAgent

Check this line in project.
The problem is formatCurrency() does not respect optionalCharacteristic option and chops off leading zero before the decimal point.

For example for this input:

numbro(-0.004).format({
    output: 'currency',
    currencySymbol: '$',
    currencyPosition: 'prefix',
    mantissa: 2,
    optionalCharacteristic: false
});

we get this output:

-$.00

but it should be:

-$0.00

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions