Skip to content

Enforcing an object type comparison function in the default comparator for a BST #107

@zrwusa

Description

@zrwusa

Describe the bug
Enforcing an object type comparison function in the default comparator for a BST may impact performance; it’s worth considering a design change.

The Date type within object data types is essentially comparable.

To Reproduce
if (typeof a === 'object' || typeof b === 'object') {
throw TypeError(
When comparing object types, a custom comparator must be defined in the constructor's options parameter.
);
}

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