I hate array#map jsperf.com/arraymap

Also, it's nice to see my callbacks class getting some use. ;__;
This commit is contained in:
Zixaphir 2014-12-15 08:54:41 -07:00
parent 9cc40359b3
commit dc3845f51a
3 changed files with 23 additions and 7 deletions

View File

@ -11924,10 +11924,18 @@
});
},
node: function() {
var x;
MarkNewIPs.ipCount = this.ipCount;
MarkNewIPs.postIDs = this.posts.keys.map(function(x) {
return +x;
});
MarkNewIPs.postIDs = (function() {
var _i, _len, _ref, _results;
_ref = this.post.keys;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
x = _ref[_i];
_results.push(+x);
}
return _results;
}).call(this);
return $.on(d, 'ThreadUpdate', MarkNewIPs.onUpdate);
},
onUpdate: function(e) {

View File

@ -11913,10 +11913,18 @@
});
},
node: function() {
var x;
MarkNewIPs.ipCount = this.ipCount;
MarkNewIPs.postIDs = this.posts.keys.map(function(x) {
return +x;
});
MarkNewIPs.postIDs = (function() {
var _i, _len, _ref, _results;
_ref = this.post.keys;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
x = _ref[_i];
_results.push(+x);
}
return _results;
}).call(this);
return $.on(d, 'ThreadUpdate', MarkNewIPs.onUpdate);
},
onUpdate: function(e) {

View File

@ -7,7 +7,7 @@ MarkNewIPs =
node: ->
MarkNewIPs.ipCount = @ipCount
MarkNewIPs.postIDs = @posts.keys.map (x) -> +x
MarkNewIPs.postIDs = (+x for x in @post.keys)
$.on d, 'ThreadUpdate', MarkNewIPs.onUpdate
onUpdate: (e) ->