percolatestudio / publish-counts

Meteor package to help you publish the count of a cursor, in real time
https://atmospherejs.com/tmeasday/publish-counts
MIT License
200 stars 46 forks source link

add client method Counts.has() so user can verify existence of counts #56

Closed boxofrox closed 9 years ago

boxofrox commented 9 years ago

Allow users to test whether a count is published before reading the count.

Why a new function? I subscribe to the school of thought that a return value should have one meaning. Counts.get() only returns an integer representing number of docs, fields, or lengths counted. If no count is published, then nothing is counted and zero is a valid result.

Fixes #32

boxofrox commented 9 years ago

@tmeasday, fyi, will publish 0.6.0 if the #32 crowd find this PR acceptable.

tmeasday commented 9 years ago

Sounds good to me @boxofrox

On Wed, 5 Aug 2015 at 09:05 boxofrox notifications@github.com wrote:

@tmeasday https://github.com/tmeasday, fyi, will publish 0.6.0 if the

32 https://github.com/percolatestudio/publish-counts/issues/32 crowd

find this PR acceptable.

— Reply to this email directly or view it on GitHub https://github.com/percolatestudio/publish-counts/pull/56#issuecomment-127790596 .

zimme commented 9 years ago

This approach is fine with me.

I can't find anything obviously wrong in the code :+1:

bduddie commented 9 years ago

Works for me too, code looks good :+1:

boxofrox commented 9 years ago

Release 0.6.0 published on atmospherejs.