Add checks and enhance getTokenFromHeader function definition#85
Add checks and enhance getTokenFromHeader function definition#85Anass-Daoudi wants to merge 1 commit intogothinkster:masterfrom
Conversation
|
Hi @kentcdodds @anishkny, |
kentcdodds
left a comment
There was a problem hiding this comment.
Seems fine to me, though I don't personally feel like these changes make the code easier to follow...
|
Thanks @kentcdodds for giving a look. |
|
Technically yes, but I doubt that there's a situation where |
|
As I see, as this code is not statically typed, we can't confirm that this function will always receive Or may be this sort of controls must be done in unit tests? Correct me please. |
|
I personally don't feel like the risk is worth the extra effort. But I don't have any stake in this project, so do what you want. |
|
Thanks @kentcdodds for being that reactive :) |
Hi,
In this PR, I mainly add more checks to the function
getTokenFromHeaderand enhance its definition structure.Thanks for the review!
Happy to get feedbacks :)