Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Report differences in constructor name #109

Open
alexanderbird opened this issue Jun 23, 2017 · 0 comments
Open

Feature request: Report differences in constructor name #109

alexanderbird opened this issue Jun 23, 2017 · 0 comments

Comments

@alexanderbird
Copy link

alexanderbird commented Jun 23, 2017

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' }]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant