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

styles: replace indexOf() with includes() #148

Merged
merged 1 commit into from Dec 26, 2017
Merged

styles: replace indexOf() with includes() #148

merged 1 commit into from Dec 26, 2017

Conversation

ghost
Copy link

@ghost ghost commented Dec 23, 2017

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

All the subsystems and tests using indexOf().

Description of change

nodej.s version is 8 / 9 in .travis.yml , so I make some changes to make code more readable by using ES6 features. The rules that I used:

  • replace indexOf() !== -1 with includes()
  • replace indexOf() >= 0 with includes()
  • replace indexOf() > -1 with includes()
  • replace indexOf() === -1 with !includes()

@codecov-io
Copy link

codecov-io commented Dec 23, 2017

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #148   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          17     17           
  Lines         881    881           
=====================================
  Hits          881    881
Impacted Files Coverage Δ
lib/loader/mixin/plugin.js 100% <100%> (ø) ⬆️
lib/utils/sequencify.js 100% <100%> (ø) ⬆️
lib/loader/egg_loader.js 100% <100%> (ø) ⬆️
lib/utils/router.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 613f236...35024db. Read the comment docs.

@fengmk2
Copy link
Member

fengmk2 commented Dec 26, 2017

Thanks!

@fengmk2 fengmk2 merged commit 3384a87 into eggjs:master Dec 26, 2017
@ghost ghost deleted the patch-1 branch December 26, 2017 02:50
hyj1991 pushed a commit to hyj1991/egg-core that referenced this pull request Sep 16, 2021
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

2 participants