Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promises? #17

Open
Tidwell opened this issue Mar 15, 2017 · 3 comments
Open

Promises? #17

Tidwell opened this issue Mar 15, 2017 · 3 comments

Comments

@Tidwell
Copy link
Owner

Tidwell commented Mar 15, 2017

Or at least allowing callback to be passed as the second argument so that promisfy libraries will work nicely.

This would have to be in a major version bump unless it was done in a backwards-compatible manner.

To be backwards-compat, would require:

  • callback object property
  • callback function as second argument
  • promise chaining
@eaaliprantis
Copy link

Could we make it an option where legacy could be a boolean (indicating callback = true while promises = false) and the default will be false?

@Tidwell Tidwell added this to the 3.0 milestone Mar 19, 2017
@Tidwell
Copy link
Owner Author

Tidwell commented Mar 19, 2017

If we are going to support everything, we shouldn't need to flag it, just check if the callback property is there, or the final argument to the call is a function, and return a promise from each call.

However, since we need to bump to 2.0 anyway to resolve the challonge-js merge, we might consider just switching to promises anyway for 3.0.

I think I'll mark this as a 3.0 feature for now.

@eaaliprantis
Copy link

I would still support both fallback and promises. I would also try and use superagent, which is pretty awesome to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants