metarhia/impress

Destructuring proposal

Karbashevskyi opened this issue · 1 comments

const [name, ver = '*'] = unitName.split('.');

Remember the words of the great Demi Murich that using this kind of destructuring generates two A4 sheets of code bytes. Suggestion:

const {0: name, 1: ver = '*'} = unitName.split('.');