Skip to content

Making array order optional #3

Closed
@AlexisAnzieu

Description

@AlexisAnzieu

Hey! Thanks for this excellent library!
In one of my use case, I would need to compare two objects and mark them as equals no matter if the elements in their arrays are not in the same order.
eg:

const objectA = {
          id: 54,
          user: {
            name: "joe",
           member: true,
          hobbies: ["golf", "football"],
            age: 66,
         },
  }

const objectB = {
        id: 54,
        user: {
            name: "joe",
           member: true,
           hobbies: [ "football", "golf"],
            age: 66,
        },
  }
  
  // Be marked as equal

Would it be possible to add this kind of option in the API? Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions