Skip to content

Feature request: Report differences in constructor name #109

Open
@alexanderbird

Description

@alexanderbird

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' }]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions