onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.36k stars 301 forks source link

Use `.some` to short circuit & native `.includes` #2697

Closed toastal closed 5 years ago

toastal commented 5 years ago

Array.prototype.some short-circuits when a value is true which is better for performance and makes the intention more clear. Native String.prototype.includes is easier to read.

Now reading it as English, "if some argument includes 'verbose'"...

codecov[bot] commented 5 years ago

Codecov Report

Merging #2697 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2697   +/-   ##
=======================================
  Coverage   45.77%   45.77%           
=======================================
  Files         361      361           
  Lines       14637    14637           
  Branches     1927     1927           
=======================================
  Hits         6700     6700           
  Misses       7706     7706           
  Partials      231      231

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 c7b11e4...a10058d. Read the comment docs.