Will likely add a few commits to this before merging.
This is an attempt to make the coding style a bit more consistent and ES6-ish, and (probably) do a little light refactoring to make things a little less confusing. ES6 style-wise, I've come to prefer a few conventions:
prefer const and let to var (but generally not in loops, because then you end up with IIFEs inside your ES5 code which slows things down)
one declarator per declaration, close to where it is first used
string templates instead of concatenation
arrow functions, object shorthand notation and destructuring where possible
The codebase hasn't seen much aggressive refactoring, so there are probably a number of opportunities to make things a bit easier to follow and more explicit (e.g. fewer functions that mutate objects as a side effect, that sort of thing). @eventualbuddha would be interested to hear any thoughts you have along the way.
Will likely add a few commits to this before merging.
This is an attempt to make the coding style a bit more consistent and ES6-ish, and (probably) do a little light refactoring to make things a little less confusing. ES6 style-wise, I've come to prefer a few conventions:
const
andlet
tovar
(but generally not in loops, because then you end up with IIFEs inside your ES5 code which slows things down)The codebase hasn't seen much aggressive refactoring, so there are probably a number of opportunities to make things a bit easier to follow and more explicit (e.g. fewer functions that mutate objects as a side effect, that sort of thing). @eventualbuddha would be interested to hear any thoughts you have along the way.