Adds faye initialization options. Fixes #2
Allow passing initialization options to faye constructor invocation.
Thanks, but isn't the https://github.com/monterail/angular-faye#configure-faye-client enough?
Besides that, $faye takes now three parameters: url, fun, opts so $faye("url", {...}) syntax will not work.
I'm not sure what part of that syntax won't work, the third parameter is optional. The callback invocation (yield client) should also work as well. This is for initialization, under some cases I might want to initialize vs edit it later, poor argument but in the async world you never know :trollface:
I mean:
$faye = (url, fun, opts = {}) -> ...
$faye("some url", { my: opt })
# inside:
url == "some url"
fun == { my: opt }
opts == {}
Actually no, iirc correctly you're using "?()" right, existential operator, that should parameter checking so if fun is not a function it will work correctly. Thanks.
But if you pass options as second parameter then variable fun will hold those options and options variable will be empty hash so options will not be applied and fun not executed