Skip to content

totalLength negative numbers #425

@jlismore

Description

@jlismore

This might be a documentation issue rather than a functionality issue.
Per the format documemtation the totalLength option specifies the precision, but it actually seems to limit the final length of the formatted value.
I want to produces numbers formatted to 3sf and per the format docs this seems the right option

numbro(1011).format({totalLength: 3}) // 1.01k
numbro(-1011).format({totalLength: 3}) // -1.0k, expecting -1.01k

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