-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Please bind the function #79
Comments
On second thought, I guess you can't do that. You don't have access to the parent object. I went down this rabbit hole, because the API I'm using has nested objects off of their main API and pify does not seem to have a method to step into and promisify those functions. So, attempting to bind a nested function broke the API because |
If I try to promisify each function, this is what I have to do: await pify(sdk.billingPlan.list.bind(sdk.billingPlan))() Seems like there should be a better way: pify(sdk.billingPlan, 'list')() |
Could you please add a bind to the wrapped function so
this
will work?The text was updated successfully, but these errors were encountered: