markusn / color-diff

Implemets the CIEDE2000 color difference algorithm, conversion between RGB and lab color and mapping all colors in palette X to the closest color in palette Y based on the CIEDE2000 difference.
Other
359 stars 30 forks source link

Migrate to ES6 / ES2015? #9

Closed marcobiedermann closed 1 year ago

marcobiedermann commented 8 years ago

What do you think about migrating the project to ES2015?

markusn commented 8 years ago

Hi! I am not familiar with the status of ES6 on nodejs, are there any benefits (especially in performance)?

marcobiedermann commented 8 years ago

@markusn Using native ES2015 functions instead of your own will always be faster e.g. import vs require. Also with constthe interpreter can assign memory more efficiently. With ES2015 you code might look cleaner for you and the parser to read.

markusn commented 8 years ago

It seems interesting as it is possible to transpile to ES5 for backward compatibility for users of older versions of node. However I will not likely have time to implement this in the near future, but would happily take a pull-request.

valmynd commented 7 years ago

did a pull request, see #12

evelynhathaway commented 5 years ago

@markusn, were you thinking of a build step and traspiling down to ES5? I'm down to help migrate to ES6+

markusn commented 5 years ago

Hi! I'm going to do a 2.0.0 with ES6 (no transpiling to ES5).

evelynhathaway commented 5 years ago

Awesome! Let me know if there's anything I can do to help. I've already changed var to let and const where appropriate in a fork (see commit: https://github.com/markusn/color-diff/commit/5624aaea7d2eb06305882d059eddea765ba64a75) in case you want to rebase it or I can create a PR for it. 😄

justinfagnani commented 1 year ago

Any news here? I'd love to use this in a client-side JS modules only project. I can help port too.

markusn commented 1 year ago

Any news here? I'd love to use this in a client-side JS modules only project. I can help port too.

Hi! What is stopping you from using it at the moment?

justinfagnani commented 1 year ago

@markusn browsers don't support Common JS, and I'm not using a bundler.

markusn commented 1 year ago

@justinfagnani I have a PR open to solve this: https://github.com/markusn/color-diff/pull/22 . Would that work for you?

markusn commented 1 year ago

fixed in v1.4.0