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

Custom upd #31

Closed
amirburbea opened this issue Jul 3, 2017 · 3 comments · Fixed by #32
Closed

Custom upd #31

amirburbea opened this issue Jul 3, 2017 · 3 comments · Fixed by #32

Comments

@amirburbea
Copy link
Contributor

amirburbea commented Jul 3, 2017

My company's KDB team has a non standard 'upd' call that will push more than two values.

You have the following code in your node-q library:
if (err === undefined && Array.isArray(o) && o[0] === "upd") { self.emit('upd', o[1], o[2]); }

Can this be changed to:
if (err === undefined && Array.isArray(o) && o[0] === "upd") { events.EventEmitter.prototype.emit.apply(self, o); }

or simply self.emit(...o); since pretty much every version of node today supports that syntax.

Basically allowing the array to be a variable length??

michaelwittig added a commit that referenced this issue Jul 3, 2017
@michaelwittig
Copy link
Owner

self.emit(...o) would be nice but I try to be node 0.10 backward compatible. This would require node 6.x?

@michaelwittig michaelwittig mentioned this issue Jul 3, 2017
michaelwittig added a commit that referenced this issue Jul 3, 2017
@michaelwittig
Copy link
Owner

released as node-q@2.3.0

@amirburbea
Copy link
Contributor Author

Thanks, that's super helpful. Appreciate the quick turnaround.

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

Successfully merging a pull request may close this issue.

2 participants