pokemon-showdown/chat-plugins
Guangcong Luo b665660608 Refactor for more ES6 features
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.
2016-02-10 17:40:21 -06:00
..
COMMANDS.md standardize "Pokémon" in .md files 2015-06-09 17:21:23 -07:00
hangman.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00
info.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00
jeopardy.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00
mafia-data.js Mafia: implement new roles 2016-01-29 02:44:31 +01:00
mafia.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00
poll.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00
scavengers.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00
thehappyplace.js Always use trailing comma for multiline objects 2016-01-01 00:20:07 +01:00
thestudio.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00
traditionalgames.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00
trivia.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00
wifi.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00