constructor/callbacks-once
Prevents duplicate calls to the instance callback methods.
callbacksOnce( baseConnection )
Prevents duplicate calls to the instance callback methods by tracking the last data the methods were called with. If called with the same data again, it does not call the base connection's instance callback.
Parameters
- baseConnection
{Object}
:can-connect
connection object that is having thecallbacks-once
behavior added on to it. Should already contain the behaviors that provide the Instance Callbacks (e.g constructor). If theconnect
helper is used to build the connection, the behaviors will automatically be ordered as required.
Returns
{Object}
:
A can-connect
connection containing the methods provided by callbacks-once
.