Skip to content

fromFormat as the opposite to toFormat #286

@claudemartin

Description

@claudemartin

I can't find an easy way to parse a string that was created using toFormat. I'd like to see a fromFormat function that does that (based on current configuration) and additionally an option to configure BigNumber to automatically parse the strings passed to the constructor. Something like this: BigNumber.config({ AUTO_PARSE: true });

Does this exist yet? In my case this is only about ignoring the groupSeparator and reading decimalSeparator as '.'. But it would also have to handle everything else in BigNumber.Format.

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