Skip to content

Consider adding a config option to return NaN instead of throwing on invalid input (restoring pre-v10 behavior) #403

@rbangre-halliday

Description

@rbangre-halliday

In v10, BigNumber.DEBUG was removed and the library now always throws on invalid input. Previously, with DEBUG = false (the default), invalid values like undefined or non-numeric strings would return NaN — which many codebases rely on for safe fallthrough behavior.

Would you consider adding a config option (e.g. STRICT: false) to restore the old behavior? I'd be happy to submit a PR for this if you're open to it.

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