You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
this certain place of code is not hot,
if we will optimize, we will do it in the following way:
const { first: name, rest: ver = '*' } = split(unitName, '.');
Where split is:
const split = (s, separator) => {
const i = s.indexOf(separator);
const result = { first: s, rest: '' };
if (i >= 0) {
result.first = s.slice(0, i);
result.rest = s.slice(i + separator.length);
}
return result;
};
Best regards,
~Timur Shemsedinov
impress/lib/application.js
Line 233 in d35b325
Remember the words of the great Demi Murich that using this kind of destructuring generates two A4 sheets of code bytes. Suggestion:
The text was updated successfully, but these errors were encountered: