Closed riggs closed 8 years ago
Hi. Thanks fo the PR. There is an error in the tests. self
is not defined. I think the error should be solved if you rename thisArg
to self
.
If you fix the error, I can merge the changes.
I also like the solution proposed by @amio, as it has a more predictable behaviour. I will add an option to the constructor so any of the two solutions can be used.
Hmm, strange, it looks like the version pushed to npm is a different version of the codebase, ever so slightly. I'll update my changes to match the current version.
It looks like the current failure is because you're testing against a version of Chrome from 2014:
Session info: chrome=37.0.2062.120
The spread operator has been supported since Chrome 46.
I will try to update the chrome version used by travis by using trusty.
I updated chrome to the current stable version. Can you rebase the PR?
Done.
Merged! I will release the new version tomorrow.
Awesome! Thanks so much!
BTW, between your library and the babel async-to-generator transform plugin, I'm successfully using async/await wrapped chrome APIs, which is such a huge improvement over callback-hell.
Yeah, it's a shame that the api does not have promises by default. It was very common for me to have multiple callbacks. With async/await syntax I would think it's even simpler. And it's not necessary to use Q or Bluebird for that.
v2 is now live. Thanks again for the PR.
Also, move from using
arguments
to the spread operator to be more explicit.