Support for ES6 Proxy style client calls#107
Open
zdychacek wants to merge 2 commits intobaalexander:masterfrom
Open
Support for ES6 Proxy style client calls#107zdychacek wants to merge 2 commits intobaalexander:masterfrom
zdychacek wants to merge 2 commits intobaalexander:masterfrom
Conversation
Author
|
Oh yes. It won't work with older versions of node. Therefore failed build for node v0.8... |
Collaborator
|
Hi @zdychacek Thank you for your work, I like the promise API you propose but we also need to retain the callback functionality (I'd keep that default) and I'd prefer to be compatible with 0.8.x as long as possible. I'd also like to get some more opinions on this :) In the meantime, could you please edit |
Author
|
Hi @patricklodder, it's not a problem to retain callback style along with the proxy feature. Going to rewrite that. I will describe the usage of proxy feature in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
this pull request extends the client with an ability of making calls using ES6 Proxy API.
It extends
Clientclass with$property which is an instance of theProxyobject. This object allows you to call methods directly in following style:This pull request also adds a new method
Client#methodCallPromise()which is aPromisebased wrapper around theClient#methodCall()method.You can find an example of this feature in
example/proxy_calls.jsfile and in Readme as well.If you like this feature, you can merge it :)