Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be careful with redefining variables in the same scope #31

Open
jwld opened this issue Apr 10, 2020 · 0 comments
Open

Be careful with redefining variables in the same scope #31

jwld opened this issue Apr 10, 2020 · 0 comments

Comments

@jwld
Copy link

jwld commented Apr 10, 2020

verify(jwt, secret, (err, jwt) => {

Here for example jwt is defined twice - once as an argument to verify and then again in the callback. It works but it's not particularly readable and would be easy to forget which value you're referring to - better to rename the second one to something that reflects its "decoded" state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant