Merging provided constructor options with default one using _.extend leads to some unexpected behaviour.
When I create a constructor and want to provide only auth.token (without auth.user) _.extend will leave auth.user as undefined, therefore pretty all methods start throwing errors.
I believe using deep-extend here makes more sense.
Merging provided constructor options with default one using _.extend leads to some unexpected behaviour.
When I create a constructor and want to provide only
auth.token
(withoutauth.user
) _.extend will leaveauth.user
asundefined
, therefore pretty all methods start throwing errors.I believe using deep-extend here makes more sense.