Closed m-basov closed 6 years ago
Merging #5 into master will increase coverage by
0.17%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #5 +/- ##
==========================================
+ Coverage 93.24% 93.42% +0.17%
==========================================
Files 1 1
Lines 74 76 +2
Branches 18 18
==========================================
+ Hits 69 71 +2
Misses 5 5
Impacted Files | Coverage Δ | |
---|---|---|
src/dumper.js | 93.42% <100%> (+0.17%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5150042...c74af73. Read the comment docs.
First of all thanks for the awesome util!
This PR tries to fix problems I encountered. I tried to dump mongo document and had two problems:
On some objects there were no
hasOwnProperty
function. I replaced call withObject.prototype.hasOwnProperty
which is at least a little bit safer;There was giant object with cyclic properties which could not be dumped because maximum call stack size exceeded. Solution for this is not ideal but it works. There is new dependency cycle and it is called for each object.
Also I've added 2 test cases to cover this fixes.
Let me know what you think!