Skip to content

equals method is missing #1

@valioDOTch

Description

@valioDOTch

I would suggest the following equals method

equals: function equals(otherSet){
    //if (!otherSet instanceof Set){return false;} //comment out for typecheck
    var otherKeys = Object.keys(otherSet._values).sort();
    var myKeys = Object.keys(this._values).sort();
    return JSON.stringify(otherKeys) === JSON.stringify(myKeys);
}

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