mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-26 01:44:36 -05:00
Now that nodejs/node#3072 is mostly fixed, we can finally start using Node 4+ features. This refactor: - uses arrow functions where appropriate Note that arrow functions still aren't used in Mocha, where `this` is sometimes meaningful. This also removes the need for .bind() nearly everywhere, as well as the `self = this` trick. - refactors Validator and Connection into ES6 classes - no longer uses Array#forEach for iterating arrays We strongly prefer for (let i = 0; i < arr.length; i++) because of performance reasons. Most forEaches have been replaced with for..of, though, which is 5x slower than the long-form loop but 2x faster than forEach, which is good enough outside of most inner loops. The only exception is tournaments, which is due for a more invasive refactor soon anyway. |
||
|---|---|---|
| .. | ||
| belch.js | ||
| boomburst.js | ||
| bugbuzz.js | ||
| chatter.js | ||
| curse.js | ||
| disable.js | ||
| echoedvoice.js | ||
| electricterrain.js | ||
| embargo.js | ||
| focuspunch.js | ||
| followme.js | ||
| foresight.js | ||
| glare.js | ||
| grassyterrain.js | ||
| gravity.js | ||
| haze.js | ||
| healblock.js | ||
| hypervoice.js | ||
| imprison.js | ||
| ingrain.js | ||
| knockoff.js | ||
| magicroom.js | ||
| miracleeye.js | ||
| mistyterrain.js | ||
| quash.js | ||
| ragepowder.js | ||
| relicsong.js | ||
| rollout.js | ||
| roost.js | ||
| round.js | ||
| skydrop.js | ||
| smellingsalts.js | ||
| snarl.js | ||
| stealthrock.js | ||
| substitute.js | ||
| taunt.js | ||
| thief.js | ||
| thousandarrows.js | ||
| thunderwave.js | ||
| transform.js | ||
| trickroom.js | ||
| uproar.js | ||