Comments (2)
Perhaps an additional check for instanceof Object
is needed? (This idea needs a more in-depth examination)
({}) instanceof Object // => true
Object.create(null) instanceof Object // => false
from diff.
Based on recent PRs, I'm of the opinion that this is no longer an issue:
im5k:deep-diff phillip$ node
> let diff = require('./')
undefined
> diff({wilbur: 'funky'}, Object.create(null))
[ DiffDeleted { kind: 'D', path: [ 'wilbur' ], lhs: 'funky' } ]
> diff(Object.create(null), {wilbur: 'funky'})
[ DiffNew { kind: 'N', path: [ 'wilbur' ], rhs: 'funky' } ]
from diff.
Related Issues (20)
- TypeError: Cannot read property 'options' of undefined HOT 2
- Forked to fix #142 HOT 1
- Array position change only resulting in multiple DiffEdit events instead of DiffArray event HOT 1
- elements in arrays are now processed in reverse order
- Cannot read property 'hasOwnProperty' of undefined
- Cannot read property 'hasOwnProperty' of undefined , is use react 15 and babel 6 and jest enzyme HOT 2
- How do I actually apply a diff "later"? HOT 2
- applyDiff not working if the target is undefined/null/false HOT 1
- Please share an example code of the 'acc' usage in diff function
- JSON Patch RFC 6902 HOT 2
- Incorrectly formed deleted array element HOT 3
- Support reference equality immutability HOT 3
- CVE-2020-11023 (Medium) detected in jquery-2.1.4.min.js
- Struggling to use a custom accumulator in typescript
- Completely crash/freeze Chrome browser with "Error code 6" (network) - DOMException: Blocked a frame with origin "http://localhost:8890" from accessing a cross-origin frame.
- Truthy value need to execute `revertChange`
- Diffing identical objects returns undefined HOT 1
- diff does not return 'path' key HOT 1
- Massive spike in CPU usage when running diff on a large object HOT 3
- Purpose of lhs in differences? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diff.