You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to extend Q's functionality a bit. I would like to add custom chaining functions (Q().CUSTOM()).
I noticed that I probably had to overwrite the fulfill method copying the existing object passed to the constructor of Promise. I would prefer to be able to add to this implicitely declared object.
Examples
I would like to add the following functions for my own projects. Since there seems to be no interest in adding it to the default functionality (#780), I would like to import Q and afterwards add some extensions in my scripts.
Description
I would like to extend Q's functionality a bit. I would like to add custom chaining functions (
Q().CUSTOM()
).I noticed that I probably had to overwrite the
fulfill
method copying the existing object passed to the constructor ofPromise
. I would prefer to be able to add to this implicitely declared object.Examples
I would like to add the following functions for my own projects. Since there seems to be no interest in adding it to the default functionality (#780), I would like to import Q and afterwards add some extensions in my scripts.
Q().map(func) [synchronous]
Q().map(func) [asynchronous]
Q().tee()
Desired API
I would like to have an API similar to
which basically adds them to the object passed to the
Promise
constructor on fulfillment and adds the following methods:The text was updated successfully, but these errors were encountered: