I have some questions for the following codes.
Closed this issue · 1 comments
From my experience on underscore.js, I don't really understand the following codes.
Do you think that it's the right way on using the call of contains(".contains") ?
For example, in the logic " if(.contains((room.people)), s.id) ", (_.contains((room.people)), s.id) is always true, because s.id is always greater than 0.
If so, kindly review the following codes, and let me know.
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L80
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L75
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L100
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L105
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L121
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L126
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L141
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L154
Hi,
Thanks for your email. I believe I have corrected these in this code:
https://github.com/tamaspiros/AngularChat/blob/master/utils/purge.js
Please check.
Thanks,
-Tamas
On 2014-07-23 08:59, Wipying wrote:
From my experience on underscore.js, I don't really understand the
following codes.
Do you think that it's the right way on using the call of
contains(".contains") ?
For example, in the logic " if(.contains((room.people)), s.id) ",
(_.contains((room.people)), s.id) is always true, because s.id is
always greater than 0.If so, kindly review the following codes, and let me know.
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L80
[1]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L75
[2]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L100
[3]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L105
[4]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L121
[5]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L126
[6]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L141
[7]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L154
[8]Reply to this email directly or view it on GitHub [9].
Links:
[1]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L80
[2]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L75
[3]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L100
[4]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L105
[5]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L121
[6]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L126
[7]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L141
[8]
https://github.com/tamaspiros/advanced-chat/blob/master/server.js#L154
[9] #6