diff icon indicating copy to clipboard operation
diff copied to clipboard

Feature request: Report differences in constructor name

Open alexanderbird opened this issue 8 years ago • 0 comments

It would be nice to have a new diff type indicator for mismatched constructors.

kind: 'C' path, is set as they would be for 'E' differences lhs is the value of the lhs item's constructor.name property rhs as with lhs index and item are unused

Example:

function Something(value) { this.value = value; }

var lhs = new Something('foo');
var rhs = { value: 'foo' };

Diffing the two would produce:

[{ kind: 'C',
    path: [  ],
    lhs: 'Something',
    rhs: 'Object' }]

alexanderbird avatar Jun 23 '17 21:06 alexanderbird