DEV Community


Discussion on: 10 practices for writing readable code

shayd16 profile image
Shayne Darren

This is exactly what I was looking for, how to handle plain objects. Thank you, Andre.
Will definitely be implementing these where possible.

Thread Thread
ashleyjsheridan profile image
Ashley Sheridan

There is the null object pattern for this situation, which returns something that shouldn't break your existing code and only requires minimal changes to your methods which return objects.

Thread Thread
acostalima profile image