By converting all functions to arrow functions we optimize two things. First we can directly remove some return statements by using implicit return and secondly it allows bundlers to compress mupltiple const declarations into a single const declaration with multiple constants.
Example:
coverage: 97.143% (+0.03%) from 97.11%
when pulling fd41f98a89493ead38d61c4fb52a27f2315c45ff on VIKTORVAV99:use_arrow_functions_where_possible
into 5c3c3ebedff58919f7a84f2198a166b385700bcc on i18next:master.
By converting all functions to arrow functions we optimize two things. First we can directly remove some return statements by using implicit return and secondly it allows bundlers to compress mupltiple const declarations into a single const declaration with multiple constants. Example:
Becomes
Which saves some bytes that would otherwise be used for the function keyword in the pervious version.
Checklist
npm run test