pokemon-showdown/mods
Guangcong Luo 246dfa1da3 Refactor in-object-literal to array-includes (#4079)
Previously, if we wanted to test if A was either 'B' or 'C', we would use
the pattern:

    A in {B:1, C:1}

I actually don't know how common this pattern is; I just started using
it because I was tired of typing `A === 'B' || A === 'C'` all the time.
I never really liked it, though; the `:1` part made it kind of
blatantly a hack.

I did some testing and `['B', 'C'].includes(A)` is overall faster.

(A switch statement is around 20x faster still, but who wants to type
that much code?)

Anyway, the new standard is

    ['B', 'C'].includes(A)

Something something progress!
2017-10-23 09:19:15 -05:00
..
gen1 Refactor in-object-literal to array-includes (#4079) 2017-10-23 09:19:15 -05:00
gen2 Refactor in-object-literal to array-includes (#4079) 2017-10-23 09:19:15 -05:00
gen3 Gen 3 Randbat improvements (#4055) 2017-10-19 00:53:25 +04:00
gen4 Gen 4 Random Battle updates (#4021) 2017-09-27 13:05:24 +04:00
gen5 Refactor in-object-literal to array-includes (#4079) 2017-10-23 09:19:15 -05:00
gen6 Refactor in-object-literal to array-includes (#4079) 2017-10-23 09:19:15 -05:00
gennext Refactor in-object-literal to array-includes (#4079) 2017-10-23 09:19:15 -05:00
mixandmega MnM: Ban Marshadow from holding stones (#3981) 2017-09-14 10:12:51 +08:00
stadium Refactor in-object-literal to array-includes (#4079) 2017-10-23 09:19:15 -05:00
ultimatez Update Ultimate Z 2017-10-03 18:37:00 +04:00