Skip to content

Instantly share code, notes, and snippets.

@user24
Created July 15, 2014 10:25
Show Gist options
  • Select an option

  • Save user24/c68c92938fc2e7a9d3a5 to your computer and use it in GitHub Desktop.

Select an option

Save user24/c68c92938fc2e7a9d3a5 to your computer and use it in GitHub Desktop.

Revisions

  1. user24 created this gist Jul 15, 2014.
    4 changes: 4 additions & 0 deletions comments.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    // This is called whenever any data changes that affects the weekly totals
    // What we do in that case is modify our local representation of the weekly data and emit an event
    // This way, modules can listen for that event and respond to it without having to wait for
    // the server to generate new weekly totals