deep-freeze-node
deep-freeze-node copied to clipboard
remove unnecessary falsy check
The function is safe against falsy values and the tests prove it.
I also think we can remove the !(property instanceof Object)
check because the only thing it will catch is null. But null is already caught by Object.isFrozen(property)
(plus the function is safe against null anyway).
Be sure to view with no whitespace enabled to see that this is a 2-line change.
https://github.com/AnatoliyGatt/deep-freeze-node/pull/9/files?w=1