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

Add support for diff-ing Symbols #135

Open
ioxua opened this issue Jul 30, 2018 · 0 comments
Open

Add support for diff-ing Symbols #135

ioxua opened this issue Jul 30, 2018 · 0 comments

Comments

@ioxua
Copy link
Contributor

ioxua commented Jul 30, 2018

Running the code:

const { DeepDiff } = require("deep-diff")
const foo = {
  [Symbol.iterator]: "Let's pretend this is an iterator"
}
const bar = {
  bar: "Random prop"
}

console.log(DeepDiff(foo, bar))

Results in:

[ DiffNew { kind: 'N', path: [ 'bar' ], rhs: 'Random prop' } ]

Instead of:

[ DiffNew { kind: 'N', path: [ 'bar' ], rhs: 'Random prop' },
  DiffDeleted { kind: 'D', path: [ Symbol.iterator ], lhs: 'Let's pretend this is an iterator' },]

That would be preferable. There is any reason it happens this way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant