tomvlk / node-split-file

:seedling: NodeJS Module to split and merge files for several purposes like transporting over unstable networks.
MIT License
41 stars 13 forks source link

Convert to promises #11

Closed tomvlk closed 7 years ago

tomvlk commented 7 years ago

I think it would be nice to provide the 2.x versions with promises (callback + promise or promise only?). This will not only improve the compatibility with ES2015 styles, but also the integrations for the upcoming async await syntax.

@purplecones How is your opinion about this, and related to your projects environment/integrations.

purplecones commented 7 years ago

I'm all for using the new async/await functionality. It's so much cleaner. We're currently doing it that way for our project by wrapping split-file with a promise and using async/await until its done.

tomvlk commented 7 years ago

@purplecones Okay, nice :smiley:. I really love the new style too. Let's plan this for one of the next alpha releases, make sure you stick with alpha1 for now. :lock:

tomvlk commented 7 years ago

For the first implementation see f270cef921deca104589625503716f29cec01b71. Only did basic testing.

tomvlk commented 7 years ago

@purplecones 2.0.0-beta.1 has been released with Promises (using bluebird for compatibility and integration).