medialab / sandcrawler

sandcrawler.js - the server-side scraping companion.
http://medialab.github.io/sandcrawler/
GNU Lesser General Public License v3.0
107 stars 12 forks source link

Promises in addition to callbacks? #189

Open moshewe opened 8 years ago

moshewe commented 8 years ago

The done callback and more can be replaced with Promises to make the code more streamlined. Is that something worth a PR or is this not in your development plan?

Yomguithereal commented 8 years ago

The thing is I will code this repo from scratch again soon. So if this makes sense to you to use Promises and you happen to code it I will probably merge and release for you but don't get too much attached to the current state of the library :)

moshewe commented 8 years ago

Will the API remain somewhat the same, or will it change dramatically?

Yomguithereal commented 8 years ago

The concept of the API should somewhat remain the same but some things will change. For instance, I will externalize different engines in different packages so that the code is reusable across multiple engine implementations.

Yomguithereal commented 8 years ago

If you want I can start opening an issue concerning the rewrite so I can lay out my plans more precisely and so you can help me think about it.

moshewe commented 8 years ago

I'd be glad to! I want to start using the library and would really love to cooperate.

Yomguithereal commented 8 years ago

Did not find much time today to open the issue. Can you ping me tomorrow so I open it please?