Created
November 25, 2014 11:08
-
-
Save costa/54cf947bbb4d5a63b77e to your computer and use it in GitHub Desktop.
Client-side asynchronous pusher init utility: app/assets/javascripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window.pusher_async = (pusher_or_key, callback)-> | |
| return _(pusher_async).delay 22, key unless Pusher? | |
| callback if typeof pusher_or_key is 'string' then new Pusher pusher_or_key else pusher_or_key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment