Skip to content

Does not detect differences in order #42

Closed
@giorgio79

Description

@giorgio79

When diffing two objects where I would like the order of keys to matter:


const { diff, addedDiff, deletedDiff, detailedDiff, updatedDiff } = require("deep-object-diff");

const right = {
1: "Tom",
2: "reads",
3: ",",
4: "novels"
};

const wrong = {
1: "Tom",
2: "reads",
3: "novels",
4: ","
};

console.log(detailedDiff(right, wrong)); 

And the result is:

Object {added: , deleted: , updated: }

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