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

refactor: use absolute equal for string comparison #1251

Closed
wants to merge 1 commit into from

Conversation

ulivz
Copy link

@ulivz ulivz commented Sep 20, 2018

Summary

It's recommended to use === instead of == for value comparison. in koa, now null and undefined are considered the same, that makes sense, but not for strings.

@codecov
Copy link

codecov bot commented Sep 20, 2018

Codecov Report

Merging #1251 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1251   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files           5       5           
  Lines         391     391           
======================================
  Hits          391     391
Impacted Files Coverage Δ
lib/response.js 100% <100%> (ø) ⬆️
lib/request.js 100% <100%> (ø) ⬆️
lib/context.js 100% <100%> (ø) ⬆️
lib/application.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e6853af...02a9fff. Read the comment docs.

@fl0w
Copy link
Contributor

fl0w commented Sep 21, 2018

I don't understand why there's endless need to change functional code that makes use of defined, well documented, coercion 😆.

I'm -1 on this as I see this equivalent to stylistic PRs which are denied by convention previously.

@medanat
Copy link
Contributor

medanat commented Sep 27, 2018

I don't understand why there's endless need to change functional code that makes use of defined, well documented, coercion 😆.

I'm -1 on this as I see this equivalent to stylistic PRs which are denied by convention previously.

#1225 (comment)

Copy link

@anlexN anlexN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it is ok, please merge. when to merge?

Copy link
Member

@3imed-jaberi 3imed-jaberi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ulivz..
I don't like to be this person but I think should close this PR because it's outdated.
Without talking about documentation, the rest of the code was updated as this PR do in the current Koa version.

@dead-horse @niftylettuce @miwnwski @jonathanong ...

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

Successfully merging this pull request may close these issues.

None yet

6 participants