-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
v2.0.2 add 'add' function to array's prototype #551
Comments
It comes from the
I'm not sure if it's intended. |
@Alexsey can you describe how this interferes with your application? The Collections package does shim some methods on Array. |
We use sugarjs in our project, it's a library that brings a lot of methods to prototypes, and it also has |
+1; this will be a dealbreaker for using Q in many shops. Are we using more of collections than is provided by the WeakMap shim? |
I’m bringing in the iterator shim from collections@future for remote streaming. I will need to find a middle road before q@future is prime time. @Alexsey Please note that this is not a problem for the official release of Q, and Q version 2 is not recommended for anything but experimental use. |
The most viable solution is to remove shimming in Collections and instead expose operator modules. cc @Stuk |
Could you be more explicit about what you mean by "operator modules"? |
@Stuk, In Python at least, the strategy for adding operators to lower level objects and allowing higher level objects to override is to expose an operator like Collections provides var iterate = require("collections/iterate");
iterate(collection); For now, the var iterate = require("collections/iterate");
MySet.prototype[iterate.symbol] = function () {
}; |
@kriskowal yes, of course it's not a problem of official release, that is why |
Thanks, @Alexsey. I worry about breaking people’s stuff with my moon shot branch. |
@kriskowal, thanks for reply. Hope I would be able to close this soon :) |
console.log([].add && [].add.toString())
var q = require('q')
console.log([].add && [].add.toString())
with 2.0.2
with 1.0.1
The text was updated successfully, but these errors were encountered: