nodejs / installer

Electron based installer for Node.js.
Other
194 stars 36 forks source link

Use ES6 arrow functions more #32

Closed zlatanvasovic closed 7 years ago

zlatanvasovic commented 7 years ago

Considering the installer is already ES6-friendly, let's get it to the higher level.

Note: It seems that using () => syntax in version.js throws a type-related error (LTS and stable version aren't defined due to the error), so I avoided arrow functions there.

delvedor commented 7 years ago

You cannot use arrow functions in versions.js since arrow functions do not bind their own this.

This means that inside Versions.prototype.something you cannot use this.property, because the arrow function (in this case) uses the global this and not the Versions one. :)

zlatanvasovic commented 7 years ago

Thanks @delvedor. I really didn't know that. :smile:

zlatanvasovic commented 7 years ago

Any news on this?

delvedor commented 7 years ago

@addaleax @mikeal if is ok for you we can merge this.

addaleax commented 7 years ago

@delvedor I’d say feel free to merge any PRs yourself :)